You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,7 @@ The easiest way to get started is to drop a folder (typically a folder from with
49
49
-`E`, to enable edge coloring (by default, if using this in refinement GUI mode, points with a confidence lower than 0.6 are marked
50
50
in red)
51
51
-`F`, to toggle between animal and body part color scheme.
52
+
-`V`, to toggle visibility of the selected layer.
52
53
-`backspace` to delete a point.
53
54
- Check the box "display text" to show the label names on the canvas.
54
55
- To move to another folder, be sure to save (Ctrl+S), then delete the layers, and re-drag/drop the next folder.
@@ -61,6 +62,7 @@ Only when saving segmentation masks does a save file dialog pop up to name the d
61
62
keypoint annotations are otherwise automatically saved in the corresponding folder as `CollectedData_<ScorerName>.h5`.
62
63
- As a reminder, DLC will only use the H5 file; so be sure if you open already labeled images you save/overwrite the H5.
63
64
- Note, before saving a layer, make sure the points layer is selected. If the user clicked on the image(s) layer first, does `Save As`, then closes the window, any labeling work during that session will be lost!
65
+
- Modifying and then saving points in a `machinelabels...` layer will add to or overwrite the existing `CollectedData` layer and will **not** save to the `machinelabels` file.
64
66
65
67
66
68
### Video frame extraction and prediction refinement
@@ -106,13 +108,50 @@ Suggested workflows, depending on the image folder contents:
106
108
3.**Refining labels** – the image folder contains a `machinelabels-iter<#>.h5` file.
107
109
108
110
The process is analog to *2*.
111
+
Open *napari* and open an image folder.
112
+
If the video was originally labeled, *and* had outliers extracted it will contain a `CollectedData_<ScorerName>.h5` file and a `machinelabels-iter<#>.h5` file. In this case, select the `machinelabels` layer in the GUI, and type `e` to show edges. Red indicates likelihood < 0.6. As you navigate through frames, images with labels with edges will need to be refined (moved, deleted, etc). Images with labels without edges will be on the `CollectedData` (previous manual annotations) layer and shouldn't need refining. However, you can switch to that layer and fix errors. You can also right-click on the `CollectedData` layer and select `toggle visibility` to hide that layer. Select the `machinelabels` layer before saving which will append your refined annoations to `CollectedData`.
113
+
114
+
If the folder only had outliers extracted and wasn't originally labeled, it will not have a `CollectedData` layer. Work with the `machinelabels` layer selected to refine annoation positions, then save.
115
+
116
+
In this case, it is not necessary to open the DLC project's `config.yaml` file, as all necessary metadata is read from the `h5` data file.
117
+
118
+
Saving works as described in *1*.
109
119
110
120
4.**Drawing segmentation masks**
111
121
112
122
Drop an image folder as in *1*, manually add a *shapes layer*. Then select the *rectangle* in the layer controls (top left pane),
113
123
and start drawing rectangles over the images. Masks and rectangle vertices are saved as described in [Save Layers](#save-layers).
114
124
Note that masks can be reloaded and edited at a later stage by dropping the `vertices.csv` file onto the canvas.
115
125
126
+
### Workflow flowchart
127
+
128
+
```mermaid
129
+
%%{init: {"flowchart": {"htmlLabels": false}} }%%
130
+
graph TD
131
+
id1[What stage of labeling?]
132
+
id2[deeplabcut.label_frames]
133
+
id3[deeplabcut.refine_labels]
134
+
id4[Add labels to, or modify in, \n `CollectedData...` layer and save that layer]
135
+
id5[Modify labels in `machinelabels` layer and save \n which will create a `CollectedData...` file]
136
+
id6[Have you refined some labels from the most recent iteration and saved already?]
137
+
id7["All extracted frames are already saved in `CollectedData...`.
138
+
1. Hide or trash all `machinelabels` layers.
139
+
2. Then modify in and save `CollectedData`"]
140
+
id8["
141
+
1. hide or trash all `machinelabels` layers except for the most recent.
142
+
2. Select most recent `machinelabels` and hit `e` to show edges.
143
+
3. Modify only in `machinelabels` and skip frames with labels without edges shown.
144
+
4. Save `machinelabels` layer, which will add data to `CollectedData`.
145
+
- If you need to revisit this video later, ignore `machinelabels` and work only in `CollectedData`"]
146
+
147
+
id1 -->|I need to manually label new frames \n or fix my labels|id2
148
+
id1 ---->|I need to refine outlier frames \nfrom analyzed videos|id3
149
+
id2 -->id4
150
+
id3 -->|I only have a `machinelabels...` file|id5
151
+
id3 ---->|I have both `machinelabels` and `CollectedData` files|id6
0 commit comments