sithu31296 / semantic-segmentation

SOTA Semantic Segmentation Models in PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No such operator image::read_file

WDK502 opened this issue · comments

When i'm running camvid.py, This happened "No such operator image::read_file",
Excuse me, why is this?
Related error messages:
Traceback (most recent call last):
File "D:\anaconda3\envs\TF2.5\lib\site-packages\IPython\core\interactiveshell.py", line 3437, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
runfile('D:/PYcode/Code6/datasets/camvid.py', wdir='D:/PYcode/Code6/datasets')
File "D:\PyCharm 2021.1\plugins\python\helpers\pydev_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "D:\PyCharm 2021.1\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/PYcode/Code6/datasets/camvid.py", line 86, in
image, label = next(iter(dataloader))
File "D:\anaconda3\envs\TF2.5\lib\site-packages\torch\utils\data\dataloader.py", line 435, in next
data = self._next_data()
File "D:\anaconda3\envs\TF2.5\lib\site-packages\torch\utils\data\dataloader.py", line 475, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "D:\anaconda3\envs\TF2.5\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\anaconda3\envs\TF2.5\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:/PYcode/Code6/datasets/camvid.py", line 54, in getitem
image = io.image.read_file(img_path)
File "D:\anaconda3\envs\TF2.5\lib\site-packages\torchvision\io\image.py", line 79, in read_file
data = torch.ops.image.read_file(path)
File "D:\anaconda3\envs\TF2.5\lib\site-packages\torch_ops.py", line 61, in getattr
op = torch._C._jit_get_operation(qualified_op_name)
RuntimeError: No such operator image::read_file

I think your pytorch is very low. To run the code, you need to have torch >= 1.8.1 and torchvision >= 0.9.1.

thanks for your answer!