29.[DSx_All_App] Debug Tips for DeepStream Nvinferserver Accuracy Issue
This corresponds to the Debug Tips for DeepStream Accuracy Issue and teaches you how to set relevant parameters in nvinferserver.
29.1 Input scale & offset
infer_config {
preprocess {
normalize {
scale_factor: 0.0039215697906911373
channel_offsets: [0, 0, 0]
}
}
}
29.2 Input Order
infer_config {
preprocess {
tensor_order: TENSOR_ORDER_LINEAR
network_format: IMAGE_FORMAT_RGB
}
}
29.3 Dims
Each model also needs a specific config.pbtxt file in its subdirectory for nvinferser. We set the imputlayer and outputlayer dims in the file.
input [
{
dims: [3, 224, 224]
}
]
output [
{
dims: [6, 1, 1]
}
]
For the nvinferserver config file:
infer_config {
backend {
inputs: [ {
dims: [3, 224, 224]
}]
}
}
29.4 scale and padding
infer_config {
preprocess {
maintain_aspect_ratio: 1
symmetric_padding: 1
}
}
29.5 inference precision
For the config.pbtxt file:
input [
{
data_type: TYPE_FP16
}
]
For the nvinferserver config file:
infer_config {
backend {
inputs: [ {
data_type: TYPE_FP16
}]
}
}
29.6 threshold
postprocess {
detection {
nms {
confidence_threshold:0.2
topk:20
iou_threshold:0.5
}
}
}