MCPcopy
hub / github.com/cvat-ai/cvat / get

Function get

cvat/apps/dataset_manager/util.py:401–416  ·  view source on GitHub ↗
(frame_index: int)

Source from the content-addressed store, hash-verified

399 ann = None
400
401 def get(frame_index: int) -> Generator[dict, None, None]:
402 nonlocal ann
403
404 while True:
405 if ann is None:
406 try:
407 ann = next(gen)
408 except StopIteration:
409 break
410
411 assert ann["frame"] >= frame_index
412 if ann["frame"] == frame_index:
413 yield ann
414 ann = None
415 else:
416 break
417
418 return get

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected