intel / webml-polyfill

Deprecated, the Web Neural Network Polyfill project has been moved to https://github.com/webmachinelearning/webnn-polyfill
Apache License 2.0
161 stars 42 forks source link

[Example] support more ONNX image classification models #222

Closed huningxin closed 5 years ago

huningxin commented 5 years ago

The existing example (https://github.com/intel/webml-polyfill/tree/master/examples/squeezenet) only supports ONNX SqueezeNet model for image classification. This task is to make the example more general to support more ONNX image classification models hosted here:

https://github.com/onnx/models#image_classification

It requires:

  1. refactor the example to load, compile and execute multiple models
  2. identify the unsupported ops if the model is not supported
pinzhenx commented 5 years ago

o - Not supported by current impl. x - Not supported by current impl. & Not supported directly by our API

Image Classification

Model BatchNormalization Add Mul Reshape LRN AveragePool Gemm Unsqueeze Sum Transpose
MobileNet v2-1.0 x o o
GoogleNet o x o x
AlexNet o x x
DenseNet-121 x o o o x
R-CNN ILSVRC13 o x x
CaffeNet o x x
Inception v1 o x o x
Inception v2 x o o o o x x
VGG w/ bn x x
ZFNet-512 o x x
ResNet-152v1 x o x
ResNet-152v2 x o o x
ShuffleNet x o o x x x

Other Applications

Model BatchNormalization Add Sub Mul Div Reshape Gemm Sum MatMul LeakyRelu ImageScaler Identity PRelu
CNTK on MNIST o o x
Tiny YOLOv2 x x x
DUC (ResNet101) x o x
ArcFace (ResNet100) x o x o x x x
Emotion FERPlus o x x o x
huningxin commented 5 years ago

@pinzhenx, thanks for the investigation! As the next step, please help investigate the possibility to fuse the batchnormalization op into conv op in JavaScript.

huningxin commented 5 years ago

open https://github.com/intel/webml-polyfill/issues/240

huningxin commented 5 years ago

@pinzhenx, could you please create a wiki page to capture the required ops of ONNX image classification as TFLite one: https://github.com/intel/webml-polyfill/wiki/Tflite-Model-for-Image-Classification-and-the-Ops-They-Include. Thanks!

SharanSMenon commented 4 years ago

Will densenet be supported?