@@ -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+
5456Pick a good model_name. Follow the (novel) naming convention (modeltype_species), e.g. ``` superanimal_topviewmouse ``` .
5557
56581 . 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)
5961https://github.com/DeepLabCut/DLClibrary/blob/main/dlclibrary/dlcmodelzoo/modelzoo_download.py#L15
6062
61633 . 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` !
0 commit comments