Commit History

  1. allow origins on web app deployment urls

    Ruzzel Mendoza
    682dadb

  1. whash, phash, and dhash weight tuning

    Ruzzel Mendoza
    7c8d720

  1. fallback legacy

    Ruzzel Mendoza
    18f4339
  2. fix

    Ruzzel Mendoza
    28a415d
  3. asd

    Ruzzel Mendoza
    5d0b1a5

  1. Fix transform_consistency default + expose agreement counts⁠

    Ruzzel Mendoza
    6f114bb

  1. Add pytest to requirements (rewrite as UTF-8) + RESPONSE_STRUCTURE_AUDIT.md - requirements.txt: rewrite the UTF-16 pip-freeze as clean UTF-8 (content unchanged) and add pytest==9.1.1 - RESPONSE_STRUCTURE_AUDIT.md: frontend migration reference documenting every change to POST /plagiarism/check/web and POST /plagiarism/compare: additive-only field set (raw_similarity, raw_similarity_legacy [transitional], calibrated_confidence, transform_consistency, content_blocks_used, low_content_warning + compare-only calibration_loaded, background_coincidence_suppressed, dominant_transform + hashes.blocks.*.entropy), old vs new JSON examples, flagging threshold derivation (p99 rule; current degenerate-baseline value 5.0), behavior changes (top-5 ordering, best_match by calibrated_confidence)

    Ruzzel Mendoza
    21f5be6
  2. API: wire new scoring fields through /plagiarism responses - db/web/best_match and every other_matches entry now carry raw_similarity, raw_similarity_legacy, calibrated_confidence, transform_consistency, content_blocks_used, low_content_warning alongside the unchanged similarity field - best_match picked by calibrated_confidence (monotonic in raw score; tie-break semantics unchanged) - top-level low_content_warning on both endpoints (upload-side flag for /check/web, either-image flag for /compare) - hashes payload blocks now include entropy tags (additive) - drop debug print of the full artwork payload - verified end-to-end with a stubbed-services smoke test: /compare and /check/web return the documented field set

    Ruzzel Mendoza
    2dac237
  3. Phase 5: rotation-aware global pre-filter + scoring refinements - global_prefilter_distance: query phash('0') vs ALL SIX stored transform-variant phashes (6 Hamming ops, no re-hashing); scan_database skips a row only when every variant exceeds GLOBAL_PREFILTER_MAX_DISTANCE (default 28, env-overridable) - pre-filter is performance-only: never sets or influences scores of rows that pass; skip count logged - scan_database/check_distance_between_serp now return true top-5 sorted by calibrated_confidence (primary score) with the full new field set per match (was: history of interim bests) - scoring refinement for rotate-and-repost: final = 0.3*T*transform_cap + 0.7*B*block_multiplier so block geometry can no longer zero out transform evidence (pure rotations: T~65, blocks 0 -> final ~20, flagged) - background-coincidence guard: transform resemblance without ANY block corroboration is voided unless the alignment is tight (avg dist <= STRICT/2) - fixes the matching-background false positive at the global level while preserving rotation/mirror/flip detection - regression fixture verified: legacy 96.48% (old bug) vs new 0.0; sparse-art exact copy stays 100.0 (no over-suppression); real-data baseline re-verified: 78/78 unrelated pairs score 0.0, prefilter dists 18-32 vs cutoff 28 (kept: conservative, true copies at <=10) - tests 5/6/7 added: sparse-art multiplier, original-bug regression, prefilter + scan_database

    Ruzzel Mendoza
    f83b9ab
  4. Phase 4: baseline calibration + calibrated_confidence - scripts/calibrate_baseline.py: offline script (not wired to API) that cross-pairs registered artworks from Supabase (or a --from-json dump) through the consensus pipeline and persists config/calibration.json - lib/phash: load_calibration()/calibrated_confidence()/plagiarism_threshold(); percentile-table interpolation with normal-CDF tails, identity fallback until calibrated; compare_hash_sets now returns calibrated_confidence + calibration_loaded - ran against live DB: 13 artworks / 78 unrelated pairs. Result: legacy scores unrelated pairs 56.7-72.3% (reproduces reported false positives); new consensus scores all 78 pairs 0.0 (0/78 block agreements; best unrelated block distance min 17.7 vs STRICT_MATCH_DISTANCE 12) - threshold: degenerate baseline (stddev 0) -> documented rule threshold = best unrelated score + 5 = 5.0; switches to p99 once the catalog yields a spread - constants revisited vs data (follow-up brief item 4): STRICT_MATCH_DISTANCE=12 supported by 17.7+ gap; MIN_BLOCK_STDDEV=5 unverifiable until DB rows carry entropy (kept); prefilter cutoff validated in Phase 5 - tests: percentile interpolation, tail extrapolation/clamping, identity fallback, threshold lookup, compare_hash_sets field presence

    Ruzzel Mendoza
    61d2c38
  5. Phase 3: transform/geometric consistency confidence multiplier - TRANSFORM_BLOCK_MAP: where each block position lands under 0/90/180/270/mirror/flip - compute_transform_consistency: agreeing block pairs vote for the transform implied by their position mapping (center matches excluded as uninformative, ambiguous pairs split votes); returns fraction of votes held by dominant transform - confidence_multiplier = consistency * evidence cap; cap ramps to 1 at MIN_CONSENSUS_BLOCKS (default 2) but never demands more agreeing blocks than the image has content blocks (sparse-art fairness) - final score = (0.3*transform + 0.7*block consensus) * multiplier; expose transform_consistency and dominant_transform in compare_hash_sets - tests: unit votes, identical=1.0 dominant '0', scrambled quadrants -> 0.5 + suppressed score, single lucky match capped at 0.5

    Ruzzel Mendoza
    f98281a
  6. Phase 2: consensus-based scoring - replace single-minimum-distance logic in compare_blocks/compare_transforms with per-component best-match consensus: count pairs below tunable STRICT_MATCH_DISTANCE (default 12.0), derive similarity from (agreement ratio, avg distance of agreeing pairs) - expose agreements/agreement_ratio/content_blocks_used in results - retain old algorithm as compare_blocks_legacy/compare_transforms_legacy; compare_hash_sets now returns raw_similarity (new method) and raw_similarity_legacy (old method) side by side for transition-period validation - tests: identical -> ~100, one shared block -> legacy ~90 but consensus capped ~20, unrelated -> low

    Ruzzel Mendoza
    f731132
  7. Phase 1: entropy filtering for block matching - add block_entropy() (stddev of preprocessed grayscale block) and tunable MIN_BLOCK_STDDEV (env-overridable, default 5.0) - tag each block hash dict with its entropy score in generate_block_hashes - compare_blocks excludes pairs where either block is flat/low-detail; falls back to all blocks with low_content_warning when an image has no content - propagate content_blocks_used/low_content_warning through compare_hash_sets - legacy DB rows without entropy stay eligible (backward compat) - add pytest scaffolding and entropy-filtering tests

    Ruzzel Mendoza
    4b85872

  1. Dont scan artworks for plagiarism for removed artworks

    Ruzzel Mendoza
    07779ba

  1. removed pyinstrument

    Ruzzel Mendoza
    ef4e0ab
  2. add parallelization to generating hash from serp

    Ruzzel Mendoza
    0c2a3e0

  1. Added new MIME types (#3)⁠

    Hrudge +1: Natsuna
    ea93233

  1. remove jpeg and png file format restriction when classifying an image

    Ruzzel Mendoza
    1a1b620

  1. Show Multiple Matches for Plagiarized Artworks⁠

    Ruzzel Mendoza
    1a39441

  1. change url to return the id of the artwork

    Ruzzel Mendoza
    030a111
  2. rename route name for compare_two_artsworks

    Ruzzel Mendoza
    9beeff1
  3. add route for comparing two images

    Ruzzel Mendoza
    5315099
  4. integrate database scan to upload plagiarism api

    Ruzzel Mendoza
    bfdc38e
  5. add the hashes to plagiarism upload response

    Ruzzel Mendoza
    a0fc0ed
  6. add success response to plagiarism upload

    Ruzzel Mendoza
    ac976fc
  7. change plagiarism upload to return only the best match

    Ruzzel Mendoza
    828f661
  8. add asset url to db best match

    Ruzzel Mendoza
    017dad9
  9. add asset url to db best match

    Ruzzel Mendoza
    303ba11
  10. Changed PlagiarismWebResult type structure to db scan

    Ruzzel Mendoza
    f2dc9bb
  11. plagiarism check route name

    Ruzzel Mendoza
    65909f2
  12. plagiarism check route name

    Ruzzel Mendoza
    662d7e0
  13. database similarity check

    Ruzzel Mendoza
    17c6fb0

  1. rework plagiarism algo to grid based hashing

    Ruzzel Mendoza
    1998795

  1. rework descriptive prompts for better art classification

    Ruzzel Mendoza
    0f5fa48
  2. add index to art classification genres

    Ruzzel Mendoza
    9a8d35c

  1. add original and unaltered phash to the return structure of web plagiarism search result

    Ruzzel Mendoza
    e3bcf7c
  2. rework return structure of web plagiarism search result

    Ruzzel Mendoza
    64c549c

  1. Change Plagiarism Check from a websocket into a normal API POST request

    Ruzzel Mendoza
    b35f641

  1. Clean requirements for Hugging Face Space

    Ruzzel Mendoza
    b6abf66
  2. docker file

    Ruzzel Mendoza
    a55e3ef
  3. Clean Deployment for Hugging Face

    Ruzzel Mendoza
    887791e