Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

[Example] support more TFLite image classification models #220

Closed
huningxin opened this issue Oct 8, 2018 · 3 comments
Closed

[Example] support more TFLite image classification models #220

huningxin opened this issue Oct 8, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@huningxin
Copy link
Contributor

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

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/lite/g3doc/models.md#image-classification-float-models

It requires:

  1. refactor the example to load, compile and execute multiple models
  2. identify the unsupported ops if the model is not supported
@Wenzhao-Xiang
Copy link
Contributor

Wenzhao-Xiang commented Oct 8, 2018

These are the models that are supported with present ops:
Mobilenet_V1 / Mobilenet_V2 / Inception_V3 / Squeezenet

And these are the models that are unsupported now and the ops they need:

model   FullyConnected Mean Pad Split StridedSlice
Densenet   √      
Inception_V4   √        
Inception_Resnet_V2   √        
Nasnet_Mobile   √
Nasnet_Large   √
ResNet_V2_50        
ResNet_V2_101        
MnasNet_1.0_224   √      

Besides, Mobilenet_V1 need the true Squeeze operator, now we use Reshape to replace it.

@Wenzhao-Xiang
Copy link
Contributor

NNAPI now support FullyConnected / Mean / Pad / StridedSlice.
And this is the definition of Split in tensorflow.js.

@Wenzhao-Xiang
Copy link
Contributor

This is the tflite model for Image Classification and the ops they include.

Model \ Op Type ADD MUL CONV_2D DEPTHWISE_CONV_2D AVERAGE_POOL_2D MAX_POOL_2D CONCATENATION RESHAPE SOFTMAX SQUEEZE FULLY_CONNECTED Mean PAD SPLIT STRIDED_SLICE RELU
Mobilenet_V1                      
Mobilenet_V2                    
SqueezeNet                    
Densenet              
Inception_V3                    
Inception_V4                    
Inception_Resnet_V2                    
Nasnet_Mobile    
Nasnet_Large    
ResNet_V2_50                
ResNet_V2_101                
MnasNet_1.0_224                      

And Here is the Wiki page

Wenzhao-Xiang pushed a commit to Wenzhao-Xiang/webml-polyfill that referenced this issue Oct 17, 2018
…hem to example "image_classification_tflite"

Fix intel#220
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants