Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MangekyoSasuke opened this issue Jul 7, 2023 · 0 comments
Open

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

MangekyoSasuke opened this issue Jul 7, 2023 · 0 comments

Comments

@MangekyoSasuke
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant