Skip to content

Commit 3044b03

Browse files
committed
fixed save_output bug
1 parent 47a56a3 commit 3044b03

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/pose_cropper_yolov8.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
VIDEO_NAME = "betonsa_3"
17-
VIDEO_PATH = f"../data_collection/video-data/recorded/{VIDEO_NAME}.mp4"
17+
VIDEO_PATH = f"../data/video_data/{VIDEO_NAME}.mp4"
1818

1919
CROP_AND_SAVE = False # True if you want to crop and save body parts
2020
SAVE_PATH = f"../debugging/cropped_parts/{VIDEO_NAME}"
@@ -221,7 +221,8 @@ def transparent_box(image, x, y, w, h, color=(0, 200, 0), alpha=0.4):
221221
cv2.imwrite("../data/debug/body_cropped.jpg", body_cropped)
222222

223223
cv2.imshow("Safety Equipment Detector", annotated_frame)
224-
out.write(annotated_frame)
224+
if(SAVE_OUTPUT==True):
225+
out.write(annotated_frame)
225226

226227
if cv2.waitKey(1) & 0xFF == ord("q"):
227228
break

0 commit comments

Comments
 (0)