Skip to content

Commit 21db191

Browse files
committed
updated README. fix tests.
1 parent 5a22726 commit 21db191

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ listed using the `dlclibrary.get_available_detectors` and
5151

5252
## How to add a new model?
5353

54+
### TensorFlow models
55+
5456
Pick a good model_name. Follow the (novel) naming convention (modeltype_species), e.g. ```superanimal_topviewmouse```.
5557

5658
1. Add the model_name with path and commit ID to: https://github.com/DeepLabCut/DLClibrary/blob/main/dlclibrary/dlcmodelzoo/modelzoo_urls.yaml
@@ -59,3 +61,30 @@ Pick a good model_name. Follow the (novel) naming convention (modeltype_species)
5961
https://github.com/DeepLabCut/DLClibrary/blob/main/dlclibrary/dlcmodelzoo/modelzoo_download.py#L15
6062

6163
3. For superanimal models also fill in the configs!
64+
65+
### PyTorch models (for `deeplabcut >= 3.0.0`)
66+
67+
PyTorch models are listed in [`dlclibrary/dlcmodelzoo/modelzoo_urls_pytorch.yaml`](
68+
https://github.com/DeepLabCut/DLClibrary/blob/main/dlclibrary/dlcmodelzoo/modelzoo_urls_pytorch.yaml
69+
). The file is organized as:
70+
71+
```yaml
72+
my_cool_dataset: # name of the dataset used to train the model
73+
detectors:
74+
detector_name: path/to/huggingface-detector.pt # add detectors under `detector`
75+
pose_models:
76+
pose_model_name: path/to/huggingface-pose-model.pt # add pose models under `pose_models`
77+
other_pose_model_name: path/to/huggingface-other-pose-model.pt
78+
```
79+
80+
This will allow users to download the models using the format `datatsetName_modelName`,
81+
i.e. for this example 3 models would be available: `my_cool_dataset_detector_name`,
82+
`my_cool_dataset_pose_model_name` and `my_cool_dataset_other_pose_model_name`.
83+
84+
To add a new model for `deeplabcut >= 3.0.0`, simply:
85+
86+
- add a new line under detectors or pose models if the dataset is already defined
87+
- add the structure if the model was trained on a new dataset
88+
89+
The models will then be listed when calling `dlclibrary.get_available_detectors` or
90+
`dlclibrary.get_available_models`!

dlclibrary/dlcmodelzoo/modelzoo_download.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"mouse_pupil_vclose",
2929
"horse_sideview",
3030
"full_macaque",
31-
"superanimal_bird",
3231
"superanimal_quadruped",
3332
"superanimal_topviewmouse",
3433
]

0 commit comments

Comments
 (0)