projects
/
platform
/
upstream
/
caffeonacl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cae6f5
)
improved to load RGB image as grayscale image
author
tishibas67
<t_ishibas67@yahoo.co.jp>
Tue, 17 Mar 2015 15:11:01 +0000
(
00:11
+0900)
committer
tishibas67
<t_ishibas67@yahoo.co.jp>
Tue, 17 Mar 2015 15:11:01 +0000
(
00:11
+0900)
python/caffe/io.py
patch
|
blob
|
history
diff --git
a/python/caffe/io.py
b/python/caffe/io.py
index
6ae2cf1
..
acd8a14
100644
(file)
--- a/
python/caffe/io.py
+++ b/
python/caffe/io.py
@@
-285,7
+285,7
@@
def load_image(filename, color=True):
of size (H x W x 3) in RGB or
of size (H x W x 1) in grayscale.
"""
- img = skimage.img_as_float(skimage.io.imread(filename)).astype(np.float32)
+ img = skimage.img_as_float(skimage.io.imread(filename
, as_grey=not color
)).astype(np.float32)
if img.ndim == 2:
img = img[:, :, np.newaxis]
if color: