ImageFolder not working

username: PirateHunterZoro
cooked: <p>Hello, everybody!<br>
I am having some serious trouble loading the images I want to load to serve as training for my neural network. It was actually working perfectly last night - I had classifications going and everything. I started on the network today, but when I tried to load the data again, it just… stopped working. I did not change anything that I am aware of, but now the ImageFolder does not think my path is valid. I believe that within the folder whose path I give to ImageFolder, I should have a bunch of inner folders - each of those folders has images of acceptable format, to be classified the same because they’re in the same inner folder. I have matched this structure. Within my ‘Images’ folder, I have 10 inner folders labelled 0-9. They each contain .jpeg images - and all the images in each folder belong to the same classification. So could I ask, what’s going on? Why did ImageFolder suddenly stop working on me? At the bottom of the error message (I am limited to one screen shot), it says, “FileNotFoundError: Found no valid file for the classes .ipynb_checkpoints. Supported extensions are: .jpg, .jpeg, .png, .ppm, .bmp, .pgm, .tif, .tiff, .webp”. Many thanks!<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/0/d/0d58588571e2fa65e8dfdb2c583aa0f9f084736d.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/0d58588571e2fa65e8dfdb2c583aa0f9f084736d" title="Screen Shot 2022-06-05 at 12.46.48PM"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/0/d/0d58588571e2fa65e8dfdb2c583aa0f9f084736d_2_690x431.jpeg" alt="Screen Shot 2022-06-05 at 12.46.48PM" data-base62-sha1="1U3ucn95pswjyktH0BKdh4HIEhv" width="690" height="431" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/0/d/0d58588571e2fa65e8dfdb2c583aa0f9f084736d_2_690x431.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/0/d/0d58588571e2fa65e8dfdb2c583aa0f9f084736d_2_1035x646.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/0/d/0d58588571e2fa65e8dfdb2c583aa0f9f084736d_2_1380x862.jpeg 2x" data-dominant-color="DDD3CE"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screen Shot 2022-06-05 at 12.46.48PM</span><span class="informations">1920×1200 147 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

username: Andrei_Cristea
cooked: <p>Hi Mikey!</p>
<p>FileNotFoundError means that perhaps there is a typo in your <code>path</code> variable. Did you mean to start it with something like <code>C:/Users/caseyferguson/</code> rather than <code>/Users/caseyferguson</code>?</p>
<p>You can experiment by running something like:</p>
<pre><code class="lang-auto">import os
print(os.path.isdir(path))
</code></pre>
<p>or</p>
<pre><code class="lang-auto">os.listdir(path)
</code></pre>
<p>And seeing if you get expected results.</p>
<p>Good luck and let us know if you need further help!</p>

username: PirateHunterZoro
cooked: <p>Hi, Andrei!<br>
Thank you so much for your response! So it does show all the folders as expected when I plug in os.listdir(path). The path seems to have been correct (which I copied from Terminal, so I guess it should be). But I was able to fix the problem! I think that my image folders just were not structured correctly for the ImageFolder to read them. I was able to copy these images into another location on my computer with images/folders that were structured correctly for ImageFolder to read them. I copied the relevant images in place of the images that were already there, and things are working fine now! Thanks again for your response.</p>
<p>Sincerely,</p>
<p>Mikey</p>

username: PirateHunterZoro
cooked: <p>Thank you so much for your response! So it does show all the folders as expected when I plug in os.listdir(path). The path seems to have been correct (which I copied from Terminal, so I guess it should be). But I was able to fix the problem! I think that my image folders just were not structured correctly for the ImageFolder to read them. I was able to copy these images into another location on my computer with images/folders that were structured correctly for ImageFolder to read them. I copied the relevant images in place of the images that were already there, and things are working fine now! Thanks again for your response.<br>
Sincerely,<br>
Mikey</p>