Closed ChurikiTenna closed 10 months ago
Make sure to follow this tutorial: https://github.com/flutter-ml/mlkit-custom-model
Pay special attention to the Metadata
section.
Run the tutorial in Google Colab: https://colab.research.google.com/github/flutter-ml/mlkit-custom-model/blob/main/ml_kit_custom_model.ipynb
Thank you for the tutorial! I could never found it for some reasons. I'll follow the tutorial and let you know how it goes.
I followed the tutorial (basically copied all lines) and the predictions significantly improved!! Thank you so much @fbernaly !!
Log:
labels (normal8: 8.861006736755371, normal4: 7.560824394226074, normal2: 5.855652332305908, normal12: 1.419419765472412, normal20: 0.5430938005447388)
Ok, I thought the prediction improved, turns out, it was generating almost same results to all images after all. I guess my training data is bad.
flutter: labels (normal8: 8.851354598999023, normal4: 8.038700103759766, normal2: 6.131048202514648, normal12: 1.9037384986877441)
flutter: labels (normal8: 9.227707862854004, normal4: 7.298639297485352, normal2: 6.035979747772217, normal12: 1.4222862720489502)
flutter: labels (normal8: 9.335094451904297, normal4: 7.643350124359131, normal2: 6.177713394165039, normal12: 1.5826878547668457)
flutter: labels (normal8: 9.33517837524414, normal4: 7.654670715332031, normal2: 6.25003719329834, normal12: 1.6401894092559814)
flutter: labels (normal8: 8.866486549377441, normal4: 8.136223793029785, normal2: 6.065356254577637, normal12: 1.9531581401824951)
Describe the bug I trained my model with approx. 400 images, and run the model on flutter. But, the model produces almost the same result with all images (such as an image of blank wall, or an image of certain object...).
To Reproduce I trained 7 categories with approx. 60 images each. Last tflite training log result accuracy of 0.6.
8/8 [==============================] - 1s 77ms/step - loss: 0.9956 - accuracy: 0.6116 - val_loss: 1.5415 - val_accuracy: 0.3167
I assume the model is not trained enough?? Or am I missing something? I know it is not enough for the production, but I expected that it can guess better.
Code:
_imageLabeler.processImage log:
Expected behavior It should be able to roughly distinguish what the labels are.
Platform (please complete the following information):