MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __getitem__

Method __getitem__

detrsmpl/data/datasets/base_dataset.py:64–71  ·  view source on GitHub ↗

Prepare data for the ``idx``-th data. As for video dataset, we can first parse raw data for each frame. Then we combine annotations from all frames. This interface is used to simplify the logic of video dataset and other special datasets.

(self, idx: int)

Source from the content-addressed store, hash-verified

62 return self.num_data
63
64 def __getitem__(self, idx: int):
65 """Prepare data for the ``idx``-th data.
66
67 As for video dataset, we can first parse raw data for each frame. Then
68 we combine annotations from all frames. This interface is used to
69 simplify the logic of video dataset and other special datasets.
70 """
71 return self.prepare_data(idx)

Callers

nothing calls this directly

Calls 1

prepare_dataMethod · 0.95

Tested by

no test coverage detected