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

Unknown resampling filter (InterpolationMode.BICUBIC) #36

Open
ZK1924 opened this issue Aug 1, 2023 · 0 comments
Open

Unknown resampling filter (InterpolationMode.BICUBIC) #36

ZK1924 opened this issue Aug 1, 2023 · 0 comments

Comments

@ZK1924
Copy link

ZK1924 commented Aug 1, 2023

(pytorch_hyperseg_master) F:\22-lx\code\hyperseg-main>python hyperseg/test.py checkpoints/vocsbd/vocsbd_efficientnet_b3_hyperseg-l -td "hyperseg.datasets.voc_sbd.VOCSBDDataset('data/vocsbd','data/vocsbd/VOCdevkit/VOC2012/val.txt')"
-it "seg_transforms.LargerEdgeResize([512,1024])"
=> using GPU devices: 0
=> Loading segmentation model: "model_best.pth"...
Loading pretrained weights for efficientnet-b3...
0%| | 0/25 [00:03<?, ?batches/s]
Traceback (most recent call last):
File "F:\22-lx\code\hyperseg-main\hyperseg\test.py", line 296, in
main(**vars(parser.parse_args()))
File "F:\22-lx\code\hyperseg-main\hyperseg\test.py", line 156, in main
for i, (input, target) in enumerate(tqdm(test_loader, unit='batches', file=sys.stdout)):
File "D:\Anaconda\envs\pytorch_hyperseg_master\lib\site-packages\tqdm\std.py", line 1195, in iter
for obj in iterable:
File "D:\Anaconda\envs\pytorch_hyperseg_master\lib\site-packages\torch\utils\data\dataloader.py", line 681, in next
data = self._next_data()
File "D:\Anaconda\envs\pytorch_hyperseg_master\lib\site-packages\torch\utils\data\dataloader.py", line 1376, in _next_data
return self._process_data(data)
File "D:\Anaconda\envs\pytorch_hyperseg_master\lib\site-packages\torch\utils\data\dataloader.py", line 1402, in _process_data
data.reraise()
File "D:\Anaconda\envs\pytorch_hyperseg_master\lib\site-packages\torch_utils.py", line 461, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "D:\Anaconda\envs\pytorch_hyperseg_master\lib\site-packages\torch\utils\data_utils\worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "D:\Anaconda\envs\pytorch_hyperseg_master\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:\Anaconda\envs\pytorch_hyperseg_master\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "f:\22-lx\code\hyperseg-main\hyperseg\datasets\voc_sbd.py", line 97, in getitem
img, target = self.transforms(img, target)
File "f:\22-lx\code\hyperseg-main\hyperseg\datasets\seg_transforms.py", line 52, in call
input = list(t(*input))
File "f:\22-lx\code\hyperseg-main\hyperseg\datasets\seg_transforms.py", line 173, in call
img = larger_edge_resize(img, self.size, self.interpolation)
File "f:\22-lx\code\hyperseg-main\hyperseg\datasets\seg_transforms.py", line 148, in larger_edge_resize
return img.resize(size[::-1], interpolation)
File "D:\Anaconda\envs\pytorch_hyperseg_master\lib\site-packages\PIL\Image.py", line 2130, in resize
raise ValueError(msg)
ValueError: Unknown resampling filter (InterpolationMode.BICUBIC). Use Image.Resampling.NEAREST (0), Image.Resampling.LANCZOS (1), Image.Resampling.BILINEAR (2), Image.Resampling.BICUBIC (3), Image.Resampling.BOX (4) or Image.Resamp
ling.HAMMING (5)

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