Skip to content

mrrauf99/Object-detection

Repository files navigation

🎯 LensAI: Flutter Object Detection

A high-performance, real-time object detection application built with Flutter and TensorFlow Lite.

Flutter TensorFlow Lite Dart License: MIT


✨ Overview

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.

🚀 Key Features

  • 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 MobX for 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.

🎥 Demo Video

Live Object Detection Gallery Image Object Detection

🛠️ Architecture & Tech Stack

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

⚙️ Setup & Installation

Follow these steps to run the application locally on your machine:

Prerequisites

  • Flutter SDK installed (version 3.x+ recommended).
  • A physical device or an emulator/simulator with camera support.

Installation

  1. Clone the repository

    git clone https://github.com/mrrauf99/object-detection.git
    cd object_detection
  2. Install Flutter dependencies

    flutter pub get
  3. 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

🧠 ML Model Specifications

  • 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)

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'feat: Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

Distributed under the MIT License. See LICENSE for more information.


Built with ❤️ using Flutter & TensorFlow

About

Real-time object detection app built with Flutter and TensorFlow Lite.

Topics

Resources

License

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors