flow_from_dataframe() found 0 images #92
Comments
Reporting back- I made some directories for testing and can confirm that providing absolute directories to images with capital extensions returned images. My csv file looks like this:
.info() returns:
And finally, here's my code:
Returns:
This leads me to believe I'm doing something wrong in my original path list, but I'll try it again. Can I get a confirmation that I'm applying this fix correctly, in terms of replacing the contents of the main Keras folder with the preprocessing scripts from keras-preprocessing? It appears to be working, but I'd like to avoid any nasty surprises. |
Can confirm it was an error in my paths! It found all the images it was supposed to. :) |
I've tried providing absolute directories of images with capital extensions but still couldn't find the images. Can't Understand what I'm doing wrong. |
I was also facing the same error and found a solution for this. I inspected and found that my dataframe was containing image names without extension and the images in the folder was having extension also.
Let me know if it solves your problem or if you need any further explanation. |
@Mahi-Mai |
Wow! I just rann into this, and it seems like there are about a thousand things that can cause this issue. For me, this worked only when I did not specify classes in the flow_from_dataframe. Good luck to others, hopefully this happens to help! |
Exactly the same...cant figure why... |
For me, the issue was that I accidently specified delimiter=' ' for the dataframe csv file read instead of ',' so it took the whole csv row as image path. |
for me it was cause I missed validation_split=0.2 while instantiating the ImageDataGenerator... It worked fine when I added it. |
Yooooooooooooooooooooooooo, this was the exact problem I was facing. You just saved me at an ML competition. I hope from my heart you have a good day :) |
Hello again! I'm still struggling with flow_from_dataframe() after the issues I had here.
In order to use the new fixes, I cloned the keras repo, and then replaced the contents of the preprocessing folder with the latest from the keras-preprocessing repo. I renamed the local repo keras2 to avoid importing the vanilla repo. The code finally runs, but it's not finding any images.
Here's my script:
Returns:
Then the main body of the script:
Returns:
It should find 433. I suspect I didn't import the repo correctly?
The text was updated successfully, but these errors were encountered: