title: Tracking using Masks as input
body: <p>I am currently using a CNN based object detection module which gives me objects which I then use as input for tracking using OpenCV. The object detection module produced rectangles until now but I want to shift to a segmentation module like  <a href="https://github.com/matterport/Mask_RCNN" rel="nofollow noreferrer">Mask-RCNN</a> which outputs masks along with rectangles for each object. Masks are a more accurate representation of an object. All the trackers in OpenCV take rectangles as input. Is there any way to use the masks for tracking an object rather than the boxes. I can convert the masks to contours if that will help me track the object. </p>