Skip to content

Avoid overly aggressive product image background masking#462

Merged
michele-theleftbit merged 1 commit intodevelopfrom
background-masking
Mar 6, 2026
Merged

Avoid overly aggressive product image background masking#462
michele-theleftbit merged 1 commit intodevelopfrom
background-masking

Conversation

@michele-theleftbit
Copy link
Contributor

@michele-theleftbit michele-theleftbit commented Mar 6, 2026

Reduce and harden product image background removal.

This change keeps the existing Vision-based background removal flow, but adds a lightweight validation step to avoid bad masks on packshots with printed characters or artwork. We now compare the detected mask bounds against the actual non-white content bounds of the image, and fall back to the original image when the mask is clearly too small. The implementation was also simplified by removing extra mask metrics and keeping only the minimum logic needed for this validation.

ScreenRecording_03-06-2026.16-52-08_1.MP4

@michele-theleftbit michele-theleftbit merged commit b2f2caf into develop Mar 6, 2026
3 checks passed
@michele-theleftbit michele-theleftbit deleted the background-masking branch March 6, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants