Skip to content

Commit 9b5d8f1

Browse files
committed
Benchmark pytorch: formatting
1 parent c6ee1ba commit 9b5d8f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dlclive/benchmark_pytorch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ def benchmark(
9090
model_type: str,
9191
device: str,
9292
single_animal: bool,
93+
save_dir=None,
9394
precision: str = "FP32",
9495
display=True,
9596
pcutoff=0.5,
@@ -98,7 +99,6 @@ def benchmark(
9899
cropping=None, # Adding cropping to the function parameters
99100
dynamic=(False, 0.5, 10),
100101
save_poses=False,
101-
save_dir=None,
102102
draw_keypoint_names=False,
103103
cmap="bmy",
104104
get_sys_info=True,
@@ -119,6 +119,9 @@ def benchmark(
119119
Device to run the model on ('cpu' or 'cuda').
120120
single_animal: bool
121121
Whether the video contains only one animal (True) or multiple animals (False).
122+
save_dir : str, optional
123+
Directory to save output data and labeled video.
124+
If not specified, will use the directory of video_path, by default None
122125
precision : str, optional, default='FP32'
123126
Precision type for the model ('FP32' or 'FP16').
124127
display : bool, optional, default=True
@@ -135,9 +138,6 @@ def benchmark(
135138
Parameters for dynamic cropping. If the state is true, then dynamic cropping will be performed. That means that if an object is detected (i.e. any body part > detectiontreshold), then object boundaries are computed according to the smallest/largest x position and smallest/largest y position of all body parts. This window is expanded by the margin and from then on only the posture within this crop is analyzed (until the object is lost, i.e. <detection treshold). The current position is utilized for updating the crop window for the next frame (this is why the margin is important and should be set large enough given the movement of the animal).
136139
save_poses : bool, optional, default=False
137140
Whether to save the detected poses to CSV and HDF5 files.
138-
save_dir : str, optional
139-
Directory to save output data and labeled video.
140-
If not specified, will use the directory of video_path, by default None
141141
draw_keypoint_names : bool, optional, default=False
142142
Whether to display keypoint names on video frames in the saved video.
143143
cmap : str, optional, default='bmy'

0 commit comments

Comments
 (0)