Skip to content
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

problem in data_loader.py #9

Open
TheStoneMX opened this issue Jul 27, 2019 · 1 comment
Open

problem in data_loader.py #9

TheStoneMX opened this issue Jul 27, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@TheStoneMX
Copy link

TheStoneMX commented Jul 27, 2019

in the static function load_img() you are using SciPy.misc.imread() which is deprecated in SciPy 1.0.0, and removed in 1.2.0... and the lattes version is 1.2.2
in order for the code to work, I had to do this.

@staticmethod
def load_img(image_files):

images = []

for image_file in image_files:
  _, extension = os.path.splitext(image_file)
  extension = extension.lower()
  
  if extension == ".png":
    im = Image.open(image_file)
    imarray = np.array(im)
    images.append(imarray)
    #image = misc.imread(image_file)
    #images.append(image)
  elif extension == ".tif":
    im = Image.open(image_file)
    imarray = np.array(im)
    images.append(imarray)
  else:
    raise ValueError("Unsupported image filetype for %s" % image_file)
return np.array(images)

Besides I don't understand why you are using to read images functions from to different libraries.....

@rbharath rbharath added the bug Something isn't working label Aug 13, 2019
@rbharath
Copy link
Member

@TheStoneMX Thanks for the bug report! I've marked this as a bug and will try to get a fix merged in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants