Update app.py
Browse files
app.py
CHANGED
|
@@ -92,7 +92,7 @@ def filter_bbox_outliers(detections: List[Dict],
|
|
| 92 |
|
| 93 |
Args:
|
| 94 |
detections: List of detection dictionaries with 'bbox', 'label', 'score'
|
| 95 |
-
method: 'iqr' (Interquartile Range)
|
| 96 |
threshold: Multiplier for IQR method or Z-score threshold
|
| 97 |
min_score: Minimum confidence score to keep detection
|
| 98 |
|
|
@@ -167,7 +167,7 @@ def detect_objects_owlv2(text_query, image, threshold=0.1):
|
|
| 167 |
detections.append(detection)
|
| 168 |
|
| 169 |
print(detections)
|
| 170 |
-
return filter_bbox_outliers(detections),image
|
| 171 |
|
| 172 |
except Exception as e:
|
| 173 |
print(f"Detection error: {e}")
|
|
|
|
| 92 |
|
| 93 |
Args:
|
| 94 |
detections: List of detection dictionaries with 'bbox', 'label', 'score'
|
| 95 |
+
method: 'iqr' (Interquartile Range)
|
| 96 |
threshold: Multiplier for IQR method or Z-score threshold
|
| 97 |
min_score: Minimum confidence score to keep detection
|
| 98 |
|
|
|
|
| 167 |
detections.append(detection)
|
| 168 |
|
| 169 |
print(detections)
|
| 170 |
+
return filter_bbox_outliers(detections,method = 'iqr'),image
|
| 171 |
|
| 172 |
except Exception as e:
|
| 173 |
print(f"Detection error: {e}")
|