Allloginsbusy opened a new issue #10393: ImageRecordIOParser2 Assertion failed
   I use python3 and try to get images by .rec file.
   I use ImageRecordIter. After 3000000 images I have got, I see OpenCV Error: 
Assertion failed . 
   Also I tried only go by iterator and do nothing, but saw the same error on 
same image.
   Here is part of my code.
   data_iter =
       path_imgrec=data_path, # the target record file
       data_shape=(3, 112, 112), # output data shape. An 227x227 region will be 
cropped from the original image.
       batch_size=BATCH_SIZE # number of samples per batch
   for batch in data_iter:
           for i in range(BATCH_SIZE):
               img = 
Image.fromarray([0][i].asnumpy().astype(np.uint8).transpose((1, 2, 
   Full Error message.
   [18:27:27] src/io/ ImageRecordIOParser2: 
Data/faces_vgg_112x112/train.rec, use 1 threads for decoding..
   OpenCV Error: Assertion failed (!buf.empty() && buf.isContinuous()) in 
imdecode_, file 
 line 637
   terminate called after throwing an instance of 'cv::Exception'
 error: (-215) !buf.empty() && buf.isContinuous() in function imdecode_

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to