ImageNet Test and Val Data Classifications

username: PirateHunterZoro
cooked: <p>Hello, everybody!<br>
I have recently downloaded images from ImageNet to try to throw some networks at. But I have run into a problem. The training images come with classifications - a total of 200 in the ‘tiny’ download - that’s all well and good. But the test and validation images both are missing classifications. When I try to run the DataLoader batch-divider on those two data sets the same way I do for the training data, the classifications come up as 0 every time… I have two screenshots attached. One is a screenshot of what the training data download looks like - with each folder being a set of images and each text file corresponding to the classifications. I also attached a screenshot of what the validation and testing data set downloads look like - they are definitely different and I don’t know how to get my hands on their classifications. Could anyone give me some guidance on what I am missing? Many thanks! EDIT - it looks like I am only allowed one media per post as a new user - I opted to include the Validation and Testing Dataset download screenshot. Please let me know if that is not enough information!</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/a/8/a893effc1afafa050a2acc52b6c133a8d751086c.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/a893effc1afafa050a2acc52b6c133a8d751086c" title="Screen Shot 2022-05-07 at 9.24.14PM"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/a/8/a893effc1afafa050a2acc52b6c133a8d751086c_2_690x475.jpeg" alt="Screen Shot 2022-05-07 at 9.24.14PM" data-base62-sha1="o3javI9kPr7n4SdTUui2y0aYqEk" width="690" height="475" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/a/8/a893effc1afafa050a2acc52b6c133a8d751086c_2_690x475.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/a/8/a893effc1afafa050a2acc52b6c133a8d751086c_2_1035x712.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/a/8/a893effc1afafa050a2acc52b6c133a8d751086c_2_1380x950.jpeg 2x" data-dominant-color="242424"><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-05-07 at 9.24.14PM</span><span class="informations">1920×1322 58.3 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: eqy
cooked: <p>What is the directory structure of <code>images</code> in each case? It’s common practice to organize classes by directory for classification datasets.</p>

username: PirateHunterZoro
cooked: <p>Thanks for the reply! Each of the ‘images’ folders is a collection of JPEG images. In the mean time, I’ve made do with taking the downloaded training data and creating a subset of that data to be the testing data. If it helps, here is the screenshot of what each of those ‘images’ folders looks like on the inside. For the val_data, I realize now that I do have a ‘.txt’ file which contains the classifications. However, for the train_data, I still do not - only a bunch of JPEG images.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/a/b/ab15170e7cc4c67d8fd346865184a735ba297b0e.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/ab15170e7cc4c67d8fd346865184a735ba297b0e" title="Screen Shot 2022-05-08 at 10.44.36AM"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/a/b/ab15170e7cc4c67d8fd346865184a735ba297b0e_2_690x379.jpeg" alt="Screen Shot 2022-05-08 at 10.44.36AM" data-base62-sha1="opsPCUgfnBlDSrmtpbbpO74pVPU" width="690" height="379" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/a/b/ab15170e7cc4c67d8fd346865184a735ba297b0e_2_690x379.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/a/b/ab15170e7cc4c67d8fd346865184a735ba297b0e_2_1035x568.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/a/b/ab15170e7cc4c67d8fd346865184a735ba297b0e_2_1380x758.jpeg 2x" data-dominant-color="292D33"><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-05-08 at 10.44.36AM</span><span class="informations">1576×866 82.2 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: Sairam954
cooked: <p>Generally, I have my train or validation folder with multiple subfolders and their name specifying the class of the images in the subfolder. However, the Imagenet dataset we obtain needs some preprocessing to achieve this structure. I have not used the tiny-imagenet dataset, but I followed this blog <a href="https://www.adeveloperdiary.com/data-science/computer-vision/how-to-prepare-imagenet-dataset-for-image-classification/" rel="noopener nofollow ugc">https://www.adeveloperdiary.com/data-science/computer-vision/how-to-prepare-imagenet-dataset-for-image-classification/</a> for the Imagenet dataset preprocessing. I hope this helps you to some extent.</p>

username: eqy
cooked: <p>Sorry, does <code>train</code> have the same flat structure that <code>test</code> does or is it hierarchical corresponding to class structure? A quick look at a tiny-imagenet tutorial suggests that it is already organized this way:<br>
<a href="https://towardsdatascience.com/pytorch-ignite-classifying-tiny-imagenet-with-efficientnet-e5b1768e5e8f" class="onebox" target="_blank" rel="noopener nofollow ugc">https://towardsdatascience.com/pytorch-ignite-classifying-tiny-imagenet-with-efficientnet-e5b1768e5e8f</a></p>