Hi,
Hardware and Software Details :
Device : Jetson NX-Xavier.
Package: nvidia-jetpack
Version: 4.4.1-b50
Architecture: arm64
TensorRT : 7.1.3-1+cuda10.2
Deepstream : 5
Problem :
I am using deepstream-imagedata-multistream python test application in DS-5.
In some other DS application with C code mention below I am able to get the result of classifier (label_info->result_label).
for (l_class = obj_meta->classifier_meta_list; l_class != NULL;
l_class = l_class->next) {
class_meta = (NvDsClassifierMeta *)(l_class->data);
if (!class_meta)
continue;
if (class_meta->unique_component_id == SECONDARY_CLASSIFIER_UID) {
for ( label_i = 0, l_label = class_meta->label_info_list;
label_i < class_meta->num_labels && l_label; label_i++,
l_label = l_label->next) {
label_info = (NvDsLabelInfo *)(l_label->data);
if (label_info) {
if (label_info->label_id == 0 && label_info->result_class_id == 1) {
**g_print ("Plate License %s\n",label_info->result_label);**
}
}
}
}
For above code I am getting correct output as expected Plate License 113BJ375
but when I am implementing in python I am getting different result.
while l_class is not None:
class_meta = pyds.NvDsClassifierMeta.cast(l_class.data)
if class_meta.unique_component_id == SECONDARY_CLASSIFIER_UID:
label_i = 0
l_label = class_meta.label_info_list
# print("l_label is :",l_label)
while l_label is not None:
if label_i < class_meta.num_labels:
label_info = pyds.NvDsLabelInfo.cast(l_label.data)
# print(" result_prob : ",label_info.result_prob)
if label_info.label_id == 0 and label_info.result_class_id == 1:
#number_plate = np.array2string(label_info.result_label)
#print(" number_plate : ",number_plate)
print("Number Plate : %s"%label_info.result_label)
label_i += 1
try:
l_label = l_label.next
except StopIteration:
break
try:
l_class = l_class.next
except StopIteration:
break
For this code I am getting result like
[ 910445127 875647826 56 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 1
0 1065242403 0 65 0 877607360
127 875747280 127 0 0 0
0 0 0 0 0 64
0 164 0 130 0 631995120
0 0 0 0 0 139
0 60 0 0 1072693248 0
0 140 0 40 0 0
0 0 0 141 0 44
0 858303104 101 0 0 0
0 0 0 160 0 1029
0 0 0 0 0 0
0 0 0 0 0 0
0 632937808 0 1 0 0
0 -1924651544 127 0 0 -1924651120
127 0 0 0 0 48641
0 -1]
please help me out so that I can get the same result as I am getting in the C code.
Thanks.