From ce3662ddb39eaab2bc564026fb381f092b1d79e6 Mon Sep 17 00:00:00 2001 From: SAM <8dmasters@gmail.com> Date: Sun, 12 May 2024 14:26:05 +0530 Subject: [PATCH] Update demo.py Fixed bugs --- Suicide_Detection/demo.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Suicide_Detection/demo.py b/Suicide_Detection/demo.py index 690ed3be..6b532110 100644 --- a/Suicide_Detection/demo.py +++ b/Suicide_Detection/demo.py @@ -51,10 +51,10 @@ for box in b: if box.any(): _x, _y, _w, _h = box - x1 = round(_x) - y1 = round(_y) - wo = round(_w) - ho = round(_h) + x1 = round(_x * w) + y1 = round(_y * h) + wo = round(_w * w) + ho = round(_h * h) cv2.rectangle(frame, (x1, y1), (x1 + wo, y1 + ho), (255, 0, 0), 2)