-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from DeepLabCut/niels/sa_detectors
SuperAnimal Model Updates
- Loading branch information
Showing
6 changed files
with
145 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# DeepLabCut 3.0: SuperAnimal detectors and pose model URLS | ||
|
||
superanimal_bird: | ||
detectors: | ||
fasterrcnn_mobilenet_v3_large_fpn: DeepLabCut/DeepLabCutModelZoo-SuperAnimal-Bird/superanimal_bird_fasterrcnn_mobilenet_v3_large_fpn.pt | ||
ssdlite: DeepLabCut/DeepLabCutModelZoo-SuperAnimal-Bird/superanimal_bird_ssdlite.pt | ||
pose_models: | ||
resnet_50: DeepLabCut/DeepLabCutModelZoo-SuperAnimal-Bird/superanimal_bird_resnet_50.pt | ||
|
||
superanimal_topviewmouse: | ||
detectors: | ||
fasterrcnn_mobilenet_v3_large_fpn: mwmathis/DeepLabCutModelZoo-SuperAnimal-TopViewMouse/superanimal_topviewmouse_fasterrcnn_mobilenet_v3_large_fpn.pt | ||
fasterrcnn_resnet50_fpn_v2: mwmathis/DeepLabCutModelZoo-SuperAnimal-TopViewMouse/superanimal_topviewmouse_fasterrcnn_resnet50_fpn_v2.pt | ||
pose_models: | ||
hrnet_w32: mwmathis/DeepLabCutModelZoo-SuperAnimal-TopViewMouse/superanimal_topviewmouse_hrnet_w32.pt | ||
resnet_50: mwmathis/DeepLabCutModelZoo-SuperAnimal-TopViewMouse/superanimal_topviewmouse_resnet_50.pt | ||
|
||
superanimal_quadruped: | ||
detectors: | ||
fasterrcnn_mobilenet_v3_large_fpn: mwmathis/DeepLabCutModelZoo-SuperAnimal-Quadruped/superanimal_quadruped_fasterrcnn_mobilenet_v3_large_fpn.pt | ||
fasterrcnn_resnet50_fpn_v2: mwmathis/DeepLabCutModelZoo-SuperAnimal-Quadruped/superanimal_quadruped_fasterrcnn_resnet50_fpn_v2.pt | ||
pose_models: | ||
hrnet_w32: mwmathis/DeepLabCutModelZoo-SuperAnimal-Quadruped/superanimal_quadruped_hrnet_w32.pt | ||
resnet_50: mwmathis/DeepLabCutModelZoo-SuperAnimal-Quadruped/superanimal_quadruped_resnet_50.pt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# | ||
# DeepLabCut Toolbox (deeplabcut.org) | ||
# © A. & M.W. Mathis Labs | ||
# https://github.com/DeepLabCut/DeepLabCut | ||
# | ||
# Please see AUTHORS for contributors. | ||
# https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS | ||
# | ||
# Licensed under GNU Lesser General Public License v3.0 | ||
# | ||
import os | ||
import pytest | ||
|
||
import dlclibrary | ||
import dlclibrary.dlcmodelzoo.modelzoo_download as modelzoo | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"data", | ||
[ | ||
("superanimal_bird", ["ssdlite"]), | ||
("superanimal_topviewmouse", ["fasterrcnn_resnet50_fpn_v2"]), | ||
("superanimal_quadruped", ["fasterrcnn_resnet50_fpn_v2"]), | ||
] | ||
) | ||
def test_get_super_animal_detectors(data: tuple[str, list[str]]): | ||
dataset, expected_detectors = data | ||
detectors = modelzoo.get_available_detectors(dataset) | ||
assert len(detectors) >= len(expected_detectors) | ||
for det in expected_detectors: | ||
assert det in detectors | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"data", | ||
[ | ||
("superanimal_bird", ["resnet_50"]), | ||
("superanimal_topviewmouse", ["hrnet_w32"]), | ||
("superanimal_quadruped", ["hrnet_w32"]), | ||
] | ||
) | ||
def test_get_super_animal_pose_models(data: tuple[str, list[str]]): | ||
dataset, expected_pose_models = data | ||
pose_models = modelzoo.get_available_models(dataset) | ||
assert len(pose_models) >= len(expected_pose_models) | ||
for pose_model in expected_pose_models: | ||
assert pose_model in pose_models |