Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ AG_REPO_ID = "emkessle/2024-24679-fencing-touch-predictor"
|
|
| 40 |
AG_ZIP_NAME = "autogluon_predictor_dir.zip"
|
| 41 |
|
| 42 |
FRAME_SKIP = 2
|
| 43 |
-
KEEP_CONF = 0.
|
| 44 |
YOLO_CONF = 0.30
|
| 45 |
YOLO_IOU = 0.50
|
| 46 |
CLIP_PAD_S = 2.0
|
|
@@ -144,8 +144,8 @@ def isolate_scoreboard_color(frame_bgr: np.ndarray,
|
|
| 144 |
gray = cv2.cvtColor(frame_bgr, cv2.COLOR_BGR2GRAY)
|
| 145 |
gray = cv2.cvtColor(gray, cv2.COLOR_GRAY2BGR)
|
| 146 |
|
| 147 |
-
primary_thr = max(0.
|
| 148 |
-
fallback_thr = max(0.
|
| 149 |
|
| 150 |
|
| 151 |
chosen_box = None
|
|
|
|
| 40 |
AG_ZIP_NAME = "autogluon_predictor_dir.zip"
|
| 41 |
|
| 42 |
FRAME_SKIP = 2
|
| 43 |
+
KEEP_CONF = 0.85
|
| 44 |
YOLO_CONF = 0.30
|
| 45 |
YOLO_IOU = 0.50
|
| 46 |
CLIP_PAD_S = 2.0
|
|
|
|
| 144 |
gray = cv2.cvtColor(frame_bgr, cv2.COLOR_BGR2GRAY)
|
| 145 |
gray = cv2.cvtColor(gray, cv2.COLOR_GRAY2BGR)
|
| 146 |
|
| 147 |
+
primary_thr = max(0.85, keep_conf)
|
| 148 |
+
fallback_thr = max(0.70, primary_thr - 0.03)
|
| 149 |
|
| 150 |
|
| 151 |
chosen_box = None
|