MCPcopy
hub / github.com/hustvl/Vim / get

Method get

det/demo/predictor.py:191–205  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

189 self.task_queue.put((self.put_idx, image))
190
191 def get(self):
192 self.get_idx += 1 # the index needed for this request
193 if len(self.result_rank) and self.result_rank[0] == self.get_idx:
194 res = self.result_data[0]
195 del self.result_data[0], self.result_rank[0]
196 return res
197
198 while True:
199 # make sure the results are returned in the correct order
200 idx, res = self.result_queue.get()
201 if idx == self.get_idx:
202 return res
203 insert = bisect.bisect(self.result_rank, idx)
204 self.result_rank.insert(insert, idx)
205 self.result_data.insert(insert, res)
206
207 def __len__(self):
208 return self.put_idx - self.get_idx

Callers 15

__call__Method · 0.95
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
train_segmentorFunction · 0.45
loadFunction · 0.45
load_url_distFunction · 0.45
load_pavimodel_distFunction · 0.45
load_fileclient_distFunction · 0.45
load_checkpointFunction · 0.45
save_checkpointFunction · 0.45
_resize_segMethod · 0.45

Calls

no outgoing calls

Tested by 15

mainFunction · 0.36
_test_rcnn_modelMethod · 0.36
_test_retinanet_modelMethod · 0.36
_test_modelMethod · 0.36
metadataMethod · 0.36
test_draw_no_metadataMethod · 0.36
_test_modelMethod · 0.36
test_roi_headsMethod · 0.36
test_rroi_headsMethod · 0.36