Skip to content

nickdu088/Webcam-Livestream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“· Real-Time Object Detection and Live Video Streaming Web App

Project Description

Two version of object detection:

  1. Server side - suit for powerful web server.
  2. Client (browser) side - suit for IoT devices

This project is a lightweight web application for real-time object detection and video streaming using a webcam. Built with aiohttp for asynchronous web serving and powered by YOLOv8 (You Only Look Once) for object detection, the app processes webcam footage, detects objects in each frame, annotates them, and streams the result to a web browser in real time.


πŸš€ Features

  • 🧠 YOLOv8-based Object Detection
    Utilizes the ultralytics YOLOv8n model for fast and efficient object recognition.

  • πŸ”„ Asynchronous Streaming
    Leverages asyncio and a ThreadPoolExecutor to handle frame capture, processing, and encoding without blocking the event loop.

  • 🌐 Live Video Feed in Browser
    Streams video using multipart/x-mixed-replace, viewable in any modern web browser.

  • πŸ“Š FPS Monitoring
    Real-time FPS (frames per second) is displayed directly on the video feed for performance monitoring.

  • πŸ”§ Multithreaded Execution
    Handles CPU-bound operations in background threads for smoother performance.


πŸ› οΈ Technologies Used

  • Python 3
  • aiohttp – asynchronous HTTP server
  • OpenCV – image and video processing
  • Ultralytics YOLOv8 – object detection model
  • asyncio, concurrent.futures – async programming and thread pooling
  • HTML + Bootstrap – responsive frontend UI

πŸ–₯️ Usage

  1. Install the required packages:

    pip install aiohttp opencv-python ultralytics
    
  2. Run the application:

    python app.py
    
  3. Open your browser and go to: http://localhost:8080

  4. View the live, annotated webcam feed in real time!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages