File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -186,15 +186,16 @@ def benchmark(
186186 # Retrieve bodypart names and number of keypoints
187187 bodyparts = dlc_live .read_config ()["metadata" ]["bodyparts" ]
188188
189- colors , vwriter = setup_video_writer (
190- video_path = video_path ,
191- save_dir = save_dir ,
192- timestamp = timestamp ,
193- num_keypoints = len (bodyparts ),
194- cmap = cmap ,
195- fps = cap .get (cv2 .CAP_PROP_FPS ),
196- frame_size = (int (cap .get (cv2 .CAP_PROP_FRAME_WIDTH )), int (cap .get (cv2 .CAP_PROP_FRAME_HEIGHT ))),
197- )
189+ if save_video :
190+ colors , vwriter = setup_video_writer (
191+ video_path = video_path ,
192+ save_dir = save_dir ,
193+ timestamp = timestamp ,
194+ num_keypoints = len (bodyparts ),
195+ cmap = cmap ,
196+ fps = cap .get (cv2 .CAP_PROP_FPS ),
197+ frame_size = (int (cap .get (cv2 .CAP_PROP_FRAME_WIDTH )), int (cap .get (cv2 .CAP_PROP_FRAME_HEIGHT ))),
198+ )
198199
199200 # Start empty dict to save poses to for each frame
200201 poses , times = [], []
You can’t perform that action at this time.
0 commit comments