Custom deepstream ssd parser python app

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) T4
• DeepStream Version 6.0
• JetPack Version (valid for Jetson only)
• TensorRT Version 8.0
• NVIDIA GPU Driver Version (valid for GPU only) 11.4
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

im using onnx model loaded through triton server ,

i get the metadata , but im not getting the bouding box . Could you please help

in the parser.py below output layers are added output, 573, 625, 677 ,

def nvds_infer_parse_custom_tf_ssd(output_layer_info, detection_param, box_size_param,                                   nms_param=NmsParam()):

    """ Get data from output_layer_info and fill object_list

        with several NvDsInferObjectDetectionInfo.

        Keyword arguments:

        - output_layer_info : represents the neural network's output.

            (NvDsInferLayerInfo list)

        - detection_param : contains per class threshold.

            (DetectionParam)

        - box_size_param : element containing information to discard boxes

            that are too small. (BoxSizeParam)

        - nms_param : contains information for performing non maximal

            suppression. (NmsParam)

        Return:

        - Bounding boxes. (NvDsInferObjectDetectionInfo list)

    """





    num_detection_layer = layer_finder(output_layer_info, "output")
    score_layer = layer_finder(output_layer_info, "573")
    class_layer = layer_finder(output_layer_info, "625")
    box_layer = layer_finder(output_layer_info, "677")

HI @h9945394143
You need to add parser code to parse the output data and generate the BBOXes

its yolov5 model , i have generated so file from nvdsparserbox_yolo.cpp (attached file)

libnvdsinfer_custom_impl_Yolo.so is generated so file used .

below is my config file



  preprocess {
    network_format: IMAGE_FORMAT_RGB
    tensor_order: TENSOR_ORDER_LINEAR
    maintain_aspect_ratio: 0
    frame_scaling_hw: FRAME_SCALING_HW_DEFAULT
    frame_scaling_filter: 1
    normalize {
      scale_factor: 0.0078125
      channel_offsets: [128, 128, 128]
    }
  }

  

  postprocess {
    labelfile_path: "labels.txt"
        detection {
      num_detected_classes: 1
      custom_parse_bbox_func:"NvDsInferParseCustomYoloV5"
                  
      nms {
        confidence_threshold: 0.25
        iou_threshold: 0.3
        topk : 20
      }
    }
  }


  

  extra {
    copy_input_to_host_buffers: false
    output_buffer_pool_size: 2
  }

  custom_lib {
    path:"libnvdsinfer_custom_impl_Yolo.so"

  }
}
input_control {
  process_mode: PROCESS_MODE_FULL_FRAME
  interval: 0
}
output_control {
  output_tensor_meta: true
}

nvdsparsebbox_Yolo.cpp (5.5 KB)

Hi @h9945394143
Did Yolov5 giving wrong output - #15 by mchi help you out?

its been fixed . please close it .

1 Like

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