Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -392,7 +392,7 @@ class LoiteringDetection:
|
|
392 |
model = YOLO(self.model_path)
|
393 |
model.to(device)
|
394 |
person_info = {}
|
395 |
-
time_threshold =
|
396 |
detection_threshold = 0.6
|
397 |
zone_points = None
|
398 |
if area == '131':
|
@@ -457,7 +457,7 @@ class LoiteringDetection:
|
|
457 |
color = (255, 0, 0) # Blue for outside zone
|
458 |
|
459 |
cv2.rectangle(frame, (x1, y1), (x2, y2), color, 2)
|
460 |
-
cv2.putText(frame, f"ID: {id}", (x1, y1 - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 2)
|
461 |
|
462 |
# Draw polygon zone
|
463 |
cv2.polylines(frame, [np.array(zone_points, np.int32)], True, (255, 255, 0), 2)
|
|
|
392 |
model = YOLO(self.model_path)
|
393 |
model.to(device)
|
394 |
person_info = {}
|
395 |
+
time_threshold = 5
|
396 |
detection_threshold = 0.6
|
397 |
zone_points = None
|
398 |
if area == '131':
|
|
|
457 |
color = (255, 0, 0) # Blue for outside zone
|
458 |
|
459 |
cv2.rectangle(frame, (x1, y1), (x2, y2), color, 2)
|
460 |
+
#cv2.putText(frame, f"ID: {id}", (x1, y1 - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 2)
|
461 |
|
462 |
# Draw polygon zone
|
463 |
cv2.polylines(frame, [np.array(zone_points, np.int32)], True, (255, 255, 0), 2)
|