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…
What part of the code of detectNet.cpp should change in order only to detect persons?
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
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
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