Skip to content

Commit 526a162

Browse files
committed
Merge main into dlclive3
- Package version is copied from main for now, until finalized changes. - don't use subset cpuinfo - updated type hints in benchmark.py as was already implemented in main branch - copied todo's in check_install.py
1 parent ac75b2a commit 526a162

5 files changed

Lines changed: 21 additions & 20 deletions

File tree

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ authors:
5252
date-released: 2020-08-05
5353
doi: "10.7554/eLife.61909"
5454
license: "AGPL-3.0-or-later"
55-
version: "1.0.3"
55+
version: "1.1.0"

dlclive/benchmark.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
Licensed under GNU Lesser General Public License v3.0
66
"""
77

8-
import csv
98
import platform
109
import subprocess
1110
import sys
@@ -261,7 +260,7 @@ def get_system_info() -> dict:
261260
from cpuinfo import get_cpu_info
262261

263262
dev_type = "CPU"
264-
dev = [get_cpu_info()["brand_raw"]]
263+
dev = get_cpu_info()
265264

266265
return {
267266
"host_name": host_name,
@@ -351,24 +350,24 @@ def benchmark(
351350
model_path: str,
352351
model_type: str,
353352
video_path: str,
354-
tf_config=None,
353+
tf_config: "tensorflow.ConfigProto | None" = None,
355354
device: str | None = None,
356355
resize: float | None = None,
357356
pixels: int | None = None,
358357
single_animal: bool = True,
359-
cropping=None,
360-
dynamic=(False, 0.5, 10),
361-
n_frames=1000,
362-
print_rate=False,
358+
cropping: list[int] | None = None,
359+
dynamic: tuple[bool, float, int] = (False, 0.5, 10),
360+
n_frames: int =1000,
361+
print_rate: bool=False,
363362
precision: str = "FP32",
364-
display=True,
365-
pcutoff=0.5,
366-
display_radius=3,
367-
cmap="bmy",
368-
save_dir=None,
369-
save_poses=False,
370-
save_video=False,
371-
draw_keypoint_names=False,
363+
display: bool = True,
364+
pcutoff: float = 0.5,
365+
display_radius: int = 3,
366+
cmap: str = "bmy",
367+
save_dir: str | None = None,
368+
save_poses: bool = False,
369+
save_video: bool = False,
370+
draw_keypoint_names: bool = False,
372371
):
373372
"""
374373
Analyzes a video to track keypoints using a DeepLabCut model, and optionally saves the keypoint data and the labeled video.

dlclive/check_install/check_install.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ def main():
4646
if not display:
4747
print("Running without displaying video")
4848

49-
# make temporary directory in $current
49+
# make temporary directory in $HOME
50+
# TODO: why create this temp directory in $HOME?
5051
print("\nCreating temporary directory...\n")
5152
tmp_dir = Path().home() / "dlc-live-tmp"
5253
tmp_dir.mkdir(mode=0o775, exist_ok=True)
@@ -66,7 +67,7 @@ def main():
6667
if Path(model_dir / SNAPSHOT_NAME).exists():
6768
print("Model already downloaded, using cached version")
6869
else:
69-
print("Downloading a test model from the DeepLabCut Model Zoo...")
70+
print("Downloading superanimal_quadruped model from the DeepLabCut Model Zoo...")
7071
download_huggingface_model(MODEL_NAME, model_dir)
7172

7273
# assert these things exist so we can give informative error messages

dlclive/version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
Licensed under GNU Lesser General Public License v3.0
77
"""
88

9-
__version__ = "3.0.0a0"
9+
10+
__version__ = "1.1.0"
1011
VERSION = __version__

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "deeplabcut-live"
3-
version = "3.0.0a0"
3+
version = "1.1.0"
44
description = "Class to load exported DeepLabCut networks and perform pose estimation on single frames (from a camera feed)"
55
authors = ["A. & M. Mathis Labs <admin@deeplabcut.org>"]
66
license = "AGPL-3.0-or-later"

0 commit comments

Comments
 (0)