Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -341,7 +341,6 @@ class IntrusionDetectionEn:
|
|
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)
|
@@ -354,6 +353,8 @@ class IntrusionDetectionEn:
|
|
354 |
return True
|
355 |
return False
|
356 |
|
|
|
|
|
357 |
def intrusion_detect_en(self, video_path):
|
358 |
try:
|
359 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
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)
|
|
|
353 |
return True
|
354 |
return False
|
355 |
|
356 |
+
|
357 |
+
@spaces.GPU
|
358 |
def intrusion_detect_en(self, video_path):
|
359 |
try:
|
360 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|