Torchvision, used here, requires Pillow>=4.1.1.
However, demo.py uses scipy.misc.imread, which relies on Pillow functionality that only appears seemingly if you go as far back as Pillow version 2.
I've been unable to satisfy both requirements at the same time. Is there a workaround? Or maybe this code should be re-written to use cv2 instead of scipy.misc.imread, to avoid the dependency on an old Pillow.
+1
Hi,
I encountered the similar error with you guys, and I modified the code of "demo.py" and "minibatch.py"(under the directory /faster-rcnn.pytorch/lib/roi_data_layer/).
I replaced "scipy.misc" with "imageio" since imread is deprecated in SciPy 1.0.0 and removed in SciPy 1.2.0
This solved my problem. Hope it will help you too.
@ensenginbaieer feel free to submit a PR
i ended up having to switch to openCV and uncomment the line which was already there using it
Hi,
I encountered the similar error with you guys, and I modified the code of "demo.py" and "minibatch.py"(under the directory /faster-rcnn.pytorch/lib/roi_data_layer/).
I replaced "scipy.misc" with "imageio" since imread is deprecated in SciPy 1.0.0 and removed in SciPy 1.2.0
This solved my problem. Hope it will help you too.
you can also pip install scipy==1.1.0 and the imread function still is there
Most helpful comment
Hi,
I encountered the similar error with you guys, and I modified the code of "demo.py" and "minibatch.py"(under the directory /faster-rcnn.pytorch/lib/roi_data_layer/).
I replaced "scipy.misc" with "imageio" since imread is deprecated in SciPy 1.0.0 and removed in SciPy 1.2.0
This solved my problem. Hope it will help you too.