Skip to content

Improve duplication risk scoring in the fit score #5

Description

@yoldaolmak

Problem

Images with similar visual characteristics shouldn't be placed next to each other in the same article. The current fit score doesn't include a structural similarity check between selected candidates.

Scope

  • src/pictova/engine/quality.py and the fit score math documented in docs/concepts/fit-score.md.
  • Add a basic structural similarity signal (e.g. perceptual hash distance or color-histogram comparison) between candidates competing for adjacent slots.
  • Keep it dependency-light: Pillow + numpy are already available.
  • Unit tests with fixture images that are near-duplicates vs. clearly distinct.

Acceptance criteria

  • Near-duplicate candidates are penalized when targeting adjacent placements.
  • The signal is a documented, weighted component of the fit score, not a hard filter.

Difficulty: High · Credentials: None.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreCore pipeline primitivesenhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions