Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) jetson xavier • DeepStream Version 6.0 • JetPack Version (valid for Jetson only) 4.6.1 • TensorRT Version 8.2.1 • NVIDIA GPU Driver Version (valid for GPU only) • Issue Type( questions, new requirements, bugs) bug
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
Tried to use a custom segmentation model BiSeNet in deepstream. getting an empty screen as an output in nvsegvisual.
tried using both .onxx file and .trt file.
tried changing input color format from rgb to bgr.
tried num-detected-classes as 0,1,2 still same results.
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
hi @fanzh ,
i am currently using bisenetv2, trt is working. Tried changing preprocess parameters as to match BiSeNet/segment.cpp at master · CoinCheung/BiSeNet · GitHub params. cannot find any parameter for variance in nvinfer so changed net-scale-factor and offsets accordingly but still getting same issue.
what i did to input-
took value of variance as 0.225
divided all offset values by scale
multiplied scale by variance
why-
deepstream uses preprocessing as y = net scale factor*(x-mean)
in bisenet prepprocessing is given as -
array<float, 3> mean{0.485f, 0.456f, 0.406f};
array<float, 3> variance{0.229f, 0.224f, 0.225f};
float scale = 1.f / 255.f;
for (int i{0}; i < 3; ++ i) {
variance[i] = 1.f / variance[i];
}
vector<float> data(iH * iW * 3);
for (int h{0}; h < iH; ++h) {
cv::Vec3b *p = im.ptr<cv::Vec3b>(h);
for (int w{0}; w < iW; ++w) {
for (int c{0}; c < 3; ++c) {
int idx = (2 - c) * iH * iW + h * iW + w; // to rgb order
data[idx] = (p[w][c] * scale - mean[c]) * variance[c];
}
}
}
looked at sample apps for segmentation they work in same way as my code only diffrence is in config file and model as i am using BiSeNet and they use Unet.
please set segmentation-output-order=0, pleae find it in Gst-nvinfer — DeepStream 6.1.1 Release documentation.
nvinfer is opensource, you can print the classes number in SegmentPostprocessor::fillSegmentationOutput() of nvdsinfer_context_impl_output_parsing.cpp, this model 's classes should be 19.
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