PeterL1n / BackgroundMattingV2

Real-Time High-Resolution Background Matting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

inference_video.py:IndexError: Idx: 0 out of length: 1

MangekyoSasuke opened this issue · comments

HOW to solve the bug?PLEASE!!
1%| | 1/130 [00:02<04:48, 2.24s/it]
Traceback (most recent call last):
File "E:\2BackgroundMattingV2-master\inference_video.py", line 183, in
for input_batch in tqdm(DataLoader(dataset, batch_size=1, pin_memory=True)):
File "D:\Anaconda3\lib\site-packages\tqdm\std.py", line 1178, in iter
for obj in iterable:
File "D:\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 681, in next
data = self._next_data()
File "D:\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 721, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "D:\Anaconda3\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\Anaconda3\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "E:\2BackgroundMattingV2-master\dataset\zip.py", line 17, in getitem
x = tuple(d[idx % len(d)] for d in self.datasets)
File "E:\2BackgroundMattingV2-master\dataset\zip.py", line 17, in
x = tuple(d[idx % len(d)] for d in self.datasets)
File "E:\2BackgroundMattingV2-master\dataset\video.py", line 27, in getitem
raise IndexError(f'Idx: {idx} out of length: {len(self)}')
IndexError: Idx: 0 out of length: 1