Closed kv55 closed 2 years ago
While I was trying to convert SSD300_vgg16 model to Caffe with phase = 'test' instead of 'export' I got the following error :
File "/root/brocolli/converter/pytorch/pytorch_caffe_parser.py", line 138, in gen_IR
node_type = layer_map[onnx_node_type]
KeyError: 'prim::PythonOp'
can you provide your model. I have a ssd model under custom_models which can be coverted to caffe, you can follow it.
I have used the ssd.py file in custom_models folder, but with some modifications. I have added detect and nms functions and also, some changes to handle version differences. In the test_caffe_nets.py file used build_ssd('test') instead of build_ssd('export'). ssd.zip
I have used the ssd.py file in custom_models folder, but with some modifications. I have added detect and nms functions and also, some changes to handle version differences. In the test_caffe_nets.py file used build_ssd('test') instead of build_ssd('export'). ssd.zip
Hi, right now you can only convert the backbone to caffe, if you want to convert priorbox and detection_out part, you should first convert model created by build_ssd('export'), then, you should fill this json by using your own parameter, https://github.com/inisis/brocolli/blob/2a15ac07010114716aef7fbb9be1f6d6b35e21a5/tests/example.json and use this https://github.com/inisis/brocolli/blob/2a15ac07010114716aef7fbb9be1f6d6b35e21a5/tests/ssd_layer.py to add priorbox and detection_out layer to your previously converted ssd backbone.
I have used the ssd.py file in custom_models folder, but with some modifications. I have added detect and nms functions and also, some changes to handle version differences. In the test_caffe_nets.py file used build_ssd('test') instead of build_ssd('export'). ssd.zip
Hi, right now you can only convert the backbone to caffe, if you want to convert priorbox and detection_out part, you should first convert model created by build_ssd('export'), then, you should fill this json by using your own parameter, https://github.com/inisis/brocolli/blob/2a15ac07010114716aef7fbb9be1f6d6b35e21a5/tests/example.json and use this https://github.com/inisis/brocolli/blob/2a15ac07010114716aef7fbb9be1f6d6b35e21a5/tests/ssd_layer.py to add priorbox and detection_out layer to your previously converted ssd backbone.
Thank you so much for the suggestions. I could convert SSD in inference mode by following the above mentioned steps.
I have used the ssd.py file in custom_models folder, but with some modifications. I have added detect and nms functions and also, some changes to handle version differences. In the test_caffe_nets.py file used build_ssd('test') instead of build_ssd('export'). ssd.zip
Hi, right now you can only convert the backbone to caffe, if you want to convert priorbox and detection_out part, you should first convert model created by build_ssd('export'), then, you should fill this json by using your own parameter, https://github.com/inisis/brocolli/blob/2a15ac07010114716aef7fbb9be1f6d6b35e21a5/tests/example.json and use this https://github.com/inisis/brocolli/blob/2a15ac07010114716aef7fbb9be1f6d6b35e21a5/tests/ssd_layer.py to add priorbox and detection_out layer to your previously converted ssd backbone.
Thank you so much for the suggestions. I could convert SSD in inference mode by following the above mentioned steps.
Good for you
While I was trying to convert SSD300_vgg16 model to Caffe with phase = 'test' instead of 'export' I got the following error : File "/root/brocolli/converter/pytorch/pytorch_caffe_parser.py", line 138, in gen_IR node_type = layer_map[onnx_node_type] KeyError: 'prim::PythonOp'