1

I Trained my model using DIGITS ( NVCaffe) and I use it in opencv similar to opencv example that use .prototxt & .caffemodel and i tested it and work good. But when I use Models that trained by digits i got this error:

OpenCV Error: Assertion failed (pbBlob.raw_data_type() == 
caffe::FLOAT16) in blobFromProto, file 
/opt/opencv/modules/dnn/src/caffe/caffe_importer.cpp, line 242
Exception:  /opt/opencv/modules/dnn/src/caffe/caffe_importer.cpp:242: 
error: (-215) pbBlob.raw_data_type() == caffe::FLOAT16 in function 
blobFromProto

help me to solve it! this problem mentioned many times ago without answer! http://answers.opencv.org/question/177086/unable-to-use-caffe-model-trained-in-nvidia-digits-in-opencv-dnn-code/

Yasin Kumar
  • 169
  • 1
  • 3
  • 14
  • 1
    is it possible your DIGITS trains/stores models in float64 instead of float32? – Shai Apr 25 '18 at 07:58
  • Hi @Shai , I installed latest version of NVCaffe , and i don't know how i change this to float64 – Yasin Kumar Apr 25 '18 at 08:24
  • you don't need to change it to float64 - on the contrary, you need to make sure it saves as float32 (this is what opencv expects) – Shai Apr 25 '18 at 08:49
  • by thanks @Shai , I'm Beginner and I don't understand your intention, Please Guide me simply ! – Yasin Kumar Apr 25 '18 at 09:35

1 Answers1

0

OpenCV suppports models trained in BVLC format and not NVCaffe. Try training your model by changing the solver parameter from NVCaffe to Compatible in DIGITS.

Nukul Khadse
  • 108
  • 7