MCPcopy
hub / github.com/msracver/Deformable-ConvNets / gt_roidb

Method gt_roidb

lib/dataset/coco.py:127–140  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

125 return image_path
126
127 def gt_roidb(self):
128 cache_file = os.path.join(self.cache_path, self.name + '_gt_roidb.pkl')
129 if os.path.exists(cache_file):
130 with open(cache_file, 'rb') as fid:
131 roidb = cPickle.load(fid)
132 print '{} gt roidb loaded from {}'.format(self.name, cache_file)
133 return roidb
134
135 gt_roidb = [self._load_coco_annotation(index) for index in self.image_set_index]
136 with open(cache_file, 'wb') as fid:
137 cPickle.dump(gt_roidb, fid, cPickle.HIGHEST_PROTOCOL)
138 print 'wrote gt roidb to {}'.format(cache_file)
139
140 return gt_roidb
141
142 def _load_coco_annotation(self, index):
143 """

Callers

nothing calls this directly

Calls 2

_load_coco_annotationMethod · 0.95
loadMethod · 0.45

Tested by

no test coverage detected