deepchem / deepchem/DeepLearningLifeSciences

problem in data_loader.py

Open
#9 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Jupyter Notebook
Stars
414
Forks
159
PR merge metrics
No merged PRs in 30d

Description

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.....

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate data_loader.py and read the static load_img() function. Check how image files are currently read and verify the issue's report that scipy.misc.imread was removed in SciPy 1.2.2; the issue includes a working example using PIL and NumPy. Done means load_img() works with the stated SciPy version and continues handling the supported PNG and TIF files.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.