imread read blank (None) image for file: X:\Users\Administrator\examples\红花\1.jpg
Traceback (most recent call last):
File “X:\anna\Lib\site-packages\mxnet\tools\im2rec.py”, line 386, in
record.write_idx(item[0], s)
File “X:\anna\lib\site-packages\mxnet\recordio.py”, line 337, in write_idx
self.write(buf)
File “X:\anna\lib\site-packages\mxnet\recordio.py”, line 177, in write
ctypes.c_size_t(len(buf))))
TypeError: object of type ‘NoneType’ has no len()
这是我在cmd中敲的源码:
python X:\anna\Lib\site-packages\mxnet\tools\im2rec.py X:\Users\Administrator\my_test.lst X:\Users\Administrator\examples\红花 --center-crop --resize 224 --pack-label
仔细又读了一遍使用方法:
Options
for
creating database:
--pass-through whether to skip transformation and save image as is
(default: False)
--resize RESIZE resize the shorter edge of image to the newsize,
original images will be packed by default. (default:
0)
--center-crop specify whether to crop the center image to
make
it
rectangular. (default: False)
--quality QUALITY JPEG quality
for
encoding, 1-100; or PNG compression
for
encoding, 1-9 (default: 95)
--num-thread NUM_THREAD
number of thread to use
for
encoding. order of images
will be different from the input list
if
>1. the input
list will be modified to match the resulting order.
(default: 1)
--color {-1,0,1} specify the color mode of the loaded image. 1: Loads a
color image. Any transparency of image will be
neglected. It is the default flag. 0: Loads image
in
grayscale mode. -1:Loads image as such including alpha
channel. (default: 1)
--encoding {.jpg,.png}
specify the encoding of the images. (default: .jpg)
--pack-label Whether to also pack multi dimensional label
in
the
record
file
(default: False)
我该怎么解决这个错误呀?