Effacer les filtres
Effacer les filtres

How to export trained Faster RCNN to another hardware platform

2 vues (au cours des 30 derniers jours)
Alberto Tellaeche
Alberto Tellaeche le 19 Oct 2019
Hello all,
I have used MATLAB with the deep learning toolbox to train my own Faster RCNN object detector.
Either if I use a predefined CNN (squeezenet for example) or my designed CNN, I want to export the trained Faster RCNN to use it on other embedded platforms.
exportONNXNetwork gives errors with Faster RCNN architectures no matter the CNN used.
How can I export my work to use it in another HW? I have worked many hours and now I can not deploy my design !!
Thank you all in advance,
Alberto
  3 commentaires
Alberto Tellaeche
Alberto Tellaeche le 24 Oct 2019
Hi,
I can provide an example. Ihave a fasterRCNNObjectDetector trained using the squeezenet network model.
Here is the output of MATLAB 2019b when trying to export. It only happens with the faster RCNN models. It seems to work with FastRCNN or RCNN.
Thank you all in advance,
Alberto
>> load('ResultsFasterRCNN_squeezenet.mat')
>> exportONNXNetwork(detector.Network,'test.onnx')
Warning: ONNX does not support layer 'nnet.cnn.layer.RPNSoftmaxLayer'. Exporting to ONNX operator
'com.MathWorks.Placeholder'.
> In nnet.internal.cnn.onnx/NNTLayerConverter/makeLayerConverter (line 212)
In nnet.internal.cnn.onnx/ConverterForNetwork/networkToGraphProto (line 100)
In nnet.internal.cnn.onnx/ConverterForNetwork/toOnnx (line 44)
In nnet.internal.cnn.onnx.exportONNXNetwork (line 35)
In exportONNXNetwork (line 40)
Warning: ONNX does not support layer 'nnet.cnn.layer.RPNClassificationLayer'. Exporting to ONNX operator
'com.MathWorks.Placeholder'.
> In nnet.internal.cnn.onnx/NNTLayerConverter/makeLayerConverter (line 212)
In nnet.internal.cnn.onnx/ConverterForNetwork/networkToGraphProto (line 100)
In nnet.internal.cnn.onnx/ConverterForNetwork/toOnnx (line 44)
In nnet.internal.cnn.onnx.exportONNXNetwork (line 35)
In exportONNXNetwork (line 40)
Warning: ONNX does not support layer 'nnet.cnn.layer.RegionProposalLayer'. Exporting to ONNX operator
'com.MathWorks.Placeholder'.
> In nnet.internal.cnn.onnx/NNTLayerConverter/makeLayerConverter (line 212)
In nnet.internal.cnn.onnx/ConverterForNetwork/networkToGraphProto (line 100)
In nnet.internal.cnn.onnx/ConverterForNetwork/toOnnx (line 44)
In nnet.internal.cnn.onnx.exportONNXNetwork (line 35)
In exportONNXNetwork (line 40)
Error using nnet.internal.cnn.onnx.ConverterForClassificationOutputLayer/toOnnx (line 28)
Assertion failed.
Error in nnet.internal.cnn.onnx.ConverterForNetwork/networkToGraphProto (line 102)
= toOnnx(layerConverter, nodeProtos, TensorNameMap, TensorLayoutMap);
Error in nnet.internal.cnn.onnx.ConverterForNetwork/toOnnx (line 44)
modelProto.graph = networkToGraphProto(this);
Error in nnet.internal.cnn.onnx.exportONNXNetwork (line 35)
modelProto = toOnnx(converter);
Error in exportONNXNetwork (line 40)
nnet.internal.cnn.onnx.exportONNXNetwork(Network, filename, varargin{:});
>>
Ganesh Regoti
Ganesh Regoti le 25 Oct 2019
Hi Alberto,
It seemed to work fine for me for the following network. I am able to export the network to ONNX format.
Could you send your network (ResultsFasterRCNN_squeezenet.mat) ?

Connectez-vous pour commenter.

Réponses (3)

Alberto Tellaeche
Alberto Tellaeche le 25 Oct 2019
Hi Ganesh,
Please find attached my .mat file.
I would like to export the detector.Network network.
Best,
Alberto
  1 commentaire
Ganesh Regoti
Ganesh Regoti le 25 Oct 2019
Hi,
The attached .mat file is empty. Can you please cross-verify and attach the correct file.

Connectez-vous pour commenter.


Alberto Tellaeche
Alberto Tellaeche le 25 Oct 2019
Sorry for the inconveniences,
I have just done now drag and drop of the .mat containing the netwrok.
Let`s see if now it is correct...
Sorry again,
Alberto

Ganesh Regoti
Ganesh Regoti le 4 Nov 2019
Hi Alberto,
I have tried it on the latest version of MATLAB R2019b and it worked fine for me.
1. Try updating / re-installing to the latest version of MATLAB R2019b.
2. Try re-installing the Deep Learning Toolbox.
Hope this helps!

Produits


Version

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by