Skip to content

mlsecdev/Live-AI-Image-Recognition-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Live AI Image Recognition Engine

Overview

The Live AI Image Recognition Engine is a real-time computer vision system designed to perform image classification on live video streams. It leverages deep learning models built with TensorFlow/Keras and integrates with OpenCV for real-time frame capture and inference. The system is optimized for low-latency prediction and can be adapted to various use cases such as face recognition, intoxication detection, and industrial quality control.


Features

  • Real-time image classification using webcam input
  • CNN-based architecture with transfer learning (MobileNetV2 / EfficientNet)
  • Support for imbalanced datasets using class weighting or focal loss
  • Modular training and inference pipeline
  • Performance evaluation with accuracy, precision, recall, F1-score, and confusion matrix
  • Optimized deployment using TensorFlow Lite for edge devices
  • Scalable design for multiple computer vision applications

Tech Stack

  • Python
  • TensorFlow / Keras
  • OpenCV
  • NumPy / Pandas / Matplotlib
  • TensorFlow Lite (for deployment)

System Architecture

Input (Webcam / Image Stream)
        ↓
Preprocessing (Resize, Normalize)
        ↓
CNN Model (Feature Extraction + Classification)
        ↓
Prediction Output (Label + Confidence)
        ↓
Display / Application Layer

Project Structure

realtime-image-classifier/
│
├── data/                  # Dataset (train, validation, test)
├── models/                # Saved models (.h5 / .tflite)
├── notebooks/             # Training and experimentation notebooks
├── src/
│   ├── preprocessing/     # Data preprocessing scripts
│   ├── training/          # Model training pipeline
│   ├── evaluation/        # Metrics and evaluation scripts
│   └── inference/         # Real-time inference (OpenCV)
│
├── requirements.txt
├── config.yaml
└── README.md

Installation

git clone https://github.com/your-username/live-ai-image-recognition-engine.git
cd live-ai-image-recognition-engine

pip install -r requirements.txt

Training

python src/training/train.py

Configure:

  • Model backbone (MobileNetV2 / EfficientNet)
  • Input size (recommended: 224x224)
  • Class weights or focal loss for imbalance handling

Evaluation

python src/evaluation/evaluate.py

Metrics include:

  • Accuracy
  • Precision / Recall
  • F1 Score
  • Confusion Matrix

Real-Time Inference

python src/inference/realtime.py
  • Captures webcam input using OpenCV
  • Performs frame-by-frame prediction
  • Displays class label with confidence score

Deployment

For optimized inference:

  • Convert model to TensorFlow Lite:
python src/inference/convert_to_tflite.py
  • Apply quantization (int8 / float16) for reduced latency and size
  • Deploy on edge devices or mobile platforms

Use Cases

  • Face recognition systems
  • Alcohol intoxication detection
  • Industrial defect detection
  • General object classification

Future Improvements

  • Integration with FastAPI for web-based inference
  • Mobile deployment using TensorFlow Lite
  • Temporal smoothing for video stability
  • Advanced detection pipelines (e.g., face detection + classification)

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.


Author


Au Amores

Developed as part of a real-time computer vision system for practical AI deployment and research applications.

About

Live image recognition system for real-time object detection and visual analysis using machine learning and computer vision.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors