v3.29: person box shrink 15% + NMS 0.35 to reduce FP
Browse files
sv_gpu.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
"""
|
| 2 |
-
Score Vision SN44 — Unified miner v3.
|
| 3 |
Dual-model: vehicle (YOLO11m INT8 1280) + person (YOLO12s FP16 960 TRT).
|
| 4 |
Pose model: YOLOv8n-pose FP16 640 for false-positive filtering + keypoint box refinement.
|
| 5 |
Vehicle weights loaded from secondary HF repo (meaculpitt/ScoreVision-Vehicle).
|
|
@@ -286,7 +286,7 @@ PER_MAX_AREA_RATIO = 0.80
|
|
| 286 |
PER_TILE_OVERLAP = 0.20 # 20% overlap between tiles
|
| 287 |
PER_TILE_MIN_DIM_RATIO = 1.15 # tile when image dim > model_dim * this (~1104px for 960 model)
|
| 288 |
PER_TILE_CONF = 0.55 # raised from 0.40 to match PER_CONF_LOW
|
| 289 |
-
PER_NMS_IOU = 0.
|
| 290 |
PER_MAX_DET = 100 # Loose safety ceiling ONLY — not a count cap. Strategy is confidence-floor:
|
| 291 |
# PER_CONF_LOW=0.60 is the real filter; any box above threshold passes.
|
| 292 |
# Raised from 50 after 2026-04-05 investigation: top peers emit 77+ boxes on
|
|
@@ -2024,11 +2024,16 @@ class Miner:
|
|
| 2024 |
if area / img_area > PER_MAX_AREA_RATIO:
|
| 2025 |
continue
|
| 2026 |
b = merged_b[i]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2027 |
out.append(BoundingBox(
|
| 2028 |
-
x1=max(0, min(ow, int(
|
| 2029 |
-
y1=max(0, min(oh, int(
|
| 2030 |
-
x2=max(0, min(ow, int(
|
| 2031 |
-
y2=max(0, min(oh, int(
|
| 2032 |
cls_id=0,
|
| 2033 |
conf=max(0.0, min(1.0, float(merged_s[i]))),
|
| 2034 |
))
|
|
|
|
| 1 |
"""
|
| 2 |
+
Score Vision SN44 — Unified miner v3.29 (2026-04-08). R9c vehicle FP16 (mAP50=0.929). Person: TTA consensus + 15% box shrink + NMS 0.35.
|
| 3 |
Dual-model: vehicle (YOLO11m INT8 1280) + person (YOLO12s FP16 960 TRT).
|
| 4 |
Pose model: YOLOv8n-pose FP16 640 for false-positive filtering + keypoint box refinement.
|
| 5 |
Vehicle weights loaded from secondary HF repo (meaculpitt/ScoreVision-Vehicle).
|
|
|
|
| 286 |
PER_TILE_OVERLAP = 0.20 # 20% overlap between tiles
|
| 287 |
PER_TILE_MIN_DIM_RATIO = 1.15 # tile when image dim > model_dim * this (~1104px for 960 model)
|
| 288 |
PER_TILE_CONF = 0.55 # raised from 0.40 to match PER_CONF_LOW
|
| 289 |
+
PER_NMS_IOU = 0.35 # NMS IoU for merging across passes — tightened to reduce FP duplicates
|
| 290 |
PER_MAX_DET = 100 # Loose safety ceiling ONLY — not a count cap. Strategy is confidence-floor:
|
| 291 |
# PER_CONF_LOW=0.60 is the real filter; any box above threshold passes.
|
| 292 |
# Raised from 50 after 2026-04-05 investigation: top peers emit 77+ boxes on
|
|
|
|
| 2024 |
if area / img_area > PER_MAX_AREA_RATIO:
|
| 2025 |
continue
|
| 2026 |
b = merged_b[i]
|
| 2027 |
+
# Shrink box 15% toward center to tighten fit (our boxes avg 57% larger than top miners')
|
| 2028 |
+
cx = (b[0] + b[2]) / 2.0
|
| 2029 |
+
cy = (b[1] + b[3]) / 2.0
|
| 2030 |
+
bw2 = (b[2] - b[0]) * 0.85 / 2.0
|
| 2031 |
+
bh2 = (b[3] - b[1]) * 0.85 / 2.0
|
| 2032 |
out.append(BoundingBox(
|
| 2033 |
+
x1=max(0, min(ow, int(cx - bw2))),
|
| 2034 |
+
y1=max(0, min(oh, int(cy - bh2))),
|
| 2035 |
+
x2=max(0, min(ow, int(cx + bw2))),
|
| 2036 |
+
y2=max(0, min(oh, int(cy + bh2))),
|
| 2037 |
cls_id=0,
|
| 2038 |
conf=max(0.0, min(1.0, float(merged_s[i]))),
|
| 2039 |
))
|