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.45k stars 356 forks source link

save gie-kitti in deepstraem #459

Open khosrooo opened 1 year ago

khosrooo commented 1 year ago

Hello i want to compare the result of deepstream with deepstream_app_config.txt and deepstream with python biding by meteric precision (coco vadiation ) for save anotating label in format desire i add this part to deepstream_test_1 ` except StopIteration: break

    #Intiallizing object counter with 0.
    obj_counter = {
        PGIE_CLASS_ID_PERSON: 0,
    }

    frame_number=frame_meta.frame_num
    num_rects = frame_meta.num_obj_meta

    with open('saved_new_label/yolov5l/output_frame_num_{}.txt'.format(frame_number), 'w') as f:

        l_obj=frame_meta.obj_meta_list
        while l_obj is not None:
            try:
                # Casting l_obj.data to pyds.NvDsObjectMeta
                obj_meta=pyds.NvDsObjectMeta.cast(l_obj.data)
            except StopIteration:
                break
            obj_counter[obj_meta.class_id] += 1
            obj_meta.rect_params.border_color.set(0.0, 0.0, 1.0, 0.8) #0.8 is alpha (opacity)
            rect_params = obj_meta.rect_params
            print(rect_params.top)
            f.write("[{},{}, {}, {}, {}, {}]".format(obj_meta.class_id,int(rect_params.left), int(rect_params.top), int(rect_params.width+rect_params.left), int(rect_params.height+rect_params.top), obj_meta.confidence)) 
                                     ....

`

but when save anotating and compare with ground truth annotating i get 0.28 precision with python biding deepstream and 0.88 precision with deepstream_app_config ( circumstance is completely same the video is same and the drawing bonding box is same and the weight is yolov5l) but the strange point is the result video in python and c_config is near completely same but the saved label show diffrent result i think the saved annotate make mistake

marcoslucianops commented 1 year ago

I will add the COCO eval code very soon.

khosrooo commented 1 year ago

Thank u so much