Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
124 Views

Build and convert Caffe - SSD300-VGG16 model to IR

Do you have any good reference tutorials that build a SSD300-VGG16 model?

 

Since documentation only list these models that can to converted to IR files:

https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_C...

"Object detection models:

SSD300-VGG16, SSD500-VGG16

Faster-RCNN

RefineDet (Myriad plugin only)"

Does it mean that Caffe SSD300-MobileNet model cannot be converted to IR files, and run on MYRIAD?!

 

Have a nice day!

 

 

0 Kudos
3 Replies
Highlighted
Beginner
124 Views

Trying to use this Caffe framework https://github.com/weiliu89/caffe/tree/ssd since it can create SSD300* (VGG16) model format that Intel support for IR conversion.

When I try to build Caffe from source code on Ubuntu 18.04 with Nvidia GPU I am getting this error:

"

~/caffe$ make -j6
PROTOC src/caffe/proto/caffe.proto
CXX src/caffe/util/im2col.cpp

CXX src/caffe/layers/log_layer.cpp
CXX src/caffe/layers/scale_layer.cpp
CXX src/caffe/layers/cudnn_tanh_layer.cpp
CXX src/caffe/layers/base_data_layer.cpp
src/caffe/layers/hdf5_data_layer.cpp:26:1: error: ‘HDF5DataLayer’ does not name a type
 HDF5DataLayer<Dtype>::~HDF5DataLayer<Dtype>() { }
 ^~~~~~~~~~~~~
src/caffe/layers/hdf5_data_layer.cpp:30:19: error: expected initializer before ‘<’ token
 void HDF5DataLayer<Dtype>::LoadHDF5FileData(const char* filename) {
                   ^
src/caffe/layers/hdf5_data_layer.cpp:75:19: error: expected initializer before ‘<’ token
 void HDF5DataLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom,
                   ^
src/caffe/layers/hdf5_data_layer.cpp:131:19: error: expected initializer before ‘<’ token
 void HDF5DataLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
                   ^
src/caffe/layers/hdf5_data_layer.cpp:166:18: error: expected constructor, destructor, or type conversion before ‘(’ token
 INSTANTIATE_CLASS(HDF5DataLayer);
                  ^
src/caffe/layers/hdf5_data_layer.cpp:167:21: error: expected constructor, destructor, or type conversion before ‘(’ token
 REGISTER_LAYER_CLASS(HDF5Data);
                     ^
Makefile:575: recipe for target '.build_release/src/caffe/layers/hdf5_data_layer.o' failed
make: *** [.build_release/src/caffe/layers/hdf5_data_layer.o] Error 1
make: *** Waiting for unfinished jobs....
plp@pihlungs-laptop:~/caffe$

I have attached the Makefile.config (just added .txt, to be able to attached it to my topic.

Should I include hdf5 in the Makefile.config?

Greatfull for advise to solve this issue, Thanks

 

0 Kudos
Highlighted
124 Views

Hi pih,

Please download the SSD300 model from the model downloader. Using:

python3 downloader.py --name ssd300

And then use model optimizer to generate the IR.

python3 mo.py --input_model /opt/intel/openvino_2020.2.120/deployment_tools/tools/model_downloader/public/ssd300/models/VGGNet/VOC0712Plus/SSD_300x300_ft/VGG_VOC0712Plus_SSD_300x300_ft_iter_160000.caffemodel --input_proto /opt/intel/openvino_2020.2.120/deployment_tools/tools/model_downloader/public/ssd300/models/VGGNet/VOC0712Plus/SSD_300x300_ft/deploy.prototxt --data_type FP16

Best regards,

Surya

0 Kudos
Highlighted
Beginner
124 Views

Hi Surya,

Thanks for your reply. My goal is to use my own custom pictures to train a SSD300 model and to deploy it on rpi4 with NCS2.

Do you have any tutorials to do that?

What version of Openvino toolkit should I use to deploy it on rpi4, version 2020.2 doesn't have a raspbian runtime version available yet.

Can you tell me what "Sample supports topologies only with 1 or 2 imputs", it seems to me example need 3 inputs?

"pi@raspberrypi:~/Desktop/intelssd300 $ ./object_detection_sample_ssd_c -i /dev/video1 -m ./VGG_VOC0712Plus_SSD_300x300_ft_iter_160000.xml -d MYRIAD
[ INFO ] InferenceEngine: 
2.1.custom_releases/2020/1_d349c3ba4a2508be72f413fa4dee92cc0e4bc0e1
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ]     /dev/video1
[ INFO ] Loading Inference Engine
[ INFO ] Device info: 
         MYRIAD
         myriadPlugin version ......... 2.1
         Build ......... 37988
[ INFO ] Loading network files:
    ./VGG_VOC0712Plus_SSD_300x300_ft_iter_160000.xml
    ./VGG_VOC0712Plus_SSD_300x300_ft_iter_160000.bin
[ INFO ] Preparing input blobs
Sample supports topologies only with 1 or 2 inputs
pi@raspberrypi:~/Desktop/intelssd300 $ "

 

 

 

 

Thanks!

 

 

0 Kudos