Faster-rcnn.pytorch: ImportError: cannot import name 'imread'

Created on 27 Dec 2019  ·  2Comments  ·  Source: jwyang/faster-rcnn.pytorch

Traceback (most recent call last):
File "trainval_net.py", line 28, in
from roi_data_layer.roibatchLoader import roibatchLoader
File "/home/alanchen/Desktop/faster-rcnn.pytorch/lib/roi_data_layer/roibatchLoader.py", line 14, in
from roi_data_layer.minibatch import get_minibatch, get_minibatch
File "/home/alanchen/Desktop/faster-rcnn.pytorch/lib/roi_data_layer/minibatch.py", line 15, in
from scipy.misc import imread
ImportError: cannot import name 'imread'

Most helpful comment

To deal with that "ImportError: cannot import name 'imread'":

>
This bug is mainly because the versions of the "scipy" library and the "pillow" library do not match.
I got this bug, which is caused by too high version of "scipy" library. My version matches the following:

Point installation scipy == 1.2.1
Point mounting pillow == 6.1.0

>
step 1 input "pip list" to check out scipy version
step 2 turn scipy x.x.x into scipy 1.2.1
BOOM
Finshed.

All 2 comments

To deal with that "ImportError: cannot import name 'imread'":

>
This bug is mainly because the versions of the "scipy" library and the "pillow" library do not match.
I got this bug, which is caused by too high version of "scipy" library. My version matches the following:

Point installation scipy == 1.2.1
Point mounting pillow == 6.1.0

>
step 1 input "pip list" to check out scipy version
step 2 turn scipy x.x.x into scipy 1.2.1
BOOM
Finshed.

Please close the issue since it has been solved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rizhiy picture Rizhiy  ·  4Comments

gullalc picture gullalc  ·  4Comments

Codermay picture Codermay  ·  5Comments

herrickli picture herrickli  ·  3Comments

chj1933 picture chj1933  ·  5Comments