A high-performance, real-time object detection application built with Flutter and TensorFlow Lite.
LensAI is a cutting-edge cross-platform application that leverages the power of TensorFlow Lite and the SSD MobileNet V1 COCO model to perform real-time, on-device object detection. Designed with performance and aesthetics in mind, the app processes camera frames instantaneously to draw accurate bounding boxes around recognized objects.
- Live Camera Detection: Seamless, real-time object recognition using the device's camera.
- Gallery Analysis: Pick static images from your gallery and analyze them for multiple objects.
- On-Device Machine Learning: Zero network latency and complete privacy—all ML inference is done locally via
tflite_flutter. - Advanced State Management: Built with
MobXfor highly reactive, scalable, and boilerplate-free state management. - Dynamic Bounding Boxes: Smooth, properly scaled bounding boxes mapping model tensor outputs directly to your device screen space.
| Live Object Detection | Gallery Image Object Detection |
|
|
This project is built applying best practices in modular Flutter architecture:
- Framework: Flutter SDK
- State Management: MobX (
mobx,flutter_mobx) - Machine Learning: TensorFlow Lite (
tflite_flutter) - Hardware Interfacing:
camera,image_picker - Image Processing:
image(Dart image manipulation library) - Assets Rendering:
flutter_svg
Follow these steps to run the application locally on your machine:
- Flutter SDK installed (version 3.x+ recommended).
- A physical device or an emulator/simulator with camera support.
-
Clone the repository
git clone https://github.com/mrrauf99/object-detection.git cd object_detection -
Install Flutter dependencies
flutter pub get
-
Run the application
flutter run
Note: For the best real-time performance, it is highly recommended to run this application on a physical device in Release or Profile mode rather than an emulator.
flutter run --release- Model: SSD MobileNet V1
- Dataset: COCO (Common Objects in Context)
- Input Shape:
[1, 300, 300, 3] - Outputs: 4 Tensors (Locations, Classes, Scores, Number of Detections)
Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'feat: Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.

