Spaces:
Sleeping
Sleeping
Update services/road_safety/pothole_crack_detection.py
Browse files
services/road_safety/pothole_crack_detection.py
CHANGED
@@ -65,7 +65,7 @@ def detect_potholes_and_cracks(frame: np.ndarray) -> Tuple[List[Dict[str, Any]],
|
|
65 |
for box in result.boxes:
|
66 |
# Extract confidence score and ensure it's above threshold
|
67 |
conf = float(box.conf[0])
|
68 |
-
if conf < 0.
|
69 |
continue
|
70 |
|
71 |
# Extract class label
|
|
|
65 |
for box in result.boxes:
|
66 |
# Extract confidence score and ensure it's above threshold
|
67 |
conf = float(box.conf[0])
|
68 |
+
if conf < 0.3: # Threshold set to 0.3 for better sensitivity
|
69 |
continue
|
70 |
|
71 |
# Extract class label
|