def METHOD_NAME(self, mask):
    contours, hierarchy = cv2.findContours(
        (mask).astype(np.uint8), cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
    segmentation = []
    for contour in contours:
        contour_list = contour.flatten().tolist()
        if len(contour_list) > 4:
            segmentation.append(contour_list)
    return segmentation