Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions deeplabcut/gui/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,13 @@ def _generate_welcome_page(self):
self.load_project_button.setFixedWidth(200)
self.load_project_button.clicked.connect(self._open_project)

self.run_superanimal_button = QtWidgets.QPushButton("Model Zoo")
self.run_superanimal_button.setFixedWidth(200)
self.run_superanimal_button.clicked.connect(self._goto_superanimal)

self.layout_buttons.addWidget(self.create_project_button)
self.layout_buttons.addWidget(self.load_project_button)
self.layout_buttons.addWidget(self.run_superanimal_button)

self.layout.addLayout(self.layout_buttons)

Expand Down Expand Up @@ -398,6 +403,15 @@ def _open_project(self):
open_project.loaded,
)

def _goto_superanimal(self):
self.tab_widget = QtWidgets.QTabWidget()
self.tab_widget.setContentsMargins(0, 20, 0, 0)
self.modelzoo = ModelZoo(
root=self, parent=None, h1_description="DeepLabCut - Model Zoo"
)
self.tab_widget.addTab(self.modelzoo, "Model Zoo")
self.setCentralWidget(self.tab_widget)

def load_config(self, config):
self.config = config
self.config_loaded.emit()
Expand Down
9 changes: 7 additions & 2 deletions deeplabcut/modelzoo/api/superanimal_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import numpy as np
import pandas as pd
from skimage.util import img_as_ubyte
from sklearn.metrics.pairwise import cosine_similarity
from tqdm import tqdm

from deeplabcut.modelzoo.utils import parse_available_supermodels
Expand Down Expand Up @@ -287,7 +286,13 @@ def video_inference(

# add a temp folder for checkpoint

weight_folder = superanimal_name + "_weights"
weight_folder = str(
Path(dlc_root_path)
/ "pose_estimation_tensorflow"
/ "models"
/ "pretrained"
/ (superanimal_name + "_weights")
)

if superanimal_name in MODELOPTIONS:
if not os.path.exists(weight_folder):
Expand Down
10 changes: 9 additions & 1 deletion deeplabcut/pose_estimation_tensorflow/predict_supermodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,18 @@ def video_inference_superanimal(


"""
from deeplabcut.utils.auxiliaryfunctions import get_deeplabcut_path

for video in videos:
vname = Path(video).stem
modelfolder = superanimal_name + "_" + vname + "_weights"
dlcparent_path = get_deeplabcut_path()
modelfolder = (
Path(dlcparent_path)
/ "pose_estimation_tensorflow"
/ "models"
/ "pretrained"
/ (superanimal_name + "_" + vname + "_weights")
)
adapter = SpatiotemporalAdaptation(
video,
superanimal_name,
Expand Down
2 changes: 1 addition & 1 deletion deeplabcut/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# Licensed under GNU Lesser General Public License v3.0
#

__version__ = "2.3.2"
__version__ = "2.3.3"
VERSION = __version__
2 changes: 1 addition & 1 deletion examples/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rm -r OUT
cd ..
pip uninstall deeplabcut
python3 setup.py sdist bdist_wheel
pip install dist/deeplabcut-2.3.2-py3-none-any.whl
pip install dist/deeplabcut-2.3.3-py3-none-any.whl

cd examples

Expand Down
2 changes: 1 addition & 1 deletion reinstall.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pip uninstall deeplabcut
python3 setup.py sdist bdist_wheel
pip install dist/deeplabcut-2.3.2-py3-none-any.whl
pip install dist/deeplabcut-2.3.3-py3-none-any.whl
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setuptools.setup(
name="deeplabcut",
version="2.3.2",
version="2.3.3",
author="A. & M. Mathis Labs",
author_email="alexander@deeplabcut.org",
description="Markerless pose-estimation of user-defined features with deep learning",
Expand Down Expand Up @@ -69,6 +69,8 @@
"deeplabcut/inference_cfg.yaml",
"deeplabcut/reid_cfg.yaml",
"deeplabcut/pose_estimation_tensorflow/models/pretrained/pretrained_model_urls.yaml",
"deeplabcut/pose_estimation_tensorflow/superanimal_configs/superquadruped.yaml",
"deeplabcut/pose_estimation_tensorflow/superanimal_configs/supertopview.yaml",
"deeplabcut/gui/style.qss",
"deeplabcut/gui/media/logo.png",
"deeplabcut/gui/media/dlc_1-01.png",
Expand Down