App Structure

Learn about the structure of an object detection Android app that utilizes a TF Lite model to detect objects in images.

Suppose we want to develop an Android app that asks the user to pick up an image from the device storage and detect objects present in the image. The app utilizes a pretrained TF Lite object detection model.

To develop such an app, we can use the ObjectDetector API of the Task Library within the MainActivity of our Android project. The MainActivity is responsible for displaying the UI, handling user interactions, integrating the ObjectDetector API of the Task Library, extracting the bounding boxes, and displaying the object detection results.

The diagram below shows a possible implementation of the object detection Android app.

Get hands-on with 1400+ tech skills courses.