Understand-sentis-workflow / ClassifyHandwrittenDigit example import error

  1. Download a handwriting recognition ONNX model file, for example the MNIST Handwritten Digit Recognition model mnist-8.onnx from the ONNX Model Zoo, and drag it into the Assets folder of the Project window.

It seems that the link to the ONNX model file is no longer available, and it has been moved to the following location:

If you add the mnist-8.onnx file to the Asset folder, the following error pops up.

InvalidProtocolBufferException: Protocol message contained a tag with an invalid wire type.
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.ParseContext& ctx) (at :0)
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.UnknownFieldSet unknownFields, Google.Protobuf.ParseContext& ctx) (at :0)
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.UnknownFieldSet unknownFields, Google.Protobuf.CodedInputStream input) (at :0)
Onnx.ModelProto.MergeFrom (Google.Protobuf.CodedInputStream input) (at ./Library/PackageCache/com.unity.sentis@1.3.0-pre.2/Runtime/ONNX/Generated/Onnx.cs:1645)

Asset import failed, “Assets/mnist-8.onnx” > InvalidProtocolBufferException: Protocol message contained a tag with an invalid wire type.
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.ParseContext& ctx) (at :0)
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.UnknownFieldSet unknownFields, Google.Protobuf.ParseContext& ctx) (at :0)
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.UnknownFieldSet unknownFields, Google.Protobuf.CodedInputStream input) (at :0)
Onnx.ModelProto.MergeFrom (Google.Protobuf.CodedInputStream input) (at ./Library/PackageCache/com.unity.sentis@1.3.0-pre.2/Runtime/ONNX/Generated/Onnx.cs:1645)

Unity 2022.3.16f1
Sentis 1.3.0-pre.2

The link is now fixed, check the documentation page again. Make sure you have selected the 1.3.0 version on the documentation page, otherwise, the link will be still outdated. Let me know if you still experience the mentioned errors.

“I have confirmed that the URL has been changed. After updating to Sentis 1.3.0-pre.3, when I download the mnist-8.onnx file from the following URL and try to add it to the Project Window, the following error occurs: [URL] models/validated/vision/classification/mnist/model/mnist-8.onnx at main · onnx/models · GitHub

InvalidProtocolBufferException: Protocol message contained a tag with an invalid wire type.
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.ParseContext& ctx) (at :0)
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.UnknownFieldSet unknownFields, Google.Protobuf.ParseContext& ctx) (at :0)
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.UnknownFieldSet unknownFields, Google.Protobuf.CodedInputStream input) (at :0)
Onnx.ModelProto.MergeFrom (Google.Protobuf.CodedInputStream input) (at ./Library/PackageCache/com.unity.sentis@1.3.0-pre.3/Runtime/ONNX/Generated/Onnx.cs:1645)

Asset import failed, “Assets/mnist-8.onnx” > InvalidProtocolBufferException: Protocol message contained a tag with an invalid wire type.
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.ParseContext& ctx) (at :0)
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.UnknownFieldSet unknownFields, Google.Protobuf.ParseContext& ctx) (at :0)
Google.Protobuf.UnknownFieldSet.MergeFieldFrom (Google.Protobuf.UnknownFieldSet unknownFields, Google.Protobuf.CodedInputStream input) (at :0)
Onnx.ModelProto.MergeFrom (Google.Protobuf.CodedInputStream input) (at ./Library/PackageCache/com.unity.sentis@1.3.0-pre.3/Runtime/ONNX/Generated/Onnx.cs:1645)

model must be corrupted.
Either re-download/import or clear your Library folder