feat: profile mode + bench suite + skip-bin-vuoti + variant pruning histogram
4 ottimizzazioni performance + visibilita': GGG. find(profile=True) → timing per fase - _checkpoint() registra ms tra: to_gray, spread_top, top_pruning, full_kernel, refine_verify_nms - get_last_profile() ritorna dict ms per identificare bottleneck - Costo runtime trascurabile (~5 us per call) HHH. pm2d.bench - benchmark suite eseguibile - 3 scenarios (rect/L/circle x scene clean/cluttered) - 5 configs (baseline, polarity, propagate, greedy, stride) - Auto-aggiunge gpu_umat se opencl_available() - Tabella ms/find + profile per ogni combo - Entry-point pm2d-bench (--quick per smoke test 2 iter) XX. Skip dilate per bin vuoti in _spread_bitmap - Pre-calcolo bin presenti via np.unique sui pixel valid - Su scene a bassa varianza orientation skip 50-70% delle dilate - Misurato benchmark: spread_top da ~0.3ms a ~0.1ms in molti casi VV. Variant pruning preliminare via histogramma orientation - Per ogni variante calcolo overlap (feature bins ∩ scene bins) / total feature bins - Se overlap < 0.5 * min_score → skip variante (no kernel call) - Counter n_variants_pruned_histogram nel diag - Vantaggio: scene focalizzate (poche direzioni dominanti) skippano varianti template con bin assenti dalla scena Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ dependencies = [
|
||||
|
||||
[project.scripts]
|
||||
pm2d-eval = "pm2d.eval:main"
|
||||
pm2d-bench = "pm2d.bench:main"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
|
||||
Reference in New Issue
Block a user