Skip to content

itsananytripathi/VisionForge-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VisionForge AI

Real-Time Computer Vision Analytics Platform

Python OpenCV Streamlit


Overview

VisionForge AI is a production-ready computer vision analytics platform that provides real-time detection, tracking, and analysis capabilities. Built with OpenCV, Streamlit, and modern Python best practices, it offers a comprehensive suite of tools for face detection, object tracking, lane detection, and traffic analytics.

Key Features

  • Face Detection: Real-time face and eye detection using Haar Cascade classifiers
  • Object Tracking: HSV color-based tracking and centroid tracking algorithms
  • Lane Detection: Road lane detection using Canny edge detection and Hough Transform
  • Traffic Analytics: Vehicle counting, density estimation, speed measurement, and congestion analysis
  • Performance Benchmarking: FPS, latency, CPU, and memory profiling
  • Interactive Dashboard: Streamlit-based web interface for real-time visualization
  • Analytics Engine: Comprehensive data collection and statistical analysis
  • Visualization: Plotly-powered charts and graphs for data exploration

Architecture

VisionForge AI follows a modular architecture with clear separation of concerns:

VisionForge-AI/
├── app.py                      # Streamlit dashboard
├── src/
│   ├── __init__.py
│   ├── face_detection.py       # Face and eye detection module
│   ├── object_tracking.py      # Object tracking algorithms
│   ├── lane_detection.py       # Lane detection for roads
│   ├── traffic_analysis.py     # Traffic analytics engine
│   ├── analytics.py            # Analytics and statistics
│   ├── benchmarking.py         # Performance benchmarking
│   ├── visualization.py        # Plotly visualizations
│   └── utils.py                # Utility functions
├── datasets/                   # Sample datasets
├── assets/                     # Static assets
├── docs/                       # Documentation
├── results/                    # Analysis results
├── tests/                      # Unit tests
├── legacy/                     # Original demo code
└── requirements.txt            # Python dependencies

Installation

Prerequisites

  • Python 3.8 or higher
  • pip package manager

Setup

  1. Clone the repository:
git clone https://github.com/yourusername/VisionForge-AI.git
cd VisionForge-AI
  1. Install dependencies:
pip install -r requirements.txt
  1. Verify installation:
python -c "import cv2; print(f'OpenCV version: {cv2.__version__}')"

Usage

Launch the Dashboard

Start the Streamlit dashboard:

streamlit run app.py

The dashboard will open in your browser at http://localhost:8501

Dashboard Sections

  1. Overview: System metrics and platform features
  2. Image Analysis: Upload images for face and lane detection
  3. Video Analysis: Process videos for traffic and lane analysis
  4. Webcam Mode: Real-time camera stream with live detection
  5. Benchmark Dashboard: Performance profiling and metrics

Python API Usage

from src.face_detection import FaceDetector
from src.lane_detection import LaneDetector
from src.traffic_analysis import TrafficAnalytics
from src.analytics import AnalyticsEngine

# Face Detection
detector = FaceDetector()
results = detector.detect_faces_with_eyes(image)

# Lane Detection
lane_detector = LaneDetector()
lane_results = lane_detector.process_frame(frame)

# Traffic Analytics
traffic = TrafficAnalytics()
traffic_results = traffic.process_frame(frame)

# Analytics
analytics = AnalyticsEngine()
analytics.record_face_detection(results)
report = analytics.generate_detection_summary()

Features in Detail

Face Detection Module

  • Haar Cascade-based face detection
  • Eye detection within face regions
  • Bounding box visualization
  • Face statistics (count, size, area)
  • Processing time metrics

Object Tracking Module

  • HSV color space tracking
  • Centroid tracking algorithm
  • Object counting across lines
  • Tracking history and duration
  • Tracking accuracy metrics

Lane Detection Module

  • Canny edge detection
  • Region of Interest (ROI) masking
  • Hough Transform line detection
  • Left/right lane separation
  • Lane curvature estimation
  • Deviation from center calculation

Traffic Analytics Module

  • Background subtraction for vehicle detection
  • Traffic density estimation
  • Vehicle speed estimation
  • Congestion scoring (free to severe)
  • Comprehensive analytics reports

Benchmark Engine

  • FPS measurement
  • Latency profiling (P50, P95, P99)
  • CPU and memory monitoring
  • Video processing throughput
  • Baseline comparison

Visualization

  • Detection count charts
  • Traffic density graphs
  • Congestion level distribution
  • FPS and latency plots
  • CPU/memory usage charts
  • Benchmark comparison visualizations

Testing

Run the test suite:

pytest tests/ -v --cov=src

Run specific test modules:

pytest tests/test_face_detection.py -v
pytest tests/test_analytics.py -v

Documentation


Performance Benchmarks

Typical performance on modern hardware:

Module FPS Latency Memory
Face Detection 30-45 15-25ms 150MB
Object Tracking 25-40 20-30ms 180MB
Lane Detection 20-35 25-35ms 200MB
Traffic Analytics 15-30 30-45ms 250MB

Benchmarks vary based on hardware and input resolution


Roadmap

  • Deep learning model integration (YOLO, SSD)
  • Multi-camera support
  • Cloud deployment options
  • Real-time alert system
  • Mobile application
  • REST API endpoints
  • Database integration for analytics storage
  • Advanced visualization dashboard

Contributing

Contributions are welcome! Please read the Contributing Guide for details on our code of conduct and the process for submitting pull requests.


Author

Anany Tripathi

AI Engineer | Computer Vision Specialist


Acknowledgments

  • OpenCV community for excellent computer vision tools
  • Streamlit team for the amazing dashboard framework
  • Plotly for interactive visualization capabilities

Contact

For questions, suggestions, or collaboration opportunities, please open an issue on GitHub.


VisionForge AI - Transforming Computer Vision into Actionable Insights

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages