Skip to content

Commit 026b5f0

Browse files
authored
Prevent using too low confidence thresholds in detection (#4018)
Prevent writing too low confidence thresholds to MAPI configuration
1 parent 324454e commit 026b5f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/otx/core/model/detection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def _export_parameters(self) -> TaskLevelExportParameters:
280280
return super()._export_parameters.wrap(
281281
model_type="ssd",
282282
task_type="detection",
283-
confidence_threshold=self.hparams.get("best_confidence_threshold", None),
283+
confidence_threshold=max(0.35, self.hparams.get("best_confidence_threshold", 0.35)),
284284
iou_threshold=0.5,
285285
tile_config=self.tile_config if self.tile_config.enable_tiler else None,
286286
)

0 commit comments

Comments
 (0)