I am trying to import a deeplabv3.onnx ML model into unity to use it to make inferences on images and return images. I am trying to use unity barracuda to accomplish this.
The onnx file is itself 238 MB.
When importing the model however, the editor stalls for a moment before the importing progress bad appears, and it remains blank and busy for about 45 seconds, in which the editor begins consuming more and more memory but never actually using all of it, before returning this error:
OnnxImportException: Unexpected error while parsing layer /classifier/classifier.0/convs.2/convs.2.0/Conv_output_0 of type Conv.
Out of memory
The closest I have found to a mention of this issue is in this thread:
A solution is discussed to have been released in a later update, however which update is not mentioned so I have attempted updating my project to both the 2022 and 2023 LTS but the problem persisted.
The only way I have managed to import successfully is by ticking the “Treat Errors As Warnings” box in the import process in the inspector.
but them I am left with a model with several warnings as seen here:
detailing: “/classifier/classifier.0/convs.2/convs.2.0/Conv_output_0 Unexpected error while parsing layer /classifier/classifier.0/convs.2/convs.2.0/Conv_output_0 of type Conv. Will replace it by an Identity layer.”
My assumption is that this warning indicates the model will not work as intended because of this error, despite the import being complete.
Any pointers on this issue? Any advice other than “use a smaller model” would be welcome. Thank you.
