Exercise Learn Object Detection Training By Example
...with Keras using TesnorBoard and deploying to Android for runtime
... this features Google's AI Edge MediaPipe API toward Mobile development
PART 1 Learn Training By Example GROUP work
-
Pre-requistes: experience you gained in Lab (Object Detection) and go over Roboflow's blog to learn how to host your OWN dataset and modify the Lab Colab to use a Roboflow dataset you create.
-
Task:
-
Get an account on Roboflow and create a dataset of at least 100 cats and 100 dogs in images. Annotate them. Export the dataset and upload to your Google Drive acccount.
-
Create your OWN COLAB (hosted in your Google Drive) using the Lab so that it uses this NEW dataset. Make sure you partition data off for test data.
-
Train the dataset making sure to save checkpoint to your Google Drive and Tensorboard log files. Visualizae the results and discuss the tensorboard loss and accuracy charts for both localization and identification..
-
Next make sure your evaluate using the test data and print out Coco Metrics. Discuss what you are seeing.
-
Choose 2 parameters to alter and retrain and discuss the new tensorboard log file charts as well as the new Coco Metrics.
-
Make sure you save the model and convert to a TFLite version and save to the Google Drive. Read latest from Android on how to covert a trained model to an android / mobile ready model
-
-
Deliverables: turn in the following screenshots+Descriptions in a single PDF document.
- Screenshot 1: After first trainging - Tensorboard accuracy/loss curves (all of them) + Discuss what you think is happening in the curves. Do you think you need to train further? Is there any overtraining?
- Screenshot 2 + Discussion: Show the Coco Metrics and discuss
- Screenshot 3 + Discussion: After Retraining with changing your 2 parameters show the Tensorboard accuracy/loss curves and discuss what changed.
- Screenshot 4 + Discussion:Show the Coco Metrics for this new retrained model and discuss
-
Resources + Special Notes:
-
See our outline page that discusses how to setup a COLAB or search the web/Goolge for information on how to do it: Training on Colab and Instructions for Colab setup and Google Provided Colab Basics.
CAUTION: APIs change all of the time. For example, in the older example: After tensorflow 2.2+ tf.keras.model.fit will work and tf.keras.model.fit_generator will be deprecated.
Part 2: Android Deployment GROUP work
-
Pre-requistes: Read on Android Website how to create a Tensorflow Lite Application for Mobile Devlopment-- use the information for this linked off our Android section of our website outline page.
-
Task:
-
Make sure you save your Model in your Google drive
-
Make sure you display the detected boxes and labels with certainty values for a user specified IoU threshold.
-
If not already done convert your Model you created in Part 1 to a TFlite model for mobile deployment.
-
Create a Kotlin/Java or Kotlin or Java Android Application to deploy your ML model to classify Dog/Cats. NOTE there may be some changes from sample code you have from Google AI Edge to support the new LiteRT(previously called TFlite)
-
Test your application and see if it works.
-
Deliverables
-
FOR EACH PART 1 & 2 -
-
part 1 = GROUP work Post to Canvas-Assignments-Object Detection Part1 a single PDF document containing the specified (see above) screenshots+descriptions.
-
part 2 = GROUP work (turn in one per group) Convert model to TFLite and get it to work in your Android app you had working from previous exercises. Make a Youtube video showing the application working and discuss any problems you had in creating the application and how you resolved them. Post to Canvas-Assignments-Object Detection Part2.
-