Fix near-dup blocking registration: flag near-dups but always register (phone burst shots were falsely flagged); verified on phone_dumps (104 files, 0 missing)

This commit is contained in:
2026-08-08 14:59:42 +10:00
parent a776722d53
commit 32978030c3

View File

@@ -92,13 +92,12 @@ def check_and_register(image_paths: list[str], source: str) -> dict:
if match: if match:
exact_dups.append((p_str, match[0])) exact_dups.append((p_str, match[0]))
continue continue
# near dup by perceptual hash # near dup by perceptual hash — FLAG but DO NOT skip (review decides)
hx = db.hash_image(p) hx = db.hash_image(p)
near, dist = db._near_dup_lookup(conn, hx) near, dist = db._near_dup_lookup(conn, hx)
if near and dist <= 10: if near and dist <= 10:
near_dups.append((p_str, near, dist)) near_dups.append((p_str, near, dist))
continue # register regardless (near-dup is a review hint, not a block)
# new — register
with Image.open(p) as im: with Image.open(p) as im:
w, h = im.size w, h = im.size
conn.execute( conn.execute(