Enhance HVideoTool's detection and restoration capabilities: introduced per-model overlay threshold settings and cross-model non-maximum suppression (NMS) to improve detection accuracy. Updated configuration management to support these features, and refined the UI for better user experience. Documentation in CLAUDE.md has been updated to reflect these changes.
This commit is contained in:
@@ -56,6 +56,15 @@ class AppConfig:
|
||||
# selected model and merges results — see core/detection/multi.MultiYoloDetector.
|
||||
detector_models: list[str] = field(default_factory=list)
|
||||
default_threshold: float = 0.20 # initial overlay confidence threshold
|
||||
# Per-model overlay threshold overrides, keyed by the model file **stem** (e.g.
|
||||
# "penis" -> 0.4). A detection from a model with no entry uses default_threshold.
|
||||
# Display-only (filters what's drawn/counted as a hit), not the detection conf.
|
||||
model_thresholds: dict[str, float] = field(default_factory=dict)
|
||||
# Merge overlapping detections across models (greedy IoU NMS, keep higher score).
|
||||
# Off by default — different categories are meant to coexist; on, it removes the
|
||||
# duplicate boxes you get when overlapping models (e.g. penis + cockAndBall) fire.
|
||||
cross_model_nms: bool = False
|
||||
nms_iou: float = 0.6 # IoU above which two boxes are deemed duplicates
|
||||
|
||||
# --- restoration ("расцензурить") ---
|
||||
restorer: str = "deepmosaics" # "deepmosaics" | "deepmosaics_video"
|
||||
|
||||
Reference in New Issue
Block a user