Skip to content

Hemanshu4949/ObjectDetection_system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation





๐Ÿ‘๏ธ ObjectVision

Real-time On-Device Object Detection & Smart Product Analysis

ObjectVision is a fully offline Android application powered by a custom-trained YOLOv8 Nano model that detects objects in real-time at up to 60 FPS with 94.5% accuracy โ€” and goes beyond detection by delivering AI-powered nutritional and ingredient analysis for recognized products.

๐ŸŽ“ B.Tech Final Year Project โ€” ITM SLS Baroda University, 2026


๐Ÿš€ Getting Started โ€ข โœจ Features โ€ข ๐Ÿ“ธ Screenshots โ€ข ๐Ÿ› ๏ธ Tech Stack โ€ข ๐Ÿค– AI Model โ€ข ๐Ÿ‘ฅ Team


โœจ Features

Feature Description
๐Ÿ” Real-Time Neural Scan Live camera detection at up to 60 FPS with green bounding boxes and confidence scores
๐Ÿง  Custom YOLOv8 Nano Model Trained on a proprietary product dataset โ€” not generic COCO data
๐Ÿ“Š Neural Analytics Dashboard Inference speed (avg. 212ms), total scans, CPU load, and 94.5% accuracy stats
๐Ÿ“‹ Detection Logs Full timestamped history of every detected object with confidence scores
๐Ÿฅค AI Product Analysis Energy output, processing level, vegetarian/vegan status, and ingredient composition
๐Ÿงช Nutrition Facts Detailed carbs, fat, protein, sodium and allergen info per detected product
โš™๏ธ System Configuration Toggle High Precision Mode, Offline Processing, Haptic Feedback, Battery Optimization
๐Ÿ”’ 100% Offline All inference runs on-device โ€” no internet, no data sent to the cloud
๐ŸŒ™ Dark UI Sleek dark theme built with Jetpack Compose for a modern, eye-friendly experience
โšก Battery Smart Auto-reduces FPS when battery drops below 20%

๐Ÿ“ธ Screenshots

Core Screens

๐ŸŒ… Splash / Boot ๐Ÿ” Neural Scan (Live) ๐Ÿ“Š Neural Analytics
๐Ÿ“‹ Detection Logs โš™๏ธ System Config

๐Ÿฅค AI Product Analysis โ€” Hell Energy Drink (92.2% confidence)

Product Analysis Ingredients Composition Nutrition & Allergens

๐ŸŸ AI Product Analysis โ€” Balaji Aloo Sev (80.3% confidence)

Product Analysis Ingredients Composition Nutrition & Allergens

๐Ÿ› ๏ธ Tech Stack

โ”œโ”€โ”€ Language        โ†’  Kotlin (100%)
โ”œโ”€โ”€ UI Framework    โ†’  Jetpack Compose
โ”œโ”€โ”€ AI Model        โ†’  YOLOv8 Nano (custom-trained, Ultralytics)
โ”œโ”€โ”€ Model Training  โ†’  Python + PyTorch
โ”œโ”€โ”€ Runtime         โ†’  TFLite / ONNX (on-device inference)
โ”œโ”€โ”€ Build System    โ†’  Gradle (Kotlin DSL)
โ”œโ”€โ”€ Architecture    โ†’  MVVM + Jetpack Compose state management
โ””โ”€โ”€ Platform        โ†’  Android 8.0+ (Oreo and above)

Key Tools & Libraries:

  • ๐Ÿค– YOLOv8 Nano โ€” Ultra-lightweight YOLO variant optimized for mobile edge computing
  • ๐Ÿ“ฑ Jetpack Compose โ€” Declarative, reactive Android UI with smooth camera frames
  • โš™๏ธ TFLite Runtime โ€” Fast on-device neural network inference
  • ๐Ÿ”ฌ Custom Dataset โ€” Proprietary annotated product image dataset
  • ๐Ÿงฑ Kotlin Coroutines โ€” Non-blocking camera and inference threading

๐Ÿค– AI Model

Technical Pipeline

Camera Input
    โ†“
Frame Preprocessing
    โ†“
YOLOv8 Nano Model (TFLite)
    โ†“
Bounding Box Detection
    โ†“
Confidence Score Filtering
    โ†“
Product Data Mapping
    โ†“
Jetpack Compose UI Rendering

Performance Benchmarks

Metric Value
๐ŸŽฏ Detection Accuracy 94.5% on custom dataset
โšก Avg. Inference Latency ~212 ms
๐ŸŽฌ Max Frame Rate 60 FPS
๐Ÿ“ฆ Model YOLOv8 Nano (AI_MODEL_v4.2)
๐ŸŒ Internet Required None โ€” fully offline

๐Ÿ“ Project Structure

ObjectDetection_system/
โ”‚
โ”œโ”€โ”€ app/
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ main/
โ”‚       โ”‚   โ”œโ”€โ”€ java/          # Kotlin source (Activities, ViewModels, Composables)
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ screens/   # Neural Scan, Analytics, Logs, Settings, Analysis
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ model/     # Data classes (ScanSession, ProductData, Settings)
โ”‚       โ”‚   โ”‚   โ””โ”€โ”€ inference/ # YOLOv8 TFLite inference engine
โ”‚       โ”‚   โ”œโ”€โ”€ assets/        # YOLOv8 .tflite model weights + product database
โ”‚       โ”‚   โ”œโ”€โ”€ res/           # Layouts, drawables, strings
โ”‚       โ”‚   โ””โ”€โ”€ AndroidManifest.xml
โ”‚
โ”œโ”€โ”€ build.gradle.kts           # Root Gradle config
โ”œโ”€โ”€ settings.gradle.kts        # Project settings
โ””โ”€โ”€ gradle.properties

๐Ÿš€ Getting Started

Prerequisites

  • โœ… Android Studio (Hedgehog or later)
  • โœ… JDK 11 or above
  • โœ… Android device / emulator running Android 8.0+
  • โœ… Minimum 3 GB RAM recommended for smooth inference
  • โœ… Device with NPU or GPU preferred for optimal performance

Installation

1. Clone the repository

git clone https://github.com/Hemanshu4949/ObjectDetection_system.git
cd ObjectDetection_system

2. Open in Android Studio

File โ†’ Open โ†’ Select the cloned folder

3. Add the YOLOv8 model weights

Place your yolov8_model.tflite file in:

app/src/main/assets/

4. Sync Gradle & Run

Sync Gradle โ†’ Run on Device or Emulator

โš ๏ธ A physical device is strongly recommended โ€” the camera inference pipeline performs significantly better on real hardware than an emulator.

Building the Model (optional)

If you want to retrain the model on your own dataset:

# Install Ultralytics
pip install ultralytics

# Train YOLOv8 Nano
yolo task=detect mode=train model=yolov8n.pt data=your_dataset.yaml epochs=100 imgsz=640

# Export to TFLite
yolo export model=best.pt format=tflite

๐Ÿ”ง System Configuration Options

Setting Description Default
โšก High Precision Mode Prioritize accuracy over speed OFF
โ˜๏ธ Offline Processing No data leaves the device ON
๐Ÿ“ณ Haptic Feedback Vibrate on each object detection OFF
๐Ÿ”‹ Battery Optimization Lower FPS when battery < 20% ON

โš ๏ธ Challenges & Solutions

Challenge Solution
Dataset Creation Manually collected and annotated a custom product image dataset
Mobile Optimization Chose YOLOv8 Nano for the best accuracy-speed tradeoff on mobile
Real-Time Processing Used Kotlin Coroutines + non-blocking Compose updates to maintain 60 FPS
Model Deployment Optimized PyTorch โ†’ TFLite conversion to minimize precision loss

๐Ÿ”ฎ Future Scope

  • ๐Ÿ“ฒ Barcode and QR code scanning for extended product databases
  • ๐Ÿ—ƒ๏ธ Expanded custom dataset for more product categories
  • โŒš Wearable device integration
  • ๐ŸŽ™๏ธ Voice assistant support for accessibility

๐Ÿ—๏ธ Architecture & SDLC

Follows the Agile Iterative SDLC Model, enabling continuous improvements across:

  • AI model accuracy iteration
  • UI/UX enhancement cycles
  • Performance benchmarking sprints

git checkout -b feature/your-feature-name
git commit -m "Add: your feature description"
git push origin feature/your-feature-name
# Open a Pull Request ๐ŸŽ‰

โญ If you found this project helpful, give it a star!

Made with โค๏ธ using Kotlin, Jetpack Compose & YOLOv8

About

an mobile based food packet detection system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages