Yolov5 Segmentation model deployed on DeepStream5.1, the mask to the original image is wrong


I am currently facing the mask is not displaying correctly, how do I scale the mask?

Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• 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)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
• The pipeline being used

• Hardware Platform (Jetson / GPU):Xavier jetson
• DeepStream Version: 5.1
• JetPack Version (valid for Jetson only): 4.5
• TensorRT Version: 7.1.3
• Issue Type( questions, new requirements, bugs):questions

I found someone has raised the same question, but they did not provide a solution.
as follows:
In instance segmentation, what should be the data in the mask? - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums

I am currently facing the same issue where the mask is not displaying correctly. What should I modify to fix this? I have been thinking for a long time, but I haven’t been able to find a solution, so I would be very grateful for your help. Thank you.

  1. which sample are you testing?
    2 . can the model work fine by the thirpart tool?
  2. could you elaborate on " the mask is not displaying"? how to reproduce this issue?

I solved it, Thanks!

1 Like

could you share the issue and root cause/solution? Thanks!

I modified the value of the “masks.data”:

float* rawMask = reinterpret_cast<float *>(masks.data);
    memcpy (obj.mask, rawMask, obj.mask_size);

The origin mask image:

Crop the object mask area in the image:

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