(self, path, mask_type)
return Image.fromarray(mask)
Read Masks now only support bbox
Read Masks now only support bbox
Read Masks now only support bbox
def read_mask(self, path, mask_type):
        """
        Read Masks now only support bbox
        """
        if mask_type == 'random':
            bbox = InpaintDataset.random_bbox(self.resize_shape, self.random_bbox_margin, self.random_bbox_shape)
        else:
            bbox = InpaintDataset.read_bbox(path)
        mask = np.tile((InpaintDataset.bbox2mask(bbox, self.resize_shape)*255).astype(np.uint8), (1,1,3))
        #print(mask.shape)
        #print(mask)
        return Image.fromarray(mask)
def read_mask ( self , path , mask_type ) : if mask_type == 'random' : bbox = InpaintDataset . random_bbox ( self . resize_shape , self . random_bbox_margin , self . random_bbox_shape ) else : bbox = InpaintDataset . read_bbox ( path ) mask = np . tile ( ( InpaintDataset . bbox2mask ( bbox , self . resize_shape ) * 255 ) . astype ( np . uint8 ) , ( 1 , 1 , 3 ) ) #print(mask.shape) #print(mask) return Image . fromarray ( mask )