Human detection and tracking

Hello dear community.

I am developing a project and I need to detect human bodies. I have followed hello_AI and I am able to do object detection.
but I have not been able only to detect persons…

  1. What part of the code of detectNet.cpp should change in order only to detect persons?
  2. How can I get the coordinates of the bounding box? In OpenCV, they give you X, Y, H, W coordinates but I am using jetson.utils so I do not know how to get the coordinates.
    I am using python3
  3. What could be the best human detection net? because I am using ssd-mobilenet-v2 as jetson_inference mention.

If you want to change detectnet.py, you can do something like the following:

for det in detections:
    class_name = net.GetClassDesc(det.ClassID)

    if class_name == 'person':
        # do something in case of person

However, non-persons will still show up in the overlay. If you want the other classes to be truly ignored, you can edit jetson-inference/data/networks/SSD-Inception-v2/ssd_coco_labels.txt and change the other non-person lines to void. detectNet will ignore any classes named void

See the jetson.inference.detectNet.Detection documentation here for a list of the coordinates you can access:
https://rawgit.com/dusty-nv/jetson-inference/dev/docs/html/python/jetson.inference.html#detectNet

Thanks a lot. It helped me so much.
I am still unable to draw a rectangle as OpenCV and get the coordinates.
Btw, I do not why I still get this message after running the python script.

nvbuf_utils: dmabuf_fd 1239 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed… Exiting
Can you help me to solve this?
Thanks a lot

That’s a spurious warning that I can’t suppress, so you can ignore it

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.