marcoslucianops / DeepStream-Yolo

NVIDIA DeepStream SDK 7.0 / 6.4 / 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models
MIT License
1.39k stars 344 forks source link

Call GPIO #443

Open ghty11468 opened 10 months ago

ghty11468 commented 10 months ago

I would like to ask the author, I want to call GPIO to control external hardware in this project. Where should I rewrite it?

marcoslucianops commented 10 months ago

It's better to use database/kafka, in my opinion, to save the results and use another code to control de GPIO. But you can put the GPIO code in the DeepStream code (Python would be the easiest way).

ghty11468 commented 10 months ago

It's better to use database/kafka, in my opinion, to save the results and use another code to control de GPIO. But you can put the GPIO code in the DeepStream code (Python would be the easiest way).

You are right. But I still don’t understand how to add GPIO code (controlled by python) to Deepstream. For example, I want to add the GPIO control code to the back of the NMS in the inference process of YOLOV5, where should I add it?

marcoslucianops commented 10 months ago

Before the NMS? If so, why?

ghty11468 commented 10 months ago

Before the NMS? If so, why?

It's not the front of NMS, it's the back of NMS. After the NMS is executed, the detection results are available. I use the detection results obtained to call the GPIO interface to implement the operation of external hardware.

marcoslucianops commented 10 months ago

You can set it in the pad_buffer_probe function in any deepstream_python_apps after the frame_meta or obj_meta cast depending on what you want to do.

ghty11468 commented 10 months ago

You can set it in the pad_buffer_probe function in any deepstream_python_apps after the frame_meta or obj_meta cast depending on what you want to do.

What the author means is that this project cannot be completed. Does it need to be set up in deepstream in the python environment? My jetson nano has a deepstream image of the python environment

marcoslucianops commented 10 months ago

You need to install the python bindings to use the DeepStream python code. https://github.com/NVIDIA-AI-IOT/deepstream_python_apps