doughtmw / HoloLens2-Machine-Learning

Using deep learning models for image classification directly on the HoloLens 2.
MIT License
107 stars 28 forks source link

EfficientDet D0 how to run #4

Closed syedali1621 closed 2 years ago

syedali1621 commented 3 years ago

Hi as the Efficientnet B0 is working in this code. I trained efficientDet D0 and i want to run that using your code to run in hololens. Could you please let me know is it possible to run EfficientDet D0 with your code ? If possible, then what changes I need to do in your code. I am trying to modify your code to run my EffcientDet model by visualizing my model using https://netron.app/. If you kindly provide your suggestions then it would be helpful for me.

Thank you

doughtmw commented 3 years ago

Hi @syedali1621, thanks for your question! The EfficientDet architecture is a bit different in its implementation than EfficientNet and some of the layers of its BiFPN are challenging to correctly export to ONNX format. There is also some further post-processing that's required (NMS etc.) for determining the optimal bounding boxes in a regression task. I've had better experiences with using PyTorch for ONNX export of models - I'd recommend you begin with a simple ONNX exported EfficientDet model and see if you can run it in the ONNX runtime architecture on Windows prior to attempting to incorporate on the HoloLens as debugging is far easier (https://www.onnxruntime.ai/).