-
Notifications
You must be signed in to change notification settings - Fork 22
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
ImageColorAt out of bounds #3
Comments
OMG, thank you @amandamq #Fixed. |
Just to confirm, are you saying you still had issues using properly sized images? Also this was just a hobby project that gained more interest than expected. With AI libraries now, there are fast better ways to achieve face matching or similar. |
True, I'm actually looking into using DLIB later on. I have a cache of over 32000 photos scraped from a dating website and there are a lot of repeats in it. It seems most solutions are in Python, which sadly isn't my forte. Your script worked like a charm with some photos but didn't like others. |
I think I figured the type of images that cause trouble and I'm very surprised I didn't notice it before: it's portrait images! For some reason it doesn't like them. It has no problem with square or landscape images, but portrait ones will always throw and out of bounds error. Any ideas? Thanks |
Oh I see, well I once did a solution using both, basically the website is built in PHP but it calls a local python matching script via websocket and runs pretty fast. You could see a demo here: https://facematch.sci.ng/ |
Can you send me two samples of the image so I can take a look |
Right, I think I was a bit too fast. It is not about portrait versus landscape. In the dating site container there were many faces and inappropriate content, so I tried my iCloud folder instead and I noticed a different pattern of behaviour. Photos taken by me the ten I tried worked. Screenshots in the other hand didn't. Please take a look... https://drive.google.com/open?id=1Tft8KpAIhum-DIPMtKH168Kpnl35eEDJ |
Well that's a bit confusing to me as they are not similar at all, unless you mean that the ones that are in |
This is a sample of how FaceMatch demo works: If you also want to compare only pictures that are actual faces, you can. |
No, sorry, I should've been more clear... I don't even get to the point of comparing them with other photos. The moment the ones in the "Don't Work" folder are loaded, the script throws the "out of bounds" error. At first I thought it had something to do with pixel formats as some are RGB24 others YUV-something... then I thought it had something to do with aspect ratio. I thought that because the portrait ones were giving more errors. Then I realised it doesn't matter if it's PNG or JPG, nor RGB, YUV, it's something else. The only thing that seems bulletproof right now is that the images taken with my phone camera are read just fine, but screenshots, images downloaded from the internet... These ones throw errors. TL;DR: it's not as much about faces as it is removing similar photos, regardless. the script loads photos taken with the phone's camera but it won't take any other type of images such as screenshots or downloaded images and throw the out of bounds error. |
It works fine from my own end. I tested all the images you said don't work with each other and they are not throwing errors. Have you actually used the updated/fixed code? |
I did, yeah. Tried on 3 separate machines and got the exact same error on all of them. The machines are an Ubuntu Server 18.04, an Ubuntu desktop 18.04 (vm) and through CLI on my Windows 10 workstation.
|
Well there must be something missing. I don't have an image with that guid above so I can't say what's going on but the ones in the link you sent work fine. It might help to check if the images you are testing are at least 64 x 64px |
Well, I've managed to get it to work but I had to change the code. In the |
Weird, |
I can see a closed issue on the same topic, the person who opened it said it had something to do with image size, but I don't think that's the case. I've been trying for the best part of an hour different types, sizes and formats and even pixel formats, and I'm getting that error a lot. Is there a way to debug this, or maybe load the image in a different way?
I also noticed in phash.php, line 193
if($width != $scale || $height !== scale)
the second "scale" coming without the dollar sign. Is that supposed to be like that?The text was updated successfully, but these errors were encountered: