fix: 4 correctness bugs from full-codebase audit
- executor: restore effective_count when replacement upload fails all retries
(delete succeeded but slot was never filled, leaving cap undercount)
- diversity: skip zero-norm embeddings before dedup/FPS selection
(InsightFace zeros pass dedup with similarity 0 and score distance 1.0,
getting selected first as maximally diverse)
- cli: exclude None from skip_ids in _smaller_duplicate_ids
(p.get('id') without None guard lets None into the set, silently
dropping every other id-less person from the processed list)
- embeddings: select face nearest crop centre instead of largest by area
(25% margin can pull a bigger neighbouring face into the crop;
largest-face selection then embeds the wrong person)
This commit is contained in:
@@ -608,6 +608,12 @@ def upload_to_frigate(jobs: list[dict]) -> None:
|
||||
progress.console.print(
|
||||
f" [red]✗ {fname}: {type(e).__name__} - {e} (after {max_retries} attempts)[/red]"
|
||||
)
|
||||
else:
|
||||
# All retries exhausted without a successful upload.
|
||||
# Restore the slot freed by the preceding delete so the next
|
||||
# candidate still sees at_cap=True and must beat the replacement gate.
|
||||
if at_cap:
|
||||
effective_count += 1
|
||||
|
||||
progress.advance(upload_task)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user