-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Infinoid/master
Fixes for newer versions of numpy and scipy
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# Author: Qian Ge <[email protected]> | ||
|
||
import os | ||
import scipy.misc | ||
import imageio | ||
import numpy as np | ||
from datetime import datetime | ||
|
||
|
@@ -18,9 +18,9 @@ def load_image(im_path, read_channel=None, pf=identity): | |
if read_channel is None: | ||
im = scipy.misc.imread(im_path) | ||
elif read_channel == 3: | ||
im = scipy.misc.imread(im_path, mode='RGB') | ||
im = imageio.imread(im_path, pilmode='RGB') | ||
else: | ||
im = scipy.misc.imread(im_path, flatten=True) | ||
im = imageio.imread(im_path, flatten=True) | ||
|
||
if len(im.shape) < 3: | ||
im = pf(im) | ||
|