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.
- 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
- Python
- TensorFlow / Keras
- OpenCV
- NumPy / Pandas / Matplotlib
- TensorFlow Lite (for deployment)
Input (Webcam / Image Stream)
↓
Preprocessing (Resize, Normalize)
↓
CNN Model (Feature Extraction + Classification)
↓
Prediction Output (Label + Confidence)
↓
Display / Application Layer
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
git clone https://github.com/your-username/live-ai-image-recognition-engine.git
cd live-ai-image-recognition-engine
pip install -r requirements.txtpython src/training/train.pyConfigure:
- Model backbone (MobileNetV2 / EfficientNet)
- Input size (recommended: 224x224)
- Class weights or focal loss for imbalance handling
python src/evaluation/evaluate.pyMetrics include:
- Accuracy
- Precision / Recall
- F1 Score
- Confusion Matrix
python src/inference/realtime.py- Captures webcam input using OpenCV
- Performs frame-by-frame prediction
- Displays class label with confidence score
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
- Face recognition systems
- Alcohol intoxication detection
- Industrial defect detection
- General object classification
- 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)
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Au Amores
Developed as part of a real-time computer vision system for practical AI deployment and research applications.