Operating environment: Jetson AGX Orin
Jetpack 6.0
deepstream7.0
question:
The nvinfer of my deepstream pipeline includes a detection model and a classification model,pgie uses yolov7-tiny model, sgie uses resnet model,
The detection model can correctly infer the results,But the classification model inference has no results(The l_class parsed using the following osd probe function is NULL)
GstBuffer *buf = (GstBuffer *) info->data;
NvDsObjectMeta *obj_meta = NULL;
guint vehicle_count = 0;
NvDsMetaList * l_frame = NULL;
NvDsMetaList * l_obj = NULL;
NvDsMetaList * l_class = NULL;
NvDsDisplayMeta *display_meta = NULL;
NvDsClassifierMeta * class_meta = NULL;
guint label_i = 0;
NvDsMetaList * l_label = NULL;
NvDsLabelInfo * label_info = NULL;
NvDsBatchMeta *batch_meta = gst_buffer_get_nvds_batch_meta (buf);
for (l_frame = batch_meta->frame_meta_list; l_frame != NULL; l_frame = l_frame->next)
{
NvDsFrameMeta *frame_meta = (NvDsFrameMeta *) (l_frame->data);
int offset = 0;
if (!frame_meta)
continue;
for (l_obj = frame_meta->obj_meta_list; l_obj != NULL; l_obj = l_obj->next)
{
obj_meta = (NvDsObjectMeta *) (l_obj->data);
if (!obj_meta)
continue;
if (obj_meta->unique_component_id == PRIMARY_DETECTOR_UID)
{
if (obj_meta->class_id == PGIE_CLASS_ID_VEHICLE)
vehicle_count++;
}
for (l_class = obj_meta->classifier_meta_list; l_class != NULL; l_class = l_class->next)
Implementation details:
I used resnet to train a vehicle color classification model (12 categories) and a vehicle type classification model (5 categories).
Use the deepstream pipeline mentioned above,When using vehicle color classification model as sgie, there is no output result,
When using the vehicle type classification model as sgie, there are output results.
I also tried without relying on deepstream, Only use tensorrt to infer resnet model, The model’s inference results are correct,
However, resnet using deepstream inference has a problem with no output results.
My resnet model is a model conversion using “trtexec --onnx=xxx.onnx --saveEngine=xxx.engine”