How can I find Imagenet data labels?
Asked Answered
H

4

18

I have two questions about how to load Imagenet datas. I downloaded ILSVRC2012 validation sets(Cause training sets are too large) but I have two problems.

  1. I can't understand how can I find out the labels. There are only jpeg files with file names like "ILSVRC2012_val_00000001.JPEG" but there's no labels. How can I find them?

  2. As far as I know, Imagenet uses 224 * 224 pixel image and the problem is just "classification" not "detection", but ILSVRC2012 sets have much more and different pixel sizes. So, how can I get proper boxes for 224 * 224 pixels?

Hampson answered 22/11, 2016 at 14:38 Comment(7)
I didn't download the dataset so I can't answer the first part but for sure there is sort of files maybe indicate the class number. regarding your second question most of the papers I read so far indicate that they chose their input to be 224. having different image size is not a problem if you can get rid of th FC layers or even by resizing your input or sliding over your inputUnprincipled
See also: Where can I get labels for small ImageNet?Snowber
You might be able to answer How can I get the ImageNet ILSVRC 2012 data used for the classification challenge?Snowber
Images are resized to 224x224 for the network.Mailbag
Thank you All. I resolved the problem.Hampson
@J.Park how did you resolve it?Whitefly
Sorry for awakening such an old thread, I am struggling with the issue as well. I am looking at "ILSVRC2010_validation_ground_truth.txt" which contains a corresponding list of labels for the validation data. Thing is, the list is of class keys (int type) and I did not understand where I see their corresponding synsent. Something of the sort: {0: (n12345678, 'Shark'), 1: (n12345679, dog)}Tyrosine
A
16
  1. You will download three tar archives: one for training data, one for validation data, and one for test data.

    Training data is contained in 1000 folders, one folder per class (each folder should contain 1,300 JPEG images). Validation data is a single folder with 50k JPEG images, look for the corresponding ILSVRC2012_validation_ground_truth.txt file in (as darren1231 mentioned, it needs to be downloaded separately as part of DevKit).

Test data is similar to validation data, but it does not have labels (labels are not provided to you because you need to submit your predicted labels to them, as part of the competition).

  1. ImageNet images have variable resolution, 482x415 on average, and it's up to you how you want to process them to train your model. Most people process it as following: First downsize each image so that its shorter side is 256 pixels. Then crop a random 224x224 patch. Use those patches for training (you will get different crops each epoch). During test, do the same, but extract a center 224x224 patch, and use that for evaluating classification accuracy. Some people also use multiple patches for testing. Again, it's up to you, and you can use higher resolution if you like.
Artel answered 8/1, 2018 at 18:29 Comment(0)
S
5

It's in the Development kit (Task 1 & 2) The filename called "ILSVRC2012_validation_ground_truth.txt"

Synapse answered 2/11, 2017 at 2:41 Comment(0)
D
1

I find this in my folder: imageNet/imagenet-object-localization-challenge/ILSVRC/Annotations/CLS-LOC/val

( this is class name: n01751748 )

<annotation>
    <folder>val</folder>
    <filename>ILSVRC2012_val_00000001</filename>
    <source>
        <database>ILSVRC_2012</database>
    </source>
    <size>
        <width>500</width>
        <height>375</height>
        <depth>3</depth>
    </size>
    <segmented>0</segmented>
    <object>
        <name>n01751748</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <difficult>0</difficult>
        <bndbox>
            <xmin>111</xmin>
            <ymin>108</ymin>
            <xmax>441</xmax>
            <ymax>193</ymax>
        </bndbox>
    </object>
</annotation>

Dozy answered 25/2, 2022 at 15:13 Comment(0)
G
0

Make sure that you download from here and you unpack each file .tar in a folder with the synsent number of each of classes. It is the best way to you not mix the pics.

Githens answered 25/7, 2017 at 0:33 Comment(1)
This link is broken. I think the official download portal is here: image-net.org/requestPhilbo

© 2022 - 2024 — McMap. All rights reserved.