fix: address 2 code review findings (round 9)
- executor: revert person_has_fscores=True back into try/except else branch; moving it outside in round 8 was a regression — when the tracker write fails on the first-ever upload (no prior frigate_scores in tracker), setting the flag True prematurely switches at-cap replacement into fscore mode, get_most_redundant_mapped_file returns None (no entries), and all replacements are silently skipped; the flag must only be set when the score is actually written - diversity: remove dead face_crop-None guard; any face that passes assess_quality (≥90 px MIN_FACE_WIDTH) produces a crop ≥135 px (face + 25% margin), which is always above the 30 px crop minimum, making the guard unreachable; _crop_face_from_thumbnail also calls _get_face_bbox internally, so face_bbox is not None guarantees the inner bbox check also passes
This commit is contained in:
+3
-2
@@ -534,8 +534,9 @@ def upload_to_frigate(jobs: list[dict]) -> None:
|
||||
" but asset may be re-selected next run: %s",
|
||||
fname, tracker_exc,
|
||||
)
|
||||
if pre_fscore is not None:
|
||||
person_has_fscores = True
|
||||
else:
|
||||
if pre_fscore is not None:
|
||||
person_has_fscores = True
|
||||
# Always record for reconcile so the Frigate filename→asset_id
|
||||
# mapping is created even when the tracker write fails.
|
||||
# Trade-off: if mark_uploaded failed, asset_id is absent from
|
||||
|
||||
Reference in New Issue
Block a user