Thanks for the help, my solution is below.
def random_colour_masks(image):
    colours = [[0, 255, 0],[0, 0, 255],[255, 0, 0],[0, 255, 255],[255, 255, 0],[255, 0, 255],[80, 70, 180],[250, 80, 190],[245, 145, 50],[70, 150, 250],[50, 190, 190]]
    r = np.zeros_like(image).astype(np.uint8)
    g = np.zeros_like(image).astype(np.uint8)
    b = np.zeros_like(image).astype(np.uint8)
    r[image == 1], g[image == 1], b[image == 1] = colours[random.randrange(0,10)]
    coloured_mask = np.stack([r, g, b], axis=2)
    return coloured_mask   

for batch_idx, (data, target) in enumerate(load_dataset()):

    data = data.cuda()

    output = model(data)
    
    boxes = output[0]["boxes"]
    labels = output[0]["labels"]
    scores = output[0]["scores"]
    masks = (output[0]['masks']>0.5).squeeze().detach().cpu().numpy()
    
    img_path = "images/my-img.jpg"
    
    img = cv2.imread(img_path)
    img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
        
    for i in range(len(masks)):
        rgb_mask = random_colour_masks(masks[i])
    
        #convert mask to grayscale (optimise to directly convert mask to grayscale without first convertingit to color)
        gray_mask = cv2.cvtColor(rgb_mask, cv2.COLOR_RGB2GRAY)
        
        # Find contours:
        contours, hierarchy = cv2.findContours(gray_mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)
        
        # Draw contours:
        cv2.drawContours(img, contours, -1, (0, 255, 0),20)
    
    plt.imshow(img)