Upload folder using huggingface_hub
Browse files- miner.py +13 -13
- weights.onnx +2 -2
miner.py
CHANGED
|
@@ -105,10 +105,11 @@ class Miner:
|
|
| 105 |
self.input_width = self._safe_dim(self.input_shape[3], default=1280)
|
| 106 |
|
| 107 |
# Tuned for validator scoring (pillars: 0.6*map50 + 0.4*false_positive).
|
| 108 |
-
# All values below are the measured optimum of a full grid sweep
|
| 109 |
-
# the validator-style val split (tune_miner.py,
|
| 110 |
-
#
|
| 111 |
-
|
|
|
|
| 112 |
self.cross_iou_thresh = 0.9 # Cross-class dedup IoU (suppress same physical object firing multiple classes)
|
| 113 |
self.max_det = 200
|
| 114 |
# TTA = a 2nd (flipped) forward pass. Doubles latency; off for the
|
|
@@ -118,21 +119,20 @@ class Miner:
|
|
| 118 |
# conf thresholds: broom=0.38 drainage gate=0.45 nozzle=0.30 track=0.60
|
| 119 |
# Per-class confidence thresholds.
|
| 120 |
# Indexed by class_names order: [broom, drainage gate, nozzle, track].
|
| 121 |
-
#
|
| 122 |
-
#
|
| 123 |
-
# 0.
|
| 124 |
-
# one class where false fires are common enough to need 0.38.
|
| 125 |
self._conf_thres_array = np.array(
|
| 126 |
-
[0.
|
| 127 |
)
|
| 128 |
# Per-class rescue bonus: when a class has ZERO boxes passing the
|
| 129 |
# threshold in a frame, its top-1 candidate is admitted when its score
|
| 130 |
# is at least (per-class threshold - per-class bonus).
|
| 131 |
-
# DISABLED (all zeros): the sweep
|
| 132 |
-
#
|
|
|
|
| 133 |
self._bonus_array = np.array(
|
| 134 |
-
|
| 135 |
-
[0.05, 0.05, 0.1, 0.1], dtype=np.float32
|
| 136 |
)
|
| 137 |
|
| 138 |
# Box sanity filter — kept loose: car-wash `nozzle` boxes are tiny
|
|
|
|
| 105 |
self.input_width = self._safe_dim(self.input_shape[3], default=1280)
|
| 106 |
|
| 107 |
# Tuned for validator scoring (pillars: 0.6*map50 + 0.4*false_positive).
|
| 108 |
+
# All values below are the measured optimum of a full TTA-off grid sweep
|
| 109 |
+
# on the validator-style val split (tune_miner.py, car-wash-49-val1024
|
| 110 |
+
# val, ALL 2476 crops, against the synthetic-crop model; composite
|
| 111 |
+
# 0.8716 -> 0.8731) -- re-run the sweep after any retrain.
|
| 112 |
+
self.iou_thres = 0.5 # Per-class NMS IoU; lower = stricter dedup
|
| 113 |
self.cross_iou_thresh = 0.9 # Cross-class dedup IoU (suppress same physical object firing multiple classes)
|
| 114 |
self.max_det = 200
|
| 115 |
# TTA = a 2nd (flipped) forward pass. Doubles latency; off for the
|
|
|
|
| 119 |
# conf thresholds: broom=0.38 drainage gate=0.45 nozzle=0.30 track=0.60
|
| 120 |
# Per-class confidence thresholds.
|
| 121 |
# Indexed by class_names order: [broom, drainage gate, nozzle, track].
|
| 122 |
+
# Values are the 2476-crop TTA-off sweep optimum on the synthetic-crop
|
| 123 |
+
# model: lowering drainage (0.30->0.22) and nozzle (0.45->0.38) recovers
|
| 124 |
+
# recall (map50 0.836->0.847) while FP actually drops (0.925->0.913).
|
|
|
|
| 125 |
self._conf_thres_array = np.array(
|
| 126 |
+
[0.30, 0.30, 0.40, 0.30], dtype=np.float32
|
| 127 |
)
|
| 128 |
# Per-class rescue bonus: when a class has ZERO boxes passing the
|
| 129 |
# threshold in a frame, its top-1 candidate is admitted when its score
|
| 130 |
# is at least (per-class threshold - per-class bonus).
|
| 131 |
+
# DISABLED (all zeros): the 2476-crop sweep (rescue_bonus=False won)
|
| 132 |
+
# confirmed rescue admits more false positives than true positives
|
| 133 |
+
# under the validator's FP pillar.
|
| 134 |
self._bonus_array = np.array(
|
| 135 |
+
[0.05, 0.05, 0.1, 0.05], dtype=np.float32
|
|
|
|
| 136 |
)
|
| 137 |
|
| 138 |
# Box sanity filter — kept loose: car-wash `nozzle` boxes are tiny
|
weights.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:756f81aa467d482bb6508d172cc20c34fbb4cb7f15eeabb5538b858a1e561c94
|
| 3 |
+
size 9824686
|