How to get classifier data in deepstream python apps? I converted the LPR model from C to python and added these lines in the buffer probe function which enabled me to get the classifier data. But when I am doing the same for other secondary classifiers it is not working. like in test app 2 I am unable to get classifier data from this piece of code
l_class = obj_meta.classifier_meta_list
#print(l_class)
while l_class is not None:
try:
class_meta = pyds.NvDsClassifierMeta.cast(l_class.data)
except StopIteration:
break
l_label = class_meta.label_info_list
# print(class_meta.num_labels)
while l_label is not None:
try:
label_info = pyds.NvDsLabelInfo.cast(l_label.data)
except StopIteration:
break
print(label_info.result_label)
# print(long_to_int(obj_meta.object_id))
x = obj_meta.rect_params.left
y = obj_meta.rect_params.top
w = obj_meta.rect_params.width
h = obj_meta.rect_params.height
lp_dict[frame_meta.pad_index][obj_meta.object_id] = [label_info.result_label, obj_meta.confidence, int(x), int(y), int(x+w), int(y+h)]
try:
l_label=l_label.next
except StopIteration:
break
try:
l_class=l_class.next
except StopIteration:
break
I solved it by removing the classifier-async-mode. I am getting classifier info for the caffemodel provided for test app 2. This worked because there was no tracker in my app.
But it is not working for vehicletypenet which is etlt with or without tracker.
This is the config for vehicletypenet as secondary:
[property]
gpu-id=0
net-scale-factor=0.0039215697906911373
int8-calib-file=./vehicletypenet_int8.txt
labelfile-path=./labels_sgie.txt
tlt-encoded-model=./resnet18_vehicletypenet_pruned.etlt
tlt-model-key=tlt_encode
input-dims=3;224;224;0
uff-input-blob-name=input_1
There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks
@preronamajumder sorry for the late, is this topic still need to be supported?