Skip to content

Commit 01f907e

Browse files
committed
Revamp quick-start guides and update TOC
Add single- and multi-animal quick-start pages to the Main workflows overview in _toc.yml and substantially rewrite both quick-start docs. single_animal_quick_guide.md was reorganized into a clear step-by-step workflow (create project, configure, extract/label frames, create dataset, train/evaluate, analyze/filter/plot/create videos) with concrete Python examples, notes, and tips (use absolute paths, no spaces in body-part names). tutorial_maDLC.md was refactored into a multi-animal overview with GUI and Python workflows, clearer config guidance for multi-animal fields, extraction/annotation/checking steps, separate training engine examples (PyTorch/TensorFlow), and explicit tracking steps (analyze, convert detections, stitch tracklets, create labeled videos) plus helpful notes. Overall improvements focus on clarity, concrete examples, and actionable tips for users.
1 parent 3b6f0c3 commit 01f907e

4 files changed

Lines changed: 192 additions & 73 deletions

File tree

_toc.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ parts:
1111
- file: docs/docker
1212
# - file: docs/quick-start/index
1313
# sections:
14-
# - file: docs/quick-start/single_animal_quick_guide
15-
# - file: docs/quick-start/tutorial_maDLC
1614

1715
- caption: Main workflows overview
1816
chapters:
1917
- file: docs/main-workflows/user-guide
20-
- file: docs/main-workflows/multi-animal-tracking
18+
sections:
19+
- file: docs/quick-start/single_animal_quick_guide
20+
- file: docs/quick-start/tutorial_maDLC
21+
- file: docs/main-workflows/multi-animal-tracking
2122
# - file: docs/standardDeepLabCut_UserGuide
2223
# - file: docs/maDLC_UserGuide
2324
- file: docs/Overviewof3D

docs/main-workflows/multi-animal-tracking.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,3 @@ align: center
227227
---
228228
Short demo of the tracklet refinement workflow.
229229
```
230-
231-
```
232-
```

docs/quick-start/single_animal_quick_guide.md

Lines changed: 93 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,90 +11,149 @@ deeplabcut:
1111

1212
(file:single-animal-quick-start)=
1313

14-
# QUICK GUIDE to single Animal Training:
14+
# Single-animal at a glance
1515

16-
**The main steps to take you from project creation to analyzed videos:**
16+
This page summarizes the main DeepLabCut functions used in a standard single-animal
17+
2D pose-estimation workflow, from project creation to analyzed videos.
1718

18-
Open ipython in the terminal:
19+
## Start Python
1920

20-
```
21+
Open a terminal and start an interactive Python session, for example with IPython:
22+
23+
```bash
2124
ipython
2225
```
2326

24-
Import DeepLabCut:
27+
Then import DeepLabCut:
2528

26-
```
29+
```python
2730
import deeplabcut
2831
```
2932

30-
Create a new project:
33+
## Workflow
3134

32-
```
33-
deeplabcut.create_new_project("project_name", "experimenter", ["path of video 1", "path of video2", ..])
34-
```
35+
### 1. Create a project
3536

36-
Set a config_path variable for ease of use + go edit this file!:
37+
```python
38+
project_name = "project_name"
39+
experimenter = "experimenter"
40+
video_paths = [
41+
"/absolute/path/to/video_1.mp4",
42+
"/absolute/path/to/video_2.mp4",
43+
]
3744

45+
config_path = deeplabcut.create_new_project(
46+
project_name,
47+
experimenter,
48+
video_paths,
49+
copy_videos=True,
50+
)
3851
```
39-
config_path = "yourdirectory/project_name/config.yaml"
52+
53+
```{note}
54+
Use absolute paths to your video files. The returned `config_path` is the full path to
55+
the project `config.yaml` file and is used throughout the rest of the workflow.
4056
```
4157

42-
Extract frames:
58+
### 2. Configure the project
4359

60+
Open the generated `config.yaml` file and edit it for your experiment.
61+
62+
At this stage, define the body parts or points of interest that you want to track. You
63+
can also adjust project settings such as the number of frames to extract, visualization
64+
settings, and training options.
65+
66+
```{important}
67+
Do not include spaces in body-part names.
4468
```
69+
70+
### 3. Extract frames
71+
72+
```python
4573
deeplabcut.extract_frames(config_path)
4674
```
4775

48-
Label frames:
76+
### 4. Label frames
4977

50-
```
78+
```python
5179
deeplabcut.label_frames(config_path)
5280
```
5381

54-
Check labels \[OPTIONAL\]:
82+
### 5. Check labels
5583

56-
```
84+
```python
5785
deeplabcut.check_labels(config_path)
5886
```
5987

60-
Create training dataset:
61-
88+
```{tip}
89+
This step is optional, but strongly recommended. Use the generated labeled images to
90+
visually confirm that the annotations were saved correctly before training.
6291
```
92+
93+
### 6. Create the training dataset
94+
95+
```python
6396
deeplabcut.create_training_dataset(config_path)
6497
```
6598

66-
Train the network:
99+
### 7. Train the network
67100

68-
```
101+
```python
69102
deeplabcut.train_network(config_path)
70103
```
71104

72-
Evaluate the trained network:
105+
### 8. Evaluate the trained network
73106

74-
```
107+
```python
75108
deeplabcut.evaluate_network(config_path)
76109
```
77110

78-
Video analysis:
111+
Inspect the evaluation results before moving on to video analysis. If pose-estimation
112+
quality is not sufficient, improve the labels, add more training data, or train for
113+
longer before continuing.
79114

80-
```
81-
deeplabcut.analyze_videos(config_path, ["path of video 1", "path of video2", ..])
115+
### 9. Analyze videos
116+
117+
```python
118+
deeplabcut.analyze_videos(
119+
config_path,
120+
video_paths,
121+
)
82122
```
83123

84-
Filter predictions \[OPTIONAL\]:
124+
### 10. Filter predictions
85125

126+
```python
127+
deeplabcut.filterpredictions(
128+
config_path,
129+
video_paths,
130+
)
86131
```
87-
deeplabcut.filterpredictions(config_path, ["path of video 1", "path of video2", ..])
132+
133+
```{note}
134+
Filtering is optional. It can help smooth pose predictions before plotting
135+
trajectories or creating labeled videos.
88136
```
89137

90-
Plot results (trajectories):
138+
### 11. Plot trajectories
91139

92-
```
93-
deeplabcut.plot_trajectories(config_path, ["path of video 1", "path of video2", ..], filtered=True)
140+
```python
141+
deeplabcut.plot_trajectories(
142+
config_path,
143+
video_paths,
144+
filtered=True,
145+
)
94146
```
95147

96-
Create a video:
148+
### 12. Create labeled videos
97149

150+
```python
151+
deeplabcut.create_labeled_video(
152+
config_path,
153+
video_paths,
154+
filtered=True,
155+
)
98156
```
99-
deeplabcut.create_labeled_video(config_path, ["path of video 1", "path of video2", ..], filtered=True)
100-
```
157+
158+
This creates videos with the predicted keypoints overlaid, which is useful for a quick
159+
visual inspection of tracking quality.

0 commit comments

Comments
 (0)