How to do instance segmentation and embed the segmentation mask into a secondary detector for recognition?

yes, generate_mask_polygon can get the polygon coordinates of mask. In deepstream_mrcnn_test.cpp, these coordinates are used to send kafka.