[](README.md)
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>[](https://www.gnu.org/licenses/lgpl-3.0)
# DLClibrary
DLClibrary is a lightweight library supporting universal functions for the [DeepLabCut](https://github.com/DeepLabCut/DeepLabCut) ecosystem.
Supported functions (at this point):
- API for downloading model weights from [the model zoo](http://www.mackenziemathislab.org/dlc-modelzoo)
# Quick start
## Install
The package can be installed using `pip`:
```bash
pip install dlclibrary
```
:warning: warning, the closely named package `dlclib` is not an official DeepLabCut product. :warning:
## Example Usage
Downloading a pretrained model from the model zoo:
```python
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)
```
## How to add a new model?
Pick a good model_name. Follow the (novel) naming convention (modeltype_species), e.g. ```superanimal_topviewmouse```.
1. Add the model_name with path and commit ID to: https://github.com/DeepLabCut/DLClibrary/blob/main/dlclibrary/dlcmodelzoo/modelzoo_urls.yaml
2. Add the model name to the constant: MODELOPTIONS
https://github.com/DeepLabCut/DLClibrary/blob/main/dlclibrary/dlcmodelzoo/modelzoo_download.py#L15
3. For superanimal models also fill in the configs!
Raw data
{
"_id": null,
"home_page": "https://github.com/DeepLabCut/DLClib",
"name": "dlclibrary",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "A. & M. Mathis Labs",
"author_email": "alexander@deeplabcut.org",
"download_url": "https://files.pythonhosted.org/packages/d2/8e/fb3f4f724eb6abf279b525301adece4b5640ce3254c878c6b25d2e650048/dlclibrary-0.0.5.tar.gz",
"platform": null,
"description": "[](README.md)\n<a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"></a>[](https://www.gnu.org/licenses/lgpl-3.0)\n\n# DLClibrary\n\nDLClibrary is a lightweight library supporting universal functions for the [DeepLabCut](https://github.com/DeepLabCut/DeepLabCut) ecosystem.\n\nSupported functions (at this point):\n\n- API for downloading model weights from [the model zoo](http://www.mackenziemathislab.org/dlc-modelzoo)\n\n# Quick start\n\n## Install\n\nThe package can be installed using `pip`:\n\n```bash\npip install dlclibrary\n```\n\n:warning: warning, the closely named package `dlclib` is not an official DeepLabCut product. :warning:\n\n## Example Usage\n\nDownloading a pretrained model from the model zoo:\n\n```python\nfrom pathlib import Path\nfrom dlclibrary import download_huggingface_model\n\n# Creates a folder and downloads the model to it\nmodel_dir = Path(\"./superanimal_quadruped_model\")\nmodel_dir.mkdir()\ndownload_huggingface_model(\"superanimal_quadruped\", model_dir)\n```\n\n## How to add a new model?\n\nPick a good model_name. Follow the (novel) naming convention (modeltype_species), e.g. ```superanimal_topviewmouse```. \n\n1. Add the model_name with path and commit ID to: https://github.com/DeepLabCut/DLClibrary/blob/main/dlclibrary/dlcmodelzoo/modelzoo_urls.yaml\n\n2. Add the model name to the constant: MODELOPTIONS\nhttps://github.com/DeepLabCut/DLClibrary/blob/main/dlclibrary/dlcmodelzoo/modelzoo_download.py#L15\n\n3. For superanimal models also fill in the configs!\n",
"bugtrack_url": null,
"license": "",
"summary": "Lightweight library supporting universal functions for the DeepLabCut ecosystem",
"version": "0.0.5",
"project_urls": {
"Homepage": "https://github.com/DeepLabCut/DLClib"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e2f9bdbd8c557242a2adf140198e4530ac58abc42d74f9f810ba07a478d808a0",
"md5": "9bb77b544d40ef2d85934327be5522af",
"sha256": "185e4f7c93c439987bc75a5e8e4c48551c40fd7ccd35b5feff2ca08bb565745f"
},
"downloads": -1,
"filename": "dlclibrary-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9bb77b544d40ef2d85934327be5522af",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 14911,
"upload_time": "2023-12-18T20:51:19",
"upload_time_iso_8601": "2023-12-18T20:51:19.649732Z",
"url": "https://files.pythonhosted.org/packages/e2/f9/bdbd8c557242a2adf140198e4530ac58abc42d74f9f810ba07a478d808a0/dlclibrary-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d28efb3f4f724eb6abf279b525301adece4b5640ce3254c878c6b25d2e650048",
"md5": "53229c35952f77b0192bfb35420356c0",
"sha256": "321303ae8b54b00fc79431d14b68f5c55a77989b57fa1ad71a1ed254c1794ded"
},
"downloads": -1,
"filename": "dlclibrary-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "53229c35952f77b0192bfb35420356c0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9855,
"upload_time": "2023-12-18T20:51:21",
"upload_time_iso_8601": "2023-12-18T20:51:21.735785Z",
"url": "https://files.pythonhosted.org/packages/d2/8e/fb3f4f724eb6abf279b525301adece4b5640ce3254c878c6b25d2e650048/dlclibrary-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-18 20:51:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DeepLabCut",
"github_project": "DLClib",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "dlclibrary"
}