YunghuiHsu / deepstream-yolo-pose

Use Deepstream python API to extract the model output tensor and customize the post-processing of YOLO-Pose
https://hackmd.io/JQAXmJzuTyW22-x3k-0Zvw
Apache License 2.0
57 stars 14 forks source link

No output #3

Closed AyanRoyChowdhury97 closed 11 months ago

AyanRoyChowdhury97 commented 1 year ago

Hi, I tried running the python app and it works, atleast I can see the **PERF status and it doesn't crash. I want to see the results on my display but I don't see them. Normally, when using the c++ apps, we can set sink and tiled display directly in the config file but how do I do the same here?

Thank you in advance for your help. Ayan

YunghuiHsu commented 1 year ago

Hi Ayan:

What kind of results do you want to see and where?

I'm handling the meta information in def add_obj_meta()

def add_obj_meta(frame_meta, batch_meta, boxes, confs):
    pyds.nvds_acquire_meta_lock(batch_meta)
    for i, (box, conf) in enumerate(zip(boxes, confs)):
        new_object = pyds.nvds_acquire_obj_meta_from_pool(batch_meta)
        new_object.unique_component_id = 1
        new_object.class_id = 0
        new_object.confidence = conf
        new_object.obj_label = 'person'
phamminhhanhuet commented 1 year ago

Hi, I have the same problem here. I want to display frames on the screen with detected pose drawing on. The app run well and I can print the output boxes, confidences, etc, but I don't know how to display frames on screen. Could you show me how? Thank you for considering.

YunghuiHsu commented 1 year ago

Hi phamminhhanhuet :

You need to acquire the display meta object to update the information to be displayed on the screen.

Refer to the flow in the sample code in deepstream_python_apps/apps/deepstream-test2 /deepstream_test_2.py


Pad Probe in `nvdosd` object
osdsinkpad = nvosd.get_static_pad("sink")
if not osdsinkpad:
        sys.stderr.write(" Unable to get sink pad of nvosd \n")    
osdsinkpad.add_probe(Gst.PadProbeType.BUFFER, osd_sink_pad_buffer_probe, 0)

 # start play back and listed to events    
pipeline.set_state(Gst.State.PLAYING)
phamminhhanhuet commented 1 year ago

Hi YunghuiHsu,

Thank you for instant reply. I carefully followed your guide but still there was nothing displayed on screen. Maybe the problem laid with my device. I will check it and find way to solve the problem.