|
5 | 5 | Licensed under GNU Lesser General Public License v3.0 |
6 | 6 | """ |
7 | 7 |
|
8 | | -import csv |
9 | 8 | import platform |
10 | 9 | import subprocess |
11 | 10 | import sys |
@@ -261,7 +260,7 @@ def get_system_info() -> dict: |
261 | 260 | from cpuinfo import get_cpu_info |
262 | 261 |
|
263 | 262 | dev_type = "CPU" |
264 | | - dev = [get_cpu_info()["brand_raw"]] |
| 263 | + dev = get_cpu_info() |
265 | 264 |
|
266 | 265 | return { |
267 | 266 | "host_name": host_name, |
@@ -351,24 +350,24 @@ def benchmark( |
351 | 350 | model_path: str, |
352 | 351 | model_type: str, |
353 | 352 | video_path: str, |
354 | | - tf_config=None, |
| 353 | + tf_config: "tensorflow.ConfigProto | None" = None, |
355 | 354 | device: str | None = None, |
356 | 355 | resize: float | None = None, |
357 | 356 | pixels: int | None = None, |
358 | 357 | 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, |
363 | 362 | 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, |
372 | 371 | ): |
373 | 372 | """ |
374 | 373 | Analyzes a video to track keypoints using a DeepLabCut model, and optionally saves the keypoint data and the labeled video. |
|
0 commit comments