How to get mask in binary segmentation with torchvision Mask-RCNN?

What is the proper way of getting the best mask that returns? I would like to be uint8 with 0 for background and 1 for selection.