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

Method gt_segdb

lib/dataset/cityscape.py:104–121  ·  view source on GitHub ↗

return ground truth image regions database :return: imdb[image_index]['', 'flipped']

(self)

Source from the content-addressed store, hash-verified

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 """

Callers 3

load_gt_segdbFunction · 0.45
test_deeplabFunction · 0.45
test_deeplabFunction · 0.45

Calls 2

load_segdb_from_indexMethod · 0.95
loadMethod · 0.45

Tested by 2

test_deeplabFunction · 0.36
test_deeplabFunction · 0.36