Unable to use caffe model trained in nvidia digits in opencv dnn code

asked 2017-10-27 05:24:37 -0500

ManojGuha gravatar image

updated 2017-10-27 05:33:12 -0500

Hello community, I used Nvidia digits to train caffe model with my own dataset based on alexnet network.After 30 epochs the training got completed I obtained the .caffemodel and prototxt files as output. But the the .caffemodel icon looks different and I am not able to deploy the trained caffemodel in opencv dnn samples code. I am getting weird errors. Can I directly use the model obtained from digits or should I convert the caffemodel show in the pic to appropriate format before loading it in opencv dnn code ? If yes, how to convert ? I am new to this field. Your help is enormously appreciated. Thanks :)

edit retag flag offensive close merge delete

Comments

we don't need your screenshot here, but please add the errors you're getting, and the prototxt !

berak gravatar imageberak ( 2017-10-27 05:28:38 -0500 )edit

Error which I got when I ran that code: cv2.error: /home/manojguha/opencv-3.3.1/modules/dnn/src/caffe/caffe_importer.cpp:242: error: (-215) pbBlob.raw_data_type() == caffe::FLOAT16 in function blobFromProto

My deploy prototxt file

ManojGuha gravatar imageManojGuha ( 2017-10-30 23:28:09 -0500 )edit

@ManojGuha, Are the names of layers different between deploy.prototxt and .prototxtused for training? If it has at least one weighted layer with a wrong name we couldn't find weights from binary file. We had similar problem at https://github.com/opencv/opencv/issu... .

dkurt gravatar imagedkurt ( 2017-10-31 04:27:15 -0500 )edit