App Structure

Learn about the structure of an image classification Android app that utilizes a TF Lite model to classify images.

Suppose we want to develop an Android app that asks the user to pick up an image from the device storage and classify it into predefined categories. The app should classify the selected image using a pretrained DL model in the TF Lite format.

To develop such an app, we can divide our Android project into two classes:

  • The MainActivity class: This is responsible for displaying the UI and handling user interactions.

  • The ImageClassifier class: This is responsible for classifying images using a pretrained TF Lite model.

The diagram below shows a possible implementation of the image classification Android app.

Get hands-on with 1400+ tech skills courses.