Visitar URL original
Add PyTorch🔥 documentation by n-poulsen · Pull Request #2605 · DeepLabCut/DeepLabCut · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
9aa9647
added initial pytorch docs
Jun 7, 2024
76cd889
Update _toc.yml
MMathisLab Jun 7, 2024
f15a09a
Update user_guide.md
MMathisLab Jun 7, 2024
f448dc9
Update architectures.md
MMathisLab Jun 7, 2024
d598a56
Update labelling.md
MMathisLab Jun 7, 2024
b9195b8
Update labelling.md
MMathisLab Jun 7, 2024
4bc8aa1
Update codespell.yml
MMathisLab Jun 7, 2024
fecf7e5
Merge branch 'main' into pytorch_docs
MMathisLab Jun 7, 2024
0a2a1c5
Update README.md
MMathisLab Jun 7, 2024
a4e050f
Update installation.md
MMathisLab Jun 7, 2024
9cdb9f1
Delete conda-environments/DEEPLABCUT_M1.yaml
MMathisLab Jun 7, 2024
198a34e
Update DEEPLABCUT.yaml
MMathisLab Jun 7, 2024
e3a5dfa
Update installation.md
MMathisLab Jun 7, 2024
5a774b9
Update maDLC_UserGuide.md
MMathisLab Jun 7, 2024
9d71c9b
Update ModelZoo.md
MMathisLab Jun 8, 2024
3a5a5a1
Update standardDeepLabCut_UserGuide.md
MMathisLab Jun 8, 2024
a7c49eb
Update standardDeepLabCut_UserGuide.md
MMathisLab Jun 8, 2024
0aa9e28
Update standardDeepLabCut_UserGuide.md
MMathisLab Jun 8, 2024
4bf88d2
Update Overviewof3D.md
MMathisLab Jun 8, 2024
665f2df
Update PROJECT_GUI.md
MMathisLab Jun 8, 2024
a388d28
Update UseOverviewGuide.md
MMathisLab Jun 8, 2024
c0028c0
Update beginners-guide.md
MMathisLab Jun 8, 2024
329ce71
Update intro.md
MMathisLab Jun 8, 2024
c1aaa84
Update architectures.md
MMathisLab Jun 8, 2024
16e4386
Update architectures.md
MMathisLab Jun 8, 2024
894e3b4
Merge branch 'main' into pytorch_docs
MMathisLab Jun 8, 2024
680f353
Create course.md
MMathisLab Jun 8, 2024
09bd63e
Update _toc.yml
MMathisLab Jun 8, 2024
d29e7c4
Update manage-project.md
MMathisLab Jun 8, 2024
34a7b5a
Update beginners-guide.md
MMathisLab Jun 8, 2024
20d0bca
Update manage-project.md
MMathisLab Jun 8, 2024
f2336cc
Update _toc.yml
MMathisLab Jun 8, 2024
7a3e0ea
Rename labelling.md to labeling.md
MMathisLab Jun 8, 2024
4802d4f
Update Training-Evaluation.md
MMathisLab Jun 8, 2024
1de7232
Update video-analysis.md
MMathisLab Jun 8, 2024
77ea994
Update architectures.md
MMathisLab Jun 8, 2024
73cd31a
Update architectures.md
MMathisLab Jun 8, 2024
8483175
Update AUTHORS
MMathisLab Jun 8, 2024
518909a
Update architectures.md
MMathisLab Jun 8, 2024
82132e1
doc clean up, tested local build
MMathisLab Jun 8, 2024
0197ba4
Update beginners-guide.md
MMathisLab Jun 8, 2024
e91ee09
Update ModelZoo.md
MMathisLab Jun 8, 2024
daf2f87
Update ModelZoo.md
MMathisLab Jun 8, 2024
2a8949b
Update ModelZoo.md
MMathisLab Jun 8, 2024
9a1f28a
Update ModelZoo.md
MMathisLab Jun 8, 2024
02d71df
Update README.md
MMathisLab Jun 8, 2024
0499825
Update ModelZoo.md
MMathisLab Jun 8, 2024
83db9af
Update ModelZoo.md
MMathisLab Jun 8, 2024
14bbee0
Update AUTHORS
MMathisLab Jun 10, 2024
aa3c82d
Update README.md
MMathisLab Jun 11, 2024
fec76d8
Merge branch 'main' into pytorch_docs
MMathisLab Jun 11, 2024
5927e26
Update installation.md
MMathisLab Jun 12, 2024
3cfb0a8
Update DEEPLABCUT.yaml
MMathisLab Jun 12, 2024
bd212aa
Update DEEPLABCUT.yaml
MMathisLab Jun 12, 2024
a6c9318
Update AUTHORS
MMathisLab Jun 13, 2024
63898d7
fixed typos
Jun 13, 2024
7a33b74
Update python-package.yml
MMathisLab Jun 13, 2024
62ca76b
Update README.md
MMathisLab Jun 14, 2024
7c0a5c1
Update beginners-guide.md
MMathisLab Jun 14, 2024
8dfd1e6
Update user_guide.md
MMathisLab Jun 14, 2024
f6ba9d3
m1 for tf only
MMathisLab Jun 14, 2024
093c424
Merge branch 'main' into pytorch_docs
MMathisLab Jun 14, 2024
aeccccb
Update README.md
MMathisLab Jun 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update architectures.md
  • Loading branch information
MMathisLab authored Jun 7, 2024
commit f448dc9c4c66a8d62d315a65cd70904a1d47b2db
53 changes: 28 additions & 25 deletions docs/pytorch/architectures.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(dlc3-architectures)=
# DeepLabCut - PyTorch Model Architectures
# DeepLabCut 3.0 - PyTorch Model Architectures

## Introduction

Expand All @@ -10,21 +10,42 @@ from deeplabcut.pose_estimation_pytorch import available_models
print(available_models())
```

## Backbones
## Backbones (neural networks)

Two families of backbones are currently implemented in DeepLabCut PyTorch (more will
come soon!).
Several backbones are currently implemented in DeepLabCut PyTorch (more will come, and you can add more easily in our new model registry).

**ResNets**
- From [He, Kaiming, et al. "Deep residual learning for image recognition." Proceedings of the IEEE conference on computer vision and pattern recognition. 2016.](https://openaccess.thecvf.com/content_cvpr_2016/html/He_Deep_Residual_Learning_CVPR_2016_paper.html)
- From [He, Kaiming, et al. "Deep residual learning for image recognition." Proceedings of the IEEE conference on Computer Vision and Pattern Recognition. 2016.](https://openaccess.thecvf.com/content_cvpr_2016/html/He_Deep_Residual_Learning_CVPR_2016_paper.html)
- Current variants are `resnet_50` and `resnet_101`

**HRNet**
- From [Wang, Jingdong, et al. "Deep high-resolution representation learning for visual recognition." IEEE transactions on pattern analysis and machine intelligence 43.10 (2020): 3349-3364.](https://arxiv.org/abs/1908.07919)
- Variants are `hrnet_w18`, `hrnet_w32` and `hrnet_w48`
- Slower but more powerful than ResNets

## Single Animal Models
**DEKR**
- From [Geng, Sun et al. "Bottom-Up Human Pose Estimation Via Disentangled Keypoint Regression." Proceedings of the IEEE conference on Computer Vision and Pattern Recognition. 2021.](https://openaccess.thecvf.com/content/CVPR2021/papers/Geng_Bottom-Up_Human_Pose_Estimation_via_Disentangled_Keypoint_Regression_CVPR_2021_paper.pdf)
- This model uses HRNet as a backbone. It learns to predict the center of each animal, and predicts the offset between each animal center and their keypoints.
- Three variants are implemented (from smallest to largest): `dekr_w18`, `dekr_w32`, `dekr_w48`
- Note, this is a powerful multi-animal model but very heavy (slow).

**BUTCTD**
- From [Zhou, Stoffl, Mathis, Mathis. "Rethinking Pose Estimation in Crowds: Overcoming the Detection Information Bottleneck and Ambiguity." Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV). 2023](https://openaccess.thecvf.com/content/ICCV2023/papers/Zhou_Rethinking_Pose_Estimation_in_Crowds_Overcoming_the_Detection_Information_Bottleneck_ICCV_2023_paper.pdf)
- [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/rethinking-pose-estimation-in-crowds/pose-estimation-on-crowdpose)](https://paperswithcode.com/sota/pose-estimation-on-crowdpose?p=rethinking-pose-estimation-in-crowds)
- Variants are `BUCTD-hrnet_w32` and `BUCTD-w48`
- This is a top-performing mutli-animal (or humans, which are also animals) method that can be used with other architectures.

**DLCRNet**
- From [Lauer, Zhou, et al. "Multi-animal pose estimation, identification and tracking with DeepLabCut." Nature Methods 19.4 (2022): 496-504.](https://www.nature.com/articles/s41592-022-01443-0)
- This model uses a multi-scale variant of a ResNet as a backbone, and part-affinity fields to assemble individuals
- Variants: `dlcrnet_stride16_ms5`, `dlcrnet_stride32_ms5

**AnimalTokenPose**
- Adapted from [Li, Yanjie, et al. "Tokenpose: Learning keypoint tokens for human pose estimation." Proceedings of the IEEE/CVF International conference on computer vision. 2021.](https://arxiv.org/abs/2104.03516) as in Ye et al. "SuperAnimal pretrained pose estimation models for behavioral analysis." Nature Communications. 2024](https://arxiv.org/abs/2203.07436)
- One variant is implemented as: `animal_tokenpose_base`


## Information on Single Animal Models

Single-animal models are composed of a backbone (encoder) and a head (decoder)
predicting the position of keypoints. The default head contains a single deconvolutional
Expand All @@ -37,7 +58,7 @@ but it might improve performance), you can simply edit your `pytorch_config.yaml

Of course, any multi-animal model can also be used for single-animal projects!

## Multi-Animal Models
## Information on Multi-Animal Models

### Backbones with Part-Affinity Fields

Expand All @@ -64,21 +85,3 @@ for pose estimation. It's also possible to add deconvolutional layers to top-dow
heads.

Example top-down models would be `top_down_resnet_50` and `top_down_hrnet_w32`.

### Special Architectures

**Bottom-Up models**
- DEKR: Bottom-Up Human Pose Estimation via Disentangled Keypoint Regression
- [Geng, Zigang, et al. "Bottom-up human pose estimation via disentangled keypoint regression." Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2021.](https://openaccess.thecvf.com/content/CVPR2021/html/Geng_Bottom-Up_Human_Pose_Estimation_via_Disentangled_Keypoint_Regression_CVPR_2021_paper.html)
- This model uses HRNet as a backbone. It learns to predict the center of each animal, and predicts the offset between each animal center and their keypoints.
- Three variants are implemented (from smallest to largest): `dekr_w18`, `dekr_w32`, `dekr_w48`
- DLCRNet:
- [Lauer, Jessy, et al. "Multi-animal pose estimation, identification and tracking with DeepLabCut." Nature Methods 19.4 (2022): 496-504.](https://www.nature.com/articles/s41592-022-01443-0)
- This model uses a multi-scale variant of a ResNet as a backbone, and part-affinity
fields to assemble individuals
- Variants: `dlcrnet_stride16_ms5`, `dlcrnet_stride32_ms5`

**Top-Down models**
- Tokenpose: Learning Keypoint Tokens for Human Pose Estimation
- [Li, Yanjie, et al. "Tokenpose: Learning keypoint tokens for human pose estimation." Proceedings of the IEEE/CVF International conference on computer vision. 2021.](https://arxiv.org/abs/2104.03516)
- One variant is implemented: `tokenpose_base`