Spaces:
Sleeping
Sleeping
Lower fracture cross-check threshold 60->50
Browse files- app/routers/analyze.py +7 -1
app/routers/analyze.py
CHANGED
|
@@ -305,8 +305,14 @@ def _detect_metallic_hardware(file_bytes: bytes) -> bool:
|
|
| 305 |
|
| 306 |
_SITE_METAL_FRACTION = 0.02 # ≥2% saturated-white pixels around a box → implant at the site
|
| 307 |
_SITE_BOX_PAD = 0.15
|
| 308 |
-
_SWITCH_MIN_SIGNAL =
|
| 309 |
_SWITCH_MAX_PRIMARY = 50.0 # ...and the original route must be weaker than this
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 310 |
|
| 311 |
_INACTIVE_FRACTURE_WORDS = ("prior", "healed", "possible", "old finding")
|
| 312 |
|
|
|
|
| 305 |
|
| 306 |
_SITE_METAL_FRACTION = 0.02 # ≥2% saturated-white pixels around a box → implant at the site
|
| 307 |
_SITE_BOX_PAD = 0.15
|
| 308 |
+
_SWITCH_MIN_SIGNAL = 50.0 # cross-check must be at least this confident to take over
|
| 309 |
_SWITCH_MAX_PRIMARY = 50.0 # ...and the original route must be weaker than this
|
| 310 |
+
# Lowered from 60 — tested against a real client image (a stylized, heavily
|
| 311 |
+
# colour-graded fracture photo) where the fracture classifier correctly flagged
|
| 312 |
+
# it with real but moderate confidence while the wound classifier's own guess
|
| 313 |
+
# was weak but nonzero. Missing a real fracture by sitting on a high bar costs
|
| 314 |
+
# far more than occasionally cross-checking a true wound photo a bit too
|
| 315 |
+
# eagerly, so the bar for "trust the cross-check" should lean permissive.
|
| 316 |
|
| 317 |
_INACTIVE_FRACTURE_WORDS = ("prior", "healed", "possible", "old finding")
|
| 318 |
|