The Lucky 13 Resources for Learning R and Statistics

As a statistics and analytics instructor I often refer students to websites, articles and books that can help them achieve their data dreams. These are the best that I have found for R and…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Build a custom image classifier for your android application.

Image classification or image recognition is a concept in which you showcase an image to the camera sensor of the device and it will tell you what is present in that image or tell us which class does it belongs to.

Let’s take a simple use-case of Fruits Classification Application for android.

The WorkFlow for Image classification in android
Training process teachablemachine-with-google

During training, you can change the no of hyperparameters like:

After the training is done, you have to export the model in the TensorFlow lite format for the deployment in android devices. The .tflite files should be placed in the asset folder of the android project directory and change the name in the java file which is reading it. Also, you can download quantized as well as FLOAT file format of tflite.

Exporting the model

Place the .tflite file to the asset folder and replace the name and you can build the application now.

Select Build -> Make Project and check that the project builds successfully. You will need the Android SDK configured in the settings. You'll need at least SDK version 23. The build.gradle file will prompt you to download any missing libraries. you have to put the fruits.tflite to the asset folder of the android structure project directory and change the labels according to the number of the class you have trained.

Connect the Android device to the computer and be sure to approve any ADB permission prompts that appear on your phone. Select Run -> Run app. Select the deployment target in the connected devices to the device on which the app will be installed. This will install the app on the device.

Download the code:

References:

Add a comment

Related posts:

Live Speech Emotion Recognition

If you heard the following sentences during a conversation you could likely figure out the sentiment category — either calm, happy, sad, angry, fearful, surprise, and disgust — they fall under. Can a…

What is happening with the new digital market?

The last few weeks have not been great for the world of cryptocurrencies and the last week of June a drop in the value of BTC was recorded along with other altcoins totalling $8bn. During this time…

I hate Monday

I use to be part of the people who hated Mondays. I used to share pictures, quotes and even used my Monday bitmoji to express how much I hated the beginning of the week. As I learned through…