-
Notifications
You must be signed in to change notification settings - Fork 90
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
ValueError: operands could not be broadcast together with shapes (65536,5) (256,256,1) #3
Comments
thank you!But the problem is still there.... predictions_smooth = predict_img_with_smooth_windowing( I delete the img_to_predict_input directly ,because I don't find the function in the author's code ... |
Hello @GusRoth . Did you ever figure this out? If so, would you be willing to share your solutions/code? |
@Mahi-Mai @GusRoth @filippocastelli I'm facing the same error, the code throws the same mentioned exception and the proposed solution did not fix it. I appreciate if you could share the solution if you manage to solve it. Thank you. |
@fadishaar84 Here!
Try replacing the value of the last argument (pred_func) with: I don't know what the heck image_to_neural_input() is supposed to be. It's pretty darned cryptic and it doesn't look like you need it. Now let me know if you find a good way to speed this process up. On large images it's very slow, but the results are lovely! XD |
To make this code usable here are the changes you need to make:
|
In addition to the changes suggested by @bnsreenu, for RGB images in _window_2D function: replace |
hi @bnsreenu having an issue and I would be glad if you can help me out. I encounter the error shown below. however, when I print my input image shape is (5000,5000,3) File "C:\Users\Richmond\AppData\Local\Temp\ipykernel_26400\2710991319.py", line 92, in File "C:\Users\Richmond\AppData\Local\Temp\ipykernel_26400\2283882284.py", line 272, in predict_img_with_smooth_windowing File "C:\Users\Richmond\anaconda3\envs\tensorflow\lib\site-packages\matplotlib_api\deprecation.py", line 456, in wrapper File "C:\Users\Richmond\anaconda3\envs\tensorflow\lib\site-packages\matplotlib\pyplot.py", line 2647, in imshow File "C:\Users\Richmond\anaconda3\envs\tensorflow\lib\site-packages\matplotlib_api\deprecation.py", line 456, in wrapper File "C:\Users\Richmond\anaconda3\envs\tensorflow\lib\site-packages\matplotlib_init_.py", line 1412, in inner File "C:\Users\Richmond\anaconda3\envs\tensorflow\lib\site-packages\matplotlib\axes_axes.py", line 5488, in imshow File "C:\Users\Richmond\anaconda3\envs\tensorflow\lib\site-packages\matplotlib\image.py", line 716, in set_data TypeError: Invalid shape (5000, 5000, 2) for image data. Thank you |
please help me, I dont know how to solve this problem
The text was updated successfully, but these errors were encountered: