Skip to content

feat(preprod): Add image comparison library with odiff batch support#109381

Open
NicoHinderling wants to merge 12 commits intomasterfrom
create-compare-task-v1-part2
Open

feat(preprod): Add image comparison library with odiff batch support#109381
NicoHinderling wants to merge 12 commits intomasterfrom
create-compare-task-v1-part2

Conversation

@NicoHinderling
Copy link
Contributor

Summary

  • Add compare_images and compare_images_batch functions using dual-threshold detection (base + color-sensitive)
  • Produces base64-encoded diff mask PNGs with pixel-level change data
  • Unit tests covering identical, different, different-size, threshold sensitivity, bytes input, and batch modes

Stack: 2/3 — depends on #109380, next: Celery task

@NicoHinderling NicoHinderling requested a review from a team as a code owner February 25, 2026 21:54
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 25, 2026
Copy link
Contributor Author

NicoHinderling commented Feb 25, 2026

@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part2 branch from 925d6b9 to bbf23d9 Compare February 25, 2026 23:12
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part1 branch from 10e12d3 to 5b2dabe Compare February 25, 2026 23:12
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part1 branch from 5b2dabe to 01b72d2 Compare February 25, 2026 23:22
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part2 branch from bbf23d9 to 8c12f49 Compare February 25, 2026 23:22
@NicoHinderling NicoHinderling mentioned this pull request Feb 25, 2026
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part2 branch from 8c12f49 to bbba6eb Compare February 25, 2026 23:34
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part2 branch from bbba6eb to 99c5a0b Compare February 25, 2026 23:40
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part1 branch from ca48cee to 12f0802 Compare February 25, 2026 23:52
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part2 branch from 99c5a0b to 6e0d8b2 Compare February 25, 2026 23:52
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part2 branch from 6e0d8b2 to b13b82d Compare February 26, 2026 00:16
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part1 branch from 12f0802 to 740cd3e Compare February 26, 2026 00:16
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

NicoHinderling and others added 12 commits February 26, 2026 14:05
Add compare_images and compare_images_batch functions that use the
OdiffServer to produce diff masks with dual-threshold detection.
Includes unit tests.
Move _to_pil_image calls inside try block so the finally cleanup
handles the case where the second image conversion fails after the
first succeeds.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants