Spaces:
Build error
Build error
Update services/detection_service.py
Browse files
services/detection_service.py
CHANGED
@@ -6,4 +6,4 @@ object_detector = pipeline("object-detection", model="facebook/detr-resnet-50")
|
|
6 |
def detect_objects(image_path):
|
7 |
image = cv2.imread(image_path)
|
8 |
results = object_detector(image)
|
9 |
-
return [r for r in results if r['score'] > 0.7
|
|
|
6 |
def detect_objects(image_path):
|
7 |
image = cv2.imread(image_path)
|
8 |
results = object_detector(image)
|
9 |
+
return [r for r in results if r['score'] > 0.7]
|