Check failed: cv_img.data Could not load image
I am getting the following error when I am trying to initialize caffenet with depth images and weights from pretrained imagenet model.
untrained_sign_net = caffe.Net(sign_net(train=False, subset='train'),weights, caffe.TEST) untrained_sign_net.forward() sign_data_batch = untrained_sign_net.blobs['data'].data.copy() sign_label_batch = np.array(untrained_sign_net.blobs['label'].data, dtype=np.int32)
Its giving me below error:
Could not open or find file /home/umar/caffe/data/sign/images/S01_C01_0001.jpeg
F0403 11:10:06.664624 4562 image_data_layer.cpp:138] Check failed: cv_img.data Could not load /home/umar/caffe/data/sign/images/S01_C01_0001.jpeg
Does the image exist, and is it valid?
Yes the image is available but it was only single channel so the issue is solved by converting it to three channel
Could you specify where you made the necessary change, which .prototxt file did you alter? or did you change the file that holds the image url list?
no i just changed my image files to 3 channel which was needed by caffenet
So I assume you were using black & white images earlier, and the model worked when color images were used.
yes you are right , I guess I had same problem
On Mon, Apr 11, 2016 at 8:25 PM, Joel Philip [email protected] wrote:
So I assume you were using black & white images earlier, and the model worked when color images were used.
— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/BVLC/caffe/issues/3945#issuecomment-208459158
Yes I resolved this issue by prepending the absolute path to the images in the file holding the image names. Thus the image urls could now be resolved by the opencv methods
I used absolute path, but I still get this error....need some help. Thanks