You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(lsm) s802@s802:~/lsm/Pytorch-UNet-master$ python /home/s802/lsm/Pytorch-UNet-master/predict.py -i /home/s802/lsm/Pytorch-UNet-master/1.jpg -o /home/s802/lsm/Pytorch-UNet-master/output.jpg
/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/torch/cuda/init.py:52: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 10010). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:100.)
return torch._C._cuda_getDeviceCount() > 0
pic: <class 'torch.Tensor'>
mode: RGB
Traceback (most recent call last):
File "/home/s802/lsm/Pytorch-UNet-master/predict.py", line 107, in
device=device)
File "/home/s802/lsm/Pytorch-UNet-master/predict.py", line 39, in predict_img
full_mask = tf(probs.cpu()).squeeze()
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 50, in call
img = t(img)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 113, in call
return F.to_pil_image(pic, self.mode)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/torchvision/transforms/functional.py", line 149, in to_pil_image
return Image.fromarray(npimg, mode=mode)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/PIL/Image.py", line 2857, in fromarray
return frombuffer(mode, size, obj, "raw", rawmode, 0, 1)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/PIL/Image.py", line 2793, in frombuffer
return frombytes(mode, size, data, decoder_name, args)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/PIL/Image.py", line 2739, in frombytes
im.frombytes(data, decoder_name, args)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/PIL/Image.py", line 814, in frombytes
raise ValueError("not enough image data")
ValueError: not enough image data
the input image is RGB,but when it in image.py it has only two channels,so it output the error .But i do not know how to fix it.
The text was updated successfully, but these errors were encountered:
(lsm) s802@s802:~/lsm/Pytorch-UNet-master$ python /home/s802/lsm/Pytorch-UNet-master/predict.py -i /home/s802/lsm/Pytorch-UNet-master/1.jpg -o /home/s802/lsm/Pytorch-UNet-master/output.jpg
/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/torch/cuda/init.py:52: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 10010). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:100.)
return torch._C._cuda_getDeviceCount() > 0
pic: <class 'torch.Tensor'>
mode: RGB
Traceback (most recent call last):
File "/home/s802/lsm/Pytorch-UNet-master/predict.py", line 107, in
device=device)
File "/home/s802/lsm/Pytorch-UNet-master/predict.py", line 39, in predict_img
full_mask = tf(probs.cpu()).squeeze()
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 50, in call
img = t(img)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 113, in call
return F.to_pil_image(pic, self.mode)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/torchvision/transforms/functional.py", line 149, in to_pil_image
return Image.fromarray(npimg, mode=mode)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/PIL/Image.py", line 2857, in fromarray
return frombuffer(mode, size, obj, "raw", rawmode, 0, 1)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/PIL/Image.py", line 2793, in frombuffer
return frombytes(mode, size, data, decoder_name, args)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/PIL/Image.py", line 2739, in frombytes
im.frombytes(data, decoder_name, args)
File "/home/s802/anaconda3/envs/lsm/lib/python3.6/site-packages/PIL/Image.py", line 814, in frombytes
raise ValueError("not enough image data")
ValueError: not enough image data
the input image is RGB,but when it in image.py it has only two channels,so it output the error .But i do not know how to fix it.
The text was updated successfully, but these errors were encountered: