Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PNGs with transparency are mistakenly counted as duplicate and not rendered properly in GUI compare #30

Closed
SPRCoreDump opened this issue Jul 22, 2022 · 4 comments
Assignees
Labels
question Further information is requested.

Comments

@SPRCoreDump
Copy link

SPRCoreDump commented Jul 22, 2022

Great tool!
I learned a lot reading the article you wrote about this as well.

I tested it on some of my files, but found that I had some PNGs that were just line-art (black line-art on transparent background) were flagged as duplicate when they were completely different, even on high sensitivity. In fact, the listed MSE is 0.00

They also did not render properly during the image comparison when running -d False, with both image previews looking like black squares.
Note: This does not apply to line-art of a different color on transparent background, only black.

I am not familiar with how the PNG file format encodes black vs transparent, but I believe that the issue stems from that.

Screen Shot 2022-07-22 at 1 57 07 AM

@SPRCoreDump
Copy link
Author

After some further testing, I've found that it seems .jpg images also suffer from incorrectly being identified as duplicate images. black and white comic strips and manga panels are marked as duplicate with an MSE of 0.00, even with -s High and -px 200.
Could this be because the comparison step is not sensitive enough to differentiate tensors without the extra information that comes with color?

@elisemercury elisemercury added the bug : critical A bug was found in difPy, and it is critical to the functioning of the package. label Jul 29, 2022
@elisemercury
Copy link
Owner

Hi @SPRCoreDump,
Thanks a lot for opening the issue and for your input! Indeed, I agree and think that there must be some kind of issue related to lack of information in black and white images, same for PNG transparency. I will have a look at these issues ASAP and let you know as soon as I have a fix for it.
Again thanks and all the best,
Elise

@elisemercury elisemercury self-assigned this Jul 29, 2022
@elisemercury
Copy link
Owner

elisemercury commented Jul 31, 2022

Hi @SPRCoreDump,
I tried reproducing the issue you encountered, but for me it works fine with various transparent PNG images and back and white manga comic strips... Would you mind sending me your images, so that I can try reproducing the issue locally? That would be a great help. You can attach them either to a comment here, or send them to me via e-mail. Thanks a lot!
All the best
Elise

@elisemercury
Copy link
Owner

As I did not get any update around this issue, I will proceed with its closing. @SPRCoreDump feel free to still attach the respective images to this issue in the future. Thanks, Elise

@elisemercury elisemercury added question Further information is requested. and removed bug : critical A bug was found in difPy, and it is critical to the functioning of the package. labels Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested.
Projects
None yet
Development

No branches or pull requests

2 participants