https://github.com/tharushaudana/yolo11s-tflite-android-java
An Android app (Java) that runs the YOLO11s model using TensorFlow Lite (TFLite) for object detection. It captures a frame from the live camera feed upon clicking Detect, identifies objects, and displays bounding boxes with class names and confidence scores.
https://github.com/tharushaudana/yolo11s-tflite-android-java
android java object-detection tflite yolo11 yolo8
Last synced: 7 months ago
JSON representation
An Android app (Java) that runs the YOLO11s model using TensorFlow Lite (TFLite) for object detection. It captures a frame from the live camera feed upon clicking Detect, identifies objects, and displays bounding boxes with class names and confidence scores.
- Host: GitHub
- URL: https://github.com/tharushaudana/yolo11s-tflite-android-java
- Owner: tharushaudana
- Created: 2025-02-17T18:12:14.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-02-17T18:52:53.000Z (8 months ago)
- Last Synced: 2025-02-17T19:41:51.354Z (8 months ago)
- Topics: android, java, object-detection, tflite, yolo11, yolo8
- Language: Jupyter Notebook
- Homepage:
- Size: 55.1 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# YOLO11s Android App
This is an Android application (Java) that runs the **YOLO11s** object detection model on mobile devices using **TensorFlow Lite (TFLite)**. The app allows object detection on captured frames using the YOLO11s model optimized for edge devices.
## Features
- Runs **YOLO11s** model on Android devices using **TFLite**.
- Live camera feed with manual detection.
- Captures the current frame when the **Detect** button is clicked.
- Displays detected objects with bounding boxes, class names, and confidence scores.## Model Conversion
To convert a YOLO model into the **TFLite** format, refer to the **YOLO11S_Convert_to_TFLite.ipynb** notebook included in this repository.## Pretrained Model
This repository includes a YOLO11s model pretrained for playing card symbol detection. However, you can use your own trained model by converting it to TFLite format and replacing the provided model.## Screenshots
### Detection Output
### Tensor Shape Output
The output tensor shape and its details (for COCO dataset, 80 classes) can be found in the following GitHub discussion:
[Ultralytics Discussion #17254](https://github.com/orgs/ultralytics/discussions/17254)
## Requirements
- Android 7.0 (API level 24) or higher
- TensorFlow Lite dependencies added to `build.gradle`
- A device with a camera for capturing frames## Setup & Installation
1. Clone this repository:
```sh
git clone https://github.com/tharushaudana/YOLO11S-TFLite-Android-Java.git
```
2. Open the project in **Android Studio**.
3. Ensure that `TensorFlow Lite` dependencies are added in `build.gradle`:
```gradle
implementation("org.tensorflow:tensorflow-lite:2.9.0")
implementation("org.tensorflow:tensorflow-lite-task-vision:0.3.1")
implementation("org.tensorflow:tensorflow-lite-gpu:2.9.0")
```
4. Place the **TFLite** model and `classes.txt` inside the `assets` folder.
5. Run the app on an Android device/emulator.## Usage
1. Launch the app.
2. Grant camera permissions.
3. View the live camera feed.
4. Click the **Detect** button to capture the current frame.
5. The detected objects will be displayed with bounding boxes, class names, and confidence scores.## Acknowledgments
- [TensorFlow Lite](https://www.tensorflow.org/lite)
- [Ultralytics](https://github.com/ultralytics)