Python Forum

Full Version: I get "N/A" labels when implementing object detection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am following this tutorial: https://tensorflow-object-detection-api-...ining.html And after training I use code for object detection. What I get are rectangles with percentage and labels "n/a".
1) Why does this happen? How can I fix that?

Also, I have 10 images. From each image I get 100 objects that depict the same object differently. For instance: from "image_1" I get "cat" 100 different images (from "image_1"). From "image_2" I get 100 different depicted "dog" images. From "image_3" I get 100 different depicted "mouse" images and things go like that. As you can understand every main image is a different class. So, in the label_map.pbtxt things are like that:


    item {
        id: 1
        name: 'cat'
    }
    item {
        id: 2
        name: 'dog'
    }
    item {
        id: 3
        name: 'mouse'
    }

    ...
2) Does the rationale behind label_map.pbtxt make sense? I am asking that in addition/auxiliary to my 1st question to identify if that is the problem...

Update: I also use this command category_index ={'name':'dummyname','id':1} in order to overcome some errors/warnings. Could this be the problem? But, if I remove it the object detection code does not run... (source: https://stackoverflow.com/questions/7148...how-to-fix)