MCPcopy Index your code
hub / github.com/facebookresearch/SlowFast / get

Method get

slowfast/visualization/async_predictor.py:191–209  ·  view source on GitHub ↗

Return visualized frames/clips in the correct order based on task id if result(s) is available. Otherwise, raise queue.Empty exception.

(self)

Source from the content-addressed store, hash-verified

189 self.task_queue.put(task)
190
191 def get(self):
192 """
193 Return visualized frames/clips in the correct order based on task id if
194 result(s) is available. Otherwise, raise queue.Empty exception.
195 """
196 get_idx = self.get_indices_ls[0]
197 if self.result_data.get(get_idx) is not None:
198 res = self.result_data[get_idx]
199 del self.result_data[get_idx]
200 del self.get_indices_ls[0]
201 return res
202
203 while True:
204 res = self.result_queue.get(block=False)
205 idx = res.id
206 if idx == get_idx:
207 del self.get_indices_ls[0]
208 return res
209 self.result_data[idx] = res
210
211 def __call__(self, task):
212 """

Callers 11

__call__Method · 0.95
runMethod · 0.45
getMethod · 0.45
runMethod · 0.45
getMethod · 0.45
__init__Method · 0.45
__init__Method · 0.45
__next__Method · 0.45
get_fnMethod · 0.45
__init__Method · 0.45
merge_pred_gt_boxesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected