Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -330,7 +330,7 @@ class IntrusionDetectionEn:
|
|
330 |
self.max_intrusion_time = max_intrusion_time
|
331 |
self.iou_threshold = iou_threshold
|
332 |
self.conf_threshold = conf_threshold
|
333 |
-
|
334 |
|
335 |
# Predefined staff uniform colors (RGB format)
|
336 |
self.staff_colors = [
|
@@ -340,7 +340,8 @@ class IntrusionDetectionEn:
|
|
340 |
(143, 147, 136), # Gray-green
|
341 |
(48, 59, 71) # Dark blue/gray
|
342 |
]
|
343 |
-
|
|
|
344 |
def is_staff(self, person_crop):
|
345 |
"""Checks if the detected person is a staff member based on clothing color."""
|
346 |
avg_color = np.mean(person_crop, axis=(0, 1)) # Compute average color (BGR)
|
|
|
330 |
self.max_intrusion_time = max_intrusion_time
|
331 |
self.iou_threshold = iou_threshold
|
332 |
self.conf_threshold = conf_threshold
|
333 |
+
|
334 |
|
335 |
# Predefined staff uniform colors (RGB format)
|
336 |
self.staff_colors = [
|
|
|
340 |
(143, 147, 136), # Gray-green
|
341 |
(48, 59, 71) # Dark blue/gray
|
342 |
]
|
343 |
+
|
344 |
+
@spaces.GPU
|
345 |
def is_staff(self, person_crop):
|
346 |
"""Checks if the detected person is a staff member based on clothing color."""
|
347 |
avg_color = np.mean(person_crop, axis=(0, 1)) # Compute average color (BGR)
|