Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JVond
Beginner
459 Views

Labels for class ID

Jump to solution

New to the compute stick. I've been using the google coral and jetson nano.

I was running the alexnet and googlenet caffe model and got outputs with no labels. Is there a list somewhere or a way to input labels?

googlenet

classid probability

------- -----------

616  0.4355762 

50   0.1069827 

836  0.0557207 

36   0.0534245 

429  0.0518655 

494  0.0363212 

452  0.0321387 

544  0.0257031 

600  0.0205605 

772  0.0144706 

alexnet

classid probability

------- -----------

88   0.9810570 

12   0.0157526 

7   0.0009286 

90   0.0009172 

14   0.0005626 

136  0.0002139 

92   0.0001659 

129  0.0001552 

91   0.0000463 

17   0.0000393  

 

0 Kudos
1 Solution
Aroop_B_Intel
Employee
228 Views

Hello JVond,

 

GoogLeNet v1 was trained on ILSVRC2012 sysnset_words.txt from http://dl.caffe.berkeleyvision.org/caffe_ilsvrc12.tar.gz . You can rename the synset_words.txt file to "googlenet-v1.labels" and move it to the same directory as your GoogLeNet model.

 

Alexnet was trained on Imagenet so the same label file as above should work.

 

Please give it a try and let me know if you have any additional questions.

 

Regards,

Aroop

View solution in original post

9 Replies
Aroop_B_Intel
Employee
229 Views

Hello JVond,

 

GoogLeNet v1 was trained on ILSVRC2012 sysnset_words.txt from http://dl.caffe.berkeleyvision.org/caffe_ilsvrc12.tar.gz . You can rename the synset_words.txt file to "googlenet-v1.labels" and move it to the same directory as your GoogLeNet model.

 

Alexnet was trained on Imagenet so the same label file as above should work.

 

Please give it a try and let me know if you have any additional questions.

 

Regards,

Aroop

View solution in original post

JVond
Beginner
228 Views

I put the file in the folder with the Alexnet.xml file... still just displays the number. Is there a tag to make it use the label file or what is the file that alexnet uses that needs to be replaced?

Aroop_B_Intel
Employee
228 Views

Hi JVond,

 

Depending on the sample that you are using, you can specify the labels file with "--labels". You can also rename the labels file to match your .xml file and place it in the same directory.

For example: The corresponding label file for "example.xml" would be "example.labels".

 

Regards,

Aroop

JVond
Beginner
228 Views

That worked...now i'm noticing a new issue. It looks like it is one off. I am using the sample image and imagenet labels from the google coral. It is identifying (with 99%) certainty that it is 88 (african grey) when it is clearly 89 (macaw). Do you have a link to a fresh imagenet labels file so I can see if it somehow differs in your models?

JVond
Beginner
228 Views
JVond
Beginner
228 Views

Why don't the labels come with the models or be available for download on github?

Aroop_B_Intel
Employee
228 Views

Where did you download Alexnet from? Could you share a link? I am downloading the Alexnet model from the Open Model Zoo using the model downloader and it categorizes a macaw correctly with classid 88.

 

Regards,

Aroop

JVond
Beginner
228 Views

I downloaded it the same as you from the openzoo downloader. And yes, it comes up correct as "88". What I'm telling you is the labels file I used from my google coral has the macaw as 89. So the files are off by one.

 

What i'm asking is why intel doesn't provide copies of the labels to prevent confusion and issues like this?

Aroop_B_Intel
Employee
228 Views

I understand how this can be confusing. However, I am unsure why the developers chose not to include the label files with the models. I will definitely provide your feedback to the appropriate team.

 

Regards,

Aroop

Reply