return ground truth image regions database :return: imdb[image_index]['', 'flipped']
(self)
| 102 | return seg_rec |
| 103 | |
| 104 | def gt_segdb(self): |
| 105 | """ |
| 106 | return ground truth image regions database |
| 107 | :return: imdb[image_index]['', 'flipped'] |
| 108 | """ |
| 109 | cache_file = os.path.join(self.cache_path, self.name + '_gt_segdb.pkl') |
| 110 | if os.path.exists(cache_file): |
| 111 | with open(cache_file, 'rb') as fid: |
| 112 | segdb = cPickle.load(fid) |
| 113 | print '{} gt segdb loaded from {}'.format(self.name, cache_file) |
| 114 | return segdb |
| 115 | |
| 116 | gt_segdb = [self.load_segdb_from_index(index) for index in self.image_set_index] |
| 117 | with open(cache_file, 'wb') as fid: |
| 118 | cPickle.dump(gt_segdb, fid, cPickle.HIGHEST_PROTOCOL) |
| 119 | print 'wrote gt segdb to {}'.format(cache_file) |
| 120 | |
| 121 | return gt_segdb |
| 122 | |
| 123 | def getpallete(self, num_cls): |
| 124 | """ |