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
Hey,
I'm currently trying to run this code but get a confusing error. I use the latest version of your code with around 200 pictures from the Carvana dataset. After training I tried predicting and got the following error:
PS C:\Users-\PycharmProjects-> python predict.py -i image.jpg -o output.jpg
Traceback (most recent call last):
File "C:\Users-\PycharmProjects-\predict.py", line 100, in
mask = predict_img(net=net,
File "C:\Users-\PycharmProjects-\predict.py", line 39, in predict_img
full_mask = tf(probs.cpu()).squeeze()
File "C:\Users-\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\transforms\transforms.py", line 49, in call
img = t(img)
File "C:\Users-\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\transforms\transforms.py", line 110, in call
return F.to_pil_image(pic, self.mode)
File "C:\Users-\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\transforms\functional.py", line 148, in to_pil_image
return Image.fromarray(npimg, mode=mode)
File "C:\Users-\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 2707, in frombytes
im.frombytes(data, decoder_name, args)
File "C:\Users-\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 784, in frombytes
raise ValueError("not enough image data")
ValueError: not enough image data
If someone could help with this, it would be greatly appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey,
I'm currently trying to run this code but get a confusing error. I use the latest version of your code with around 200 pictures from the Carvana dataset. After training I tried predicting and got the following error:
PS C:\Users-\PycharmProjects-> python predict.py -i image.jpg -o output.jpg
Traceback (most recent call last):
File "C:\Users-\PycharmProjects-\predict.py", line 100, in
mask = predict_img(net=net,
File "C:\Users-\PycharmProjects-\predict.py", line 39, in predict_img
full_mask = tf(probs.cpu()).squeeze()
File "C:\Users-\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\transforms\transforms.py", line 49, in call
img = t(img)
File "C:\Users-\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\transforms\transforms.py", line 110, in call
return F.to_pil_image(pic, self.mode)
File "C:\Users-\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\transforms\functional.py", line 148, in to_pil_image
return Image.fromarray(npimg, mode=mode)
File "C:\Users-\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 2707, in frombytes
im.frombytes(data, decoder_name, args)
File "C:\Users-\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 784, in frombytes
raise ValueError("not enough image data")
ValueError: not enough image data
If someone could help with this, it would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions