szad670401 / advanced-mxnet2caffe

Support most of operator which convert mxnet to caffe.
60 stars 18 forks source link

convert retinaface model to caffe error #4

Open xiakj opened 5 years ago

xiakj commented 5 years ago

how to convert retinaface mxnet model to caffe. can you list the conversion details? thank u.

gasgallo commented 5 years ago
python json2prototxt.py --mx-json model-symbol.json --cf-prototxt caffe_target.prototxt
python mxnet2caffe.py --mx-model model --mx-epoch 0 --cf-prototxt caffe_target.prototxt --cf-model caffe_target.caffemodel
xiakj commented 5 years ago
python json2prototxt.py --mx-json model-symbol.json --cf-prototxt caffe_target.prototxt
python mxnet2caffe.py --mx-model model --mx-epoch 0 --cf-prototxt caffe_target.prototxt --cf-model caffe_target.caffemodel

got it. thanks

xiakj commented 5 years ago
python json2prototxt.py --mx-json model-symbol.json --cf-prototxt caffe_target.prototxt
python mxnet2caffe.py --mx-model model --mx-epoch 0 --cf-prototxt caffe_target.prototxt --cf-model caffe_target.caffemodel

and what's more, have you realize the detection_output_layer for retinaface in caffe? can you share your talented work?

gasgallo commented 5 years ago

@xiakejiang what do you mean? The post processing of retinaface outputs?

xiakj commented 5 years ago

@xiakejiang what do you mean? The post processing of retinaface outputs? yes. I converted the retinaface to caffe successfully, now I am writing the last layer in order to get the final detection result. I imitate the detection_output_layer of SSD in caffe. It is kind of difficult.

gasgallo commented 5 years ago

@xiakejiang there are many implementations online, I'm using something similar to the one in this repo

xiakj commented 5 years ago

@xiakejiang there are many implementations online, I'm using something similar to the one in this repo

I alse noticed this repo, but it seems missing detect.h file. whether the detect.cpp can run correctly without the detect.h file?

bleakie commented 5 years ago

I meet this error。 txt_file.write(' shape: {{ dim: {} dim: {} dim: {} dim: {} }}\n'.format(info['shape'][0], KeyError: 'shape'

791136190 commented 5 years ago

@bleakie you can try:if str(node_i['op']) == 'data' change to if str(node_i['op']) == 'null' and str(node_i['name']) == 'data',in json2prototxt.py at line 40.