The Gallery-IA app allows you to view photos and images from the user's device with a modern and intuitive look. Using Google ML Kit, these images will be automatically classified based on their content using both standard models and the ones we train ourselves. It was made in Jetpack Compose to explore Machine Learning and Artificial Intelligence capabilities on Android with Kotlin. Through it, we will explore.
The base project has the following screens:
- Home tab: Choose between viewing all images in a folder or viewing a single image.
- View a single image: Select any image from the device to analyze with ML Kit.
- General gallery: Displays a grid with all images in the selected folder.
- Gallery with AI: Displays a grid with groups automatically generated by analyzing the images in the folder.
- Image details: When clicking on an image in the grid, it expands and displays the labels that were identified in it below.
galeria-ia-demo.mp4
- Perform analysis locally on user-chosen images with ML Kit's image labeling library.
- Present on screen the information extracted from the images.
- Use the labels obtained through analysis to create groups of images such as "People", "Animals", "Food", "Music", etc.
- Make use of the custom models that we will train or that you can download to perform custom analyzes for specific use cases.
The techniques and technologies used for this are:
-
Jetpack Compose
: Modern toolkit for creating UIs on mobile devices -
Kotlin
: programming language -
Gradle Version Catalogs
: new way to manage plugins and dependencies in Android projects -
Material Design 3
: design pattern recommended by Google for creating modern UIs -
Hilt
: dependency injection -
Navigating with Compose
: navigation between composables and screens -
Viewmodel and states
: screen state management -
Kotlin Datetime
: navigation between composables and screens. -
ML Kit Image labeling
: library for detecting and extracting information about entities in an image across a wide group of categories. Additionally, it allows you to run custom models. -
TensorFlow Lite Models
: set of pre-trained and optimized models to run efficiently on mobile devices. -
Teachable Machine
: Platform that allows you to train machine learning models easily, without the need to write code. Allows users to create custom models for object recognition, image classification and more, with an intuitive and user-friendly interface.