Unity Barracudaを用いてMNIST(手書き数字認識)をWebGL上で推論するサンプルです。
動作確認用ページは以下。
https://kazuhito00.github.io/Unity-Barracuda-MNIST-WebGL-Sample/WebGL-Build
- Unity 2020.1.6f1 or later
- Barracuda 1.3.0 or later
- Tensorflow 2.4.0 or later
- tf2onnx 1.8.2 or later
- onnxruntime 1.6.0 or later(※ONNX変換後の推論をテストする場合のみ)
「MNIST_Tensorflow2ONNX.ipynb」にて、TensorflowによるMNISTの訓練とONNX変換を実施しています。
今回作成したモデルの構造は以下です。
高橋かずひと(https://twitter.com/KzhtTkhs)
Unity-Barracuda-MNIST-WebGL-Sample is under Apache-2.0 License.