MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / pull_item

Method pull_item

yolox/data/datasets/datasets_wrapper.py:19–31  ·  view source on GitHub ↗
(self, idx)

Source from the content-addressed store, hash-verified

17 self.input_dim = self.datasets[0].input_dim
18
19 def pull_item(self, idx):
20 if idx < 0:
21 if -idx > len(self):
22 raise ValueError(
23 "absolute value of index should not exceed dataset length"
24 )
25 idx = len(self) + idx
26 dataset_idx = bisect.bisect_right(self.cumulative_sizes, idx)
27 if dataset_idx == 0:
28 sample_idx = idx
29 else:
30 sample_idx = idx - self.cumulative_sizes[dataset_idx - 1]
31 return self.datasets[dataset_idx].pull_item(sample_idx)
32
33
34class MixConcatDataset(torchConcatDataset):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected