DLClibrary is a lightweight library supporting universal functions for the DeepLabCut ecosystem.
Supported functions (at this point):
- API for downloading model weights from the model zoo
The package can be installed using pip
:
pip install dlclibrary
dlclib
is not an official DeepLabCut product.
Downloading a pretrained model from the model zoo:
from pathlib import Path
from dlclibrary import download_huggingface_model
# Creates a folder and downloads the model to it
model_dir = Path("./superanimal_quadruped_model")
model_dir.mkdir()
download_huggingface_model("superanimal_quadruped", model_dir)
Pick a good model_name. Follow the (novel) naming convention (modeltype_species), e.g. superanimal_topviewmouse
.
-
Add the model_name with path and commit ID to: https://github.com/DeepLabCut/DLClibrary/blob/main/dlclibrary/dlcmodelzoo/modelzoo_urls.yaml
-
Add the model name to the constant: MODELOPTIONS https://github.com/DeepLabCut/DLClibrary/blob/main/dlclibrary/dlcmodelzoo/modelzoo_download.py#L15
-
For superanimal models also fill in the configs!