Skip to content

Commit e1d2b25

Browse files
maximpavlivn-poulsenMMathisLab
authored
[WIP] DLC 3.0 - Review documentation (#2881)
* Updates to the documentation - Maxim (#2869) * Updates to the docs (#2871) * add more docs in single animal userguide * unify train_network docs * unify train_network docs * improved augmentation code * remove link to 3mice TF Colab on homepage * Update readme and conda env * Update readme * docs/pytorch/user_guide Installation: point to docs/installation * Standardize subtitiles accross single and multi user guides * Add missing docstring * improved installation docs * added quick commands * improved docs * install torch and torchvision with pip in the DeepLabCut Conda file * updated labelling in userguides * Update DEEPLABCUT.yaml * install deeplabcut through the pre-release --------- Co-authored-by: Niels <45132115+n-poulsen@users.noreply.github.com> Co-authored-by: Niels Poulsen <niels.poulsen@epfl.ch> Co-authored-by: Mackenzie Mathis <mathis@rowland.harvard.edu>
1 parent d149913 commit e1d2b25

55 files changed

Lines changed: 2017 additions & 919 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish-book.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14-
- name: Set up Python 3.9
14+
- name: Set up Python 3.10
1515
uses: actions/setup-python@v4
1616
with:
17-
python-version: 3.9
17+
python-version: 3.10
1818

1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
22-
python -m pip install .[tf,docs]
22+
python -m pip install .[docs]
2323
pip install jupyter-book sphinxcontrib-mermaid
2424
2525
- name: Build the book

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,24 @@
6060

6161
Please click the link above for all the information you need to get started! Please note that currently we support only Python 3.10+ (see conda files for guidance).
6262

63-
Developers Stable Release:
64-
- Very quick start: You need to have TensorFlow installed (up to v2.10 supported across platforms) `pip install "deeplabcut[gui,tf]"` that includes all functions plus GUIs, or `pip install deeplabcut[tf]` (headless version with PyTorch and TensorFlow).
65-
66-
Developers Alpha Release:
67-
- We also have an alpha release of PyTorch DeepLabCut available! [Please see here for instructions and information](https://github.com/DeepLabCut/DeepLabCut/blob/pytorch_docs/docs/pytorch/user_guide.md).
63+
Developers Stable Release: very quick start (Python 3.10+ required) to install
64+
DeepLabCut with the PyTorch engine
65+
66+
- [Install PyTorch](https://pytorch.org/get-started/locally/) (**select the desired
67+
CUDA version if you want to use a GPU**): `pip install torch torchvision`
68+
- Then, [install `pytables`](https://www.pytables.org/usersguide/installation.html): `conda install -c conda-forge pytables==3.8.0`
69+
- Finally, install `DeepLabCut` (with all functions + the GUI):
70+
`pip install --pre "deeplabcut[gui]"` or `pip install --pre "deeplabcut"` (headless
71+
version with PyTorch)!
72+
73+
To use the TensorFlow engine (requires Python 3.10; TF up to v2.10 supported on Windows,
74+
up to v2.12 on other platforms): you'll need to run `pip install "deeplabcut[gui,tf]"`
75+
(which includes all functions plus GUIs) or `pip install "deeplabcut[tf]"` (headless
76+
version with PyTorch and TensorFlow).
6877

6978
We recommend using our conda file, see [here](https://github.com/DeepLabCut/DeepLabCut/blob/main/conda-environments/README.md) or the new [`deeplabcut-docker` package](https://github.com/DeepLabCut/DeepLabCut/tree/main/docker).
7079

71-
# [Documentation: The DeepLabCut Process](https://deeplabcut.github.io/DeepLabCut)
80+
# [Documentation: The DeepLabCut Process](https://deeplabcut.github.io/DeepLabCut/README.html)
7281

7382
Our docs walk you through using DeepLabCut, and key API points. For an overview of the toolbox and workflow for project management, see our step-by-step at [Nature Protocols paper](https://doi.org/10.1038/s41596-019-0176-0).
7483

@@ -82,9 +91,7 @@ For a deeper understanding and more resources for you to get started with Python
8291

8392
🐭 pose tracking of single animals demo [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DeepLabCut/DeepLabCut/blob/master/examples/COLAB/COLAB_DEMO_mouse_openfield.ipynb)
8493

85-
🐭🐭🐭 pose tracking of multiple animals demo [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DeepLabCut/DeepLabCut/blob/master/examples/COLAB/COLAB_3miceDemo.ipynb)
86-
87-
- See [more demos here](https://github.com/DeepLabCut/DeepLabCut/blob/main/examples/README.md). We provide data and several Jupyter Notebooks: one that walks you through a demo dataset to test your installation, and another Notebook to run DeepLabCut from the beginning on your own data. We also show you how to use the code in Docker, and on Google Colab.
94+
See [more demos here](https://github.com/DeepLabCut/DeepLabCut/blob/main/examples/README.md). We provide data and several Jupyter Notebooks: one that walks you through a demo dataset to test your installation, and another Notebook to run DeepLabCut from the beginning on your own data. We also show you how to use the code in Docker, and on Google Colab.
8895

8996
# Why use DeepLabCut?
9097

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ only_build_toc_files: true
55

66
sphinx:
77
config:
8-
autodoc_mock_imports: ["wx"]
8+
autodoc_mock_imports: ["wx", "matplotlib", "qtpy", "PySide6", "napari", "shiboken6"]
99
mermaid_output_format: raw
1010
extra_extensions:
1111
- numpydoc

_toc.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,8 @@ parts:
4646
chapters:
4747
- file: docs/ModelZoo
4848
- file: docs/recipes/UsingModelZooPupil
49-
- file: docs/recipes/MegaDetectorDLCLive
5049
- caption: 🧑‍🍳 Cookbook (detailed helper guides)
5150
chapters:
52-
- file: docs/tutorial
5351
- file: docs/convert_maDLC
5452
- file: docs/recipes/OtherData
5553
- file: docs/recipes/io

conda-environments/DEEPLABCUT.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@
99
#Licensed under GNU Lesser General Public License v3.0
1010
#
1111
# DeepLabCut environment
12-
# FIRST: INSTALL CORRECT DRIVER for GPU, see https://stackoverflow.com/questions/30820513/what-is-the-correct-version-of-cuda-for-my-nvidia-driver/30820690
1312
#
14-
# AFTER THIS FILE IS INSTALLED, if you have a GPU be sure to install cudnn from conda-forge: conda install cudnn -c conda-forge
13+
# FIRST: If you have an NVIDIA GPU and want to use it, check that you have drivers installed!
14+
# To check if your GPUs are visible to PyTorch (and thus DeepLabCut), run:
15+
# >>> python -c "import torch; print(torch.cuda.is_available())"
16+
#
17+
# If "False" is printed, PyTorch (and thus DeepLabCut) cannot access your GPU. For
18+
# more information, see: https://pytorch.org/get-started/locally/
1519
#
1620
# install: conda env create -f DEEPLABCUT.yaml
1721
# update: conda env update -f DEEPLABCUT.yaml
@@ -29,4 +33,6 @@ dependencies:
2933
- ffmpeg
3034
- pytables==3.8.0
3135
- pip:
36+
- torch
37+
- torchvision
3238
- "git+https://github.com/DeepLabCut/DeepLabCut.git@pytorch_dlc#egg=deeplabcut[gui,modelzoo,wandb]"

conda-environments/DEEPLABCUT_M1.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.

deeplabcut/refine_training_dataset/outlier_frames.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def extract_outlier_frames(
235235
outlieralgorithm: str, optional, default="jump".
236236
String specifying the algorithm used to detect the outliers.
237237
238-
* ``'Fitting'`` fits a Auto Regressive Integrated Moving Average model to the
238+
* ``'fitting'`` fits an Auto Regressive Integrated Moving Average model to the
239239
data and computes the distance to the estimated data. Larger distances than
240240
epsilon are then potentially identified as outliers
241241
* ``'jump'`` identifies larger jumps than 'epsilon' in any body part

deeplabcut/utils/visualization.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
1818
Licensed under GNU Lesser General Public License v3.0
1919
"""
20+
from __future__ import annotations
2021

2122
import os
2223
from pathlib import Path

docs/Governance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(governance-model)=
22
# Governance Model of DeepLabCut
3-
(adapted from https://napari.org/docs/_sources/developers/GOVERNANCE.md.txt)
3+
(adapted from https://napari.org/stable/community/governance.html)
44

55
## Abstract
66

@@ -30,7 +30,7 @@ project in concrete ways, such as:
3030
[GitHub pull request](https://github.com/DeepLabCut/DeepLabCut/pulls);
3131
- reporting issues on our
3232
[GitHub issues page](https://github.com/DeepLabCut/DeepLabCut/issues);
33-
- proposing a change to the documentation (http://docs.deeplabcut.org) via a
33+
- proposing a change to the [documentation](https://deeplabcut.github.io/DeepLabCut/README.html) via a
3434
GitHub pull request;
3535
- discussing the design of the `DeepLabCut` or its tutorials on in existing
3636
[issues](https://github.com/DeepLabCut/DeepLabCut/issues) and
@@ -43,7 +43,7 @@ among other possibilities. Any community member can become a contributor, and
4343
all are encouraged to do so. By contributing to the project, community members
4444
can directly help to shape its future.
4545

46-
Contributors are encouraged to read the [contributing guide](https://github.com/DeepLabCut/DeepLabCut/CONTRIBUTING.md).
46+
Contributors are encouraged to read the [contributing guide](https://github.com/DeepLabCut/DeepLabCut/blob/main/CONTRIBUTING.md).
4747

4848
### Core developers
4949

docs/MISSION_AND_VALUES.md

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,74 @@
33

44
This document is meant to help guide decisions about the future of `DeepLabCut`, be it in terms of
55
whether to accept new functionality, changes to the styling of the code or graphical user interfaces (GUI),
6-
or whether to take on new dependencies, when to break into other repos, among other things. It serves as a point of reference for core developers actively working on the project, and an introduction for
6+
or whether to take on new dependencies, when to break into other repos, among other things. It serves as a point of
7+
reference for core developers actively working on the project, and an introduction for
78
newcomers who want to learn a little more about where the project is going and what the team's
8-
values are. You can also learn more about how the project is managed by looking at our [governance model](governance-model).
9+
values are. You can also learn more about how the project is managed by looking at our
10+
[governance model](governance-model).
911

1012
## Our founding principles
1113

12-
The founding DeepLabCut team came together around a shared vision for building the first open-source animal pose estimation framework
13-
that is:
14+
The founding DeepLabCut team came together around a shared vision for building the first open-source animal pose
15+
estimation framework that is:
1416

1517
- user defined pose estimation - i.e. species or object agnostic.
1618
- access to SOTA deep learning models that can be swiftly re-trained for customized applications
1719
- fast (GPU-powered)
1820
- scalable (project focused for ease of portability and sharability)
1921

2022

21-
As the project has grown we've turned these original principles into the mission statement and set of values that we described below.
23+
As the project has grown we've turned these original principles into the mission statement and set of values that we
24+
described below.
2225

2326
## Our mission
2427

25-
DeepLabCut aims to be **the animal pose software package for Python** and to **provide access to deep learning-based pose estimation for people to use in their daily work** without the need to be able to program in a deep learning framework.
26-
We hope to accomplish this by:
28+
DeepLabCut aims to be **the animal pose software package for Python** and to **provide access to deep learning-based
29+
pose estimation for people to use in their daily work** without the need to be able to program in a deep learning
30+
framework. We hope to accomplish this by:
2731

28-
- being **easy to use and install**. We are careful in taking on new dependencies, sometimes making them optional, and aim support a fully (Python) packaged installation that works cross-platform.
32+
- being **easy to use and install**. We are careful in taking on new dependencies, sometimes making them optional, and
33+
aim support a fully (Python) packaged installation that works cross-platform.
2934

30-
- being **well-documented** with **comprehensive tutorials and examples**. All functions in our API have thorough docstrings clarifying expected inputs and outputs, and we maintain a separate [tutorials and information website](http://deeplabcut.org).
35+
- being **well-documented** with **comprehensive tutorials and examples**. All functions in our API have thorough
36+
docstrings clarifying expected inputs and outputs, and we maintain a separate
37+
[tutorials and information website](http://deeplabcut.org).
3138

3239
- providing **GUI access** to all critical functionality so DeepLabCut can be used by people without coding experience.
3340

3441
- being **interactive** and **highly performant** in order to support large data pipelines.
3542

36-
- providing a **consistent and stable API** to enable plugin developers to build on top of DeepLabCut without their code constantly breaking and to enable advanced users to build out sophisticated Python workflows, if needed.
43+
- providing a **consistent and stable API** to enable plugin developers to build on top of DeepLabCut without their
44+
code constantly breaking and to enable advanced users to build out sophisticated Python workflows, if needed.
3745

38-
- **ensuring correctness**. We strive for complete test coverage of both the code and GUI, with all code reviewed by a core developer before being included in the repository.
46+
- **ensuring correctness**. We strive for complete test coverage of both the code and GUI, with all code reviewed by a
47+
core developer before being included in the repository.
3948

4049
## Our values
4150

42-
- We are **inclusive**. We welcome newcomers who are making their first contribution and strive to grow our most dedicated contributors into [core developers](https://github.com/orgs/DeepLabCut/teams/core-developers). We have a [Code of Conduct](https://github.com/DeepLabCut/DeepLabCut/CODE_OF_CONDUCT.md) to make DeepLabCut
51+
- We are **inclusive**. We welcome newcomers who are making their first contribution and strive to grow our most
52+
dedicated contributors into [core developers](https://github.com/orgs/DeepLabCut/teams/core-developers).
53+
We have a [Code of Conduct](https://github.com/DeepLabCut/DeepLabCut/blob/main/CODE_OF_CONDUCT.md) to make DeepLabCut
4354
a welcoming place for all.
4455

45-
- We are **community-engaged**. We respond to feature requests and proposals on our [issue tracker](https://github.com/DeepLabCut/DeepLabCut/issues).
56+
- We are **community-engaged**. We respond to feature requests and proposals on our
57+
- [issue tracker](https://github.com/DeepLabCut/DeepLabCut/issues).
4658

47-
- We serve **scientific applications** primarily, over “consumer or commercial” pose estimation tools. This often means prioritizing core functionality support, and rejecting implementations of “flashy” features that have little scientific value.
59+
- We serve **scientific applications** primarily, over “consumer or commercial” pose estimation tools. This often means
60+
prioritizing core functionality support, and rejecting implementations of “flashy” features that have little
61+
scientific value.
4862

49-
- We are **domain agnostic** within the sciences. Functionality that is highly specific to particular scientific domains belongs in plugins, whereas functionality that cuts across many domains and is likely to be widely used belongs inside DeepLabCut.
63+
- We are **domain agnostic** within the sciences. Functionality that is highly specific to particular scientific
64+
domains belongs in plugins, whereas functionality that cuts across many domains and is likely to be widely used belongs
65+
inside DeepLabCut.
5066

51-
- We value **education and documentation**. All functions should have docstrings, preferably with examples, and major functionality should be explained in our [tutorials](http://deeplabcut.org). Core developers can take an active role in finishing documentation examples.
67+
- We value **education and documentation**. All functions should have docstrings, preferably with examples, and major
68+
functionality should be explained in our [tutorials](http://deeplabcut.org). Core developers can take an active role
69+
in finishing documentation examples.
5270

5371

5472
## Acknowledgements
5573

56-
We share a lot of our mission and values with [`napari`](https://napari.org/docs/developers/MISSION_AND_VALUES.html) and [`scikit-image`](https://scikit-image.org/docs/dev/values.html) and acknowledge the influence of their mission and values statements on this document.
74+
We share a lot of our mission and values with [`napari`](https://napari.org/stable/community/mission_and_values.html)
75+
and [`scikit-image`](https://scikit-image.org/docs/stable/about/values.html) and acknowledge the influence of their
76+
mission and values statements on this document.

0 commit comments

Comments
 (0)