FirebaseExtended / mlkit-material-android

ML Kit Showcase App with Material Design
Apache License 2.0
491 stars 143 forks source link

MLKit's on-device Label(Image) Detection is very poor when compared to TensorFlow Label Detection #17

Open Raju-567 opened 4 years ago

Raju-567 commented 4 years ago

MLKit's on-device Label Detection is very poor when compared to TensorFlow Label detection. MLKit on-device model is not able to predict the images accurately .

When I debugged the both apps, I found that MLKit uses preview ImageFormat as NV21 and TensorFlow is using YUV_420_888 Image format.

ML kit android app https://github.com/firebase/quickstart-android

TensorFlow android app https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android

And I even tried using tflite model from TensorFlow app as a custom model in the MLKit android app and I see the predictions results are not satisfactory (the results are same as ML Kits on device Label Detection)

You can see the prediction results of MLKit and TensorFlow apps on water bottle and Laptop input Images. MLKit_LabelDetection_Laptop MLKit_LabelDetection_WaterBottle TensorFlow_LabelDetection_Laptop TensorFlow_LabelDetection_WaterBottle