fix: cap adattivo al 50% varianti + form e finestra risultati ridimensionabili
- max_vars_full = max(max_matches*8, n_variants // 2): protegge perf con molte scale mantenendo metà delle varianti al full-res (vs intero senza cap che dava 22s su 864 varianti, vs 80s screenshot utente) - Dialog tkinter: resizable, minsize 360x420, Entry col peso 2 espandibile - Finestra risultati cv2: WINDOW_NORMAL con resizeWindow iniziale 1600x900 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -542,9 +542,12 @@ class LineShapeMatcher:
|
||||
if not kept_variants:
|
||||
return []
|
||||
|
||||
# Cap: tutte le varianti che superano top_thresh passano al full-res.
|
||||
# Ordinamento per score decrescente (early matches hanno priorità).
|
||||
# Cap adattivo: ordina per score top-level e mantieni le più promettenti.
|
||||
# Min: max_matches*8 (margine per NMS cross-variant)
|
||||
# Max: 50% delle varianti totali (protegge performance con molte scale)
|
||||
kept_variants.sort(key=lambda t: -t[1])
|
||||
max_vars_full = max(max_matches * 8, len(self.variants) // 2)
|
||||
kept_variants = kept_variants[:max_vars_full]
|
||||
|
||||
# Full-res (parallelizzato per variante)
|
||||
resp0 = self._response_map(gray0)
|
||||
|
||||
Reference in New Issue
Block a user