Yolov3 bounding boxes outside osd screen

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): Jetson AGX Xavier
• DeepStream Version: 5.0 GA
• JetPack Version (valid for Jetson only): 4.4
• TensorRT Version: 7.1.3
• Issue Type( questions, new requirements, bugs): bugs
• How to reproduce the issue ?:

  • Trained TLT Yolov3 model with custom data
  • DS model config file:

[property]
gpu-id=0
net-scale-factor=1.0
offsets=103.939;116.779;123.68
model-color-format=1
labelfile-path=./models/yolov3_custom/yolov3_labels.txt
tlt-encoded-model=./models/yolov3_custom/yolo_resnet18_epoch_008.etlt
tlt-model-key=[my-key]
model-engine-file=./models/yolov3_custom/yolo_resnet18_epoch_008.etlt_b1_gpu0_fp32.engine
#channel;height;width;input-order, for input-order: 0=NCHW, 1=NHWC
#uff-input-dims DEPRECATED
#uff-input-dims=3;704;960;0
infer-dims=3;704;960
uff-input-order=0
uff-input-blob-name=Input
batch-size=1
#0=FP32, 1=INT8, 2=FP16 mode
network-mode=0
num-detected-classes=2
interval=0
gie-unique-id=1
#is-classifier=0
#0: Detector, 1: Classifier, 2: Segmentation, 3: Instance Segmentation
network-type=0
#0: OpenCV groupRectangles(), 1: DBSCAN, 2: Non Maximum Suppression, 3: DBSCAN + NMS Hybrid, 4:No clustering
cluster-mode=3
output-blob-names=BatchedNMS
#use custom parser for yolov3, instead of the default custom parser
parse-bbox-func-name=NvDsInferParseCustomYOLOV3TLT
#custom-lib-path=./nvdsinfer_customparser_yolov3_tlt/libnvds_infercustomparser_yolov3_tlt.so
custom-lib-path=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_infercustomparser.so
[class-attrs-all]
pre-cluster-threshold=0.5
roi-top-offset=0
roi-bottom-offset=0
detected-min-w=0
detected-min-h=0
detected-max-w=0
detected-max-h=0

DS pipeline .dot file:

I used this same custom pipeline for the pre-trained model from this NVIDIA-AI-IOT/deepstream_tlt_apps repo and everything work as expected, however, when I replaced the model with another model I trained using TLT, some bboxes are not rendered correctly on the screen. As you can see below, one of the bbox is outside of the the output screen (its right edge got cut-off):

I’m not sure if bbox cut-off this is expected output?

Hey, what object are you detecting , I’m not sure whether there is really an object and whether you want to keep it or not

Hi @bcao,

I ask if it’s possible for a bbox to be drawn outside of the screen like shown shown the photo, the NvDsInferParseCustomYOLOV3TLT function is responsible for parsing the output of the yolov3’s outputs, isn’t it supposed to make sure that no bbox is outside of the frame?

NvDsInferParseCustomYOLOV3TLT will not add some bbox which outside the screen, you can see the CLIP macro.