Custom resnet50 classification model secondary-gie0 outputs only first entry in label.txt

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU) Tesla T4
**• DeepStream Version deepstream5.0.1
**• TensorRT Version 7.0
**• NVIDIA GPU Driver Version (valid for GPU only) 440.118.02(10.2)

I print some output inside the parsing function
parse function:

print output:

I found that the probability value output in outputCoverageBuffer is wrong, causing a wrong result .

PGIE config info:
[primary-gie]
enable=1
gpu-id=0
model-engine-file=…/engine/yolov5l_helmet.engine
labelfile-path=…/label/helmet_labels.txt
batch-size=5
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
interval=10
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV5_Helmet.txt

[property]
gpu-id=0
net-scale-factor=0.0039215697906911373
#0=RGB, 1=BGR
model-color-format=0

custom-network-config=yolov3-tiny.cfg

model-file=yolov3-tiny.weights

model-engine-file=…/engine/yolov5l_helmet.engine
labelfile-path=…/label/helmet_labels.txt
process-mode=1

0=FP32, 1=INT8, 2=FP16 mode

network-mode=2
num-detected-classes=2
gie-unique-id=1
network-type=0
#is-classifier=0
output-blob-names=prob

0=Group Rectangles, 1=DBSCAN, 2=NMS, 3= DBSCAN+NMS Hybrid, 4 = None(No clustering)

output-tensor-meta=1
cluster-mode=2
maintain-aspect-ratio=1
parse-bbox-func-name=NvDsInferParseCustomYoloV5
custom-lib-path=…/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo_helmet.so
engine-create-func-name=NvDsInferYoloCudaEngineGet
#scaling-filter=0
#scaling-compute-hw=0

[class-attrs-all]
nms-iou-threshold=0.5
pre-cluster-threshold=0.4

PGIE labels.txt:
helmet
no_helmet

SGIE0 config info:
[secondary-gie0]
enable=1
gpu-id=0
model-engine-file=…/engine/resnet50_secondary0_helmet.engine
labelfile-path=…/label/helmet_secondary0_labels.txt
gie-unique-id=2
operate-on-gie-id=1
config-file=config_infer_secondary0_resnet50_Helmet.txt
operate-on-class-ids=0
batch-size=5
bbox-border-color0=0;0;1;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1

[property]
gpu-id=0
net-scale-factor=1
offsets=103.939;116.779;123.68
#offsets=124;117;104
#net-scale-factor=0.0039215697906911373
#0=RGB, 1=BGR
model-color-format=0
model-engine-file=…/engine/resnet50_secondary0_helmet.engine
labelfile-path=…/label/helmet_secondary0_labels.txt
#1:pgie 2:sgie
process-mode=2

0=FP32, 1=INT8, 2=FP16 mode

network-mode=2
num-detected-classes=3
gie-unique-id=2
operate-on-gie-id=1
operate-on-class-ids=0
batch-size=1
#0: Detector,1: Classifier,2: Segmentation
network-type=1
input-object-min-width=64
input-object-min-height=64
output-blob-names=output1;output2
classifier-async-mode=1
classifier-threshold=0.5
secondary-reinfer-interval=0

0=Group Rectangles, 1=DBSCAN, 2=NMS, 3= DBSCAN+NMS Hybrid, 4 = None(No clustering)

#output-tensor-meta=1
cluster-mode=2
maintain-aspect-ratio=1
parse-classifier-func-name=NvDsInferClassiferParseCustomResnet50_SGIE0
custom-lib-path=/opt/nvidia/deepstream/deepstream/sources/libs/nvdsinfer_customparser/libnvds_infercustomparser.so

[class-attrs-all]
nms-iou-threshold=0.5
pre-cluster-threshold=0.5
eps=0.2

SGIE0 labels.txt:
belt_helmet;right_helmet;wrong_helmet

outputCoverageBuffer is data from the output layer , it should indicates the model generate wrong result.

thanks,I have checked that it is caused by net-scale-factor error value, I have two new questions.

  1. secondary gie1 depend on secondary gie0’s output result in my config file,but i found secondary gie1 is invalid and found a topic on this issue in the forum, can you provide some good suggestions? Secondary gie depend on another secondary gie - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums

2.For secondary gie0’s output result,I found that the probability value of class-id 0 is always very small and inconsistent with the results I got during the training model process. why is there such a result?

Sorry! Missed this update. Do you still need the support about this?

BTW, please create new topic for new issue

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