MCPcopy Create free account
hub / github.com/OpenGVLab/UniFormerV2 / get

Method get

slowfast/visualization/async_predictor.py:193–211  ·  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

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

Callers 15

__call__Method · 0.95
_downloadFunction · 0.45
bpeMethod · 0.45
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

Calls

no outgoing calls

Tested by

no test coverage detected