(dusty-nv/jetson-inference) Accessing labels

I am following the tutorials for Jetson Nano Dev on github (dusty-nv/jetson-inference).

Things are working as expected, but I couldn’t figure out how to extract labels/class id. Based on what I can see from these sites -

I think it should be doable, but I can’t seem to figure it out. Do I have to download the label file (or make a list) and import and use that? Also, when I tried accessing ClassID inside of detectNet.Detection Object - by doing this -

detections = net.Detect(input_image, rgb.shape[1], rgb.shape[0])
for detection in detections:

It didn’t work for me… Its output was 70. If someone could please point me in the right direction, I would appreciate it.



ClassID can be found in the c++ interface here:


1 Like

Hi AastaLLL

By any chance you have the same information for Python?



Hi @a428tm, please see this post: Using detectNet to get coordinates of an object detected by camera

The Python detectNet.Detection object has similar members that you can access the ClassID and bounding box coordinates through.

1 Like