Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ class DroneDetectionPipeline:
|
|
26 |
self.tracker = None
|
27 |
self.tracking_active = False
|
28 |
self.last_detection_bbox = None
|
29 |
-
self.confidence_threshold = 0.
|
30 |
|
31 |
# Load model
|
32 |
self._load_model()
|
@@ -202,7 +202,7 @@ class DroneDetectionPipeline:
|
|
202 |
x1, y1, x2, y2 = box.xyxy[0].cpu().numpy().astype(int)
|
203 |
confidence = float(box.conf[0].cpu().numpy())
|
204 |
|
205 |
-
if confidence >= 0.
|
206 |
high_conf_detections.append((x1, y1, x2, y2, confidence))
|
207 |
elif confidence >= 0.1: # Lower threshold for tracking
|
208 |
low_conf_detections.append((x1, y1, x2, y2, confidence))
|
|
|
26 |
self.tracker = None
|
27 |
self.tracking_active = False
|
28 |
self.last_detection_bbox = None
|
29 |
+
self.confidence_threshold = 0.5
|
30 |
|
31 |
# Load model
|
32 |
self._load_model()
|
|
|
202 |
x1, y1, x2, y2 = box.xyxy[0].cpu().numpy().astype(int)
|
203 |
confidence = float(box.conf[0].cpu().numpy())
|
204 |
|
205 |
+
if confidence >= 0.5:
|
206 |
high_conf_detections.append((x1, y1, x2, y2, confidence))
|
207 |
elif confidence >= 0.1: # Lower threshold for tracking
|
208 |
low_conf_detections.append((x1, y1, x2, y2, confidence))
|