예제 #1
0
 def decompress_mask(self, compressed_mask):
     '''
     decompress mask from json files
     '''
     mask = np.array(decompress_mask(compressed_mask))
     mask = np.expand_dims(mask, axis=0)
     return mask
예제 #2
0
 def init_scene(self, load_receps):
     if load_receps and os.path.isfile(self.recep_file):
         with open(self.recep_file, 'r') as f:
             self.receptacles = json.load(f)
         for recep_id, recep in self.receptacles.items():
             if 'mask' in recep:
                 recep['mask'] = decompress_mask(recep['mask'])
     else:
         self.receptacles = {}
         if self.exhaustive_exploration:
             self.explore_scene_exhaustively()
         else:
             self.explore_scene()
예제 #3
0
 def decompress_mask(compressed_mask):
     return image_util.decompress_mask(compressed_mask)