Skip to content

A TensorFlow-based `Faster RCNN Inception v2` model for detecting and counting humans in real-time using images, videos, and live camera feeds. This project leverages a pre-trained `frozen_inference_graph.pb` for efficient detection and visualization of human counts, providing insights through Enumeration and Accuracy plots.

Notifications You must be signed in to change notification settings

Tusharb331/Real-Time-Human-Detection-And-Counting

Repository files navigation

🚀 Real-Time Human Detection & Counting

A TensorFlow-based Faster RCNN Inception v2 model for detecting and counting humans in real-time using images, videos, and live camera feeds. This project leverages a pre-trained frozen_inference_graph.pb for efficient detection and visualization of human counts, providing insights through Enumeration and Accuracy plots.


📋 Features

  • Real-Time Detection: Supports detecting humans from images, video files, and live camera feeds.
  • Pre-Trained Model: Uses a frozen_inference_graph.pb for faster and more accurate detection.
  • Visual Analysis: Generates detailed plots for:
    • Enumeration Plot: Shows human count over time.
    • Avg. Accuracy Plot: Displays average detection accuracy over time.
  • Crowd Report Generation: Generates a PDF report with information on max human count, accuracy, and a brief crowd status analysis.

📌 Requirements

  • Python 3
  • tkinter
  • messagebox
  • PIL
  • cv2 (OpenCV)
  • argparse
  • matplotlib
  • numpy
  • time
  • os
  • tensorflow
  • fpdf

🚀 How It Works

  1. Setup: Download the project files and run main.py on your local machine.
  2. Start the Application: On the startup window, choose between START to begin or EXIT to close the application.
  3. Choose Detection Method:
    • Detect from Image: Select an image file, preview it, and click DETECT to start detection.
    • Detect from Video: Select a video file, preview it, and click DETECT to start detection.
    • Detect from Camera: Click OPEN CAMERA to begin real-time detection through your camera.
  4. View Results:
    • Once detection is complete, two plots are displayed:
      • Enumeration Plot: Human Count vs. Time.
      • Avg. Accuracy Plot: Avg. Accuracy vs. Time.
    • Option to generate a Crowd Report as a PDF, which is saved automatically in the project directory.

📌 Purpose

This script helps users to easily detect and count humans in real-time through images, videos, or live camera feeds. It also provides a detailed crowd analysis through a report, making it useful for monitoring environments, events, or areas with human activity.


📌Compilation Steps

  • Install all the required libraries.
  • After that download the code file, and run main.py on local system.
  • Then the script will start running and user can explore it by detecting the human and also getting the count of it.

📌SCREENSHOTS



  • Image:











  • Video:






  • Camera:








📌 Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug fixes, feel free to open an issue or submit a pull request.

About

A TensorFlow-based `Faster RCNN Inception v2` model for detecting and counting humans in real-time using images, videos, and live camera feeds. This project leverages a pre-trained `frozen_inference_graph.pb` for efficient detection and visualization of human counts, providing insights through Enumeration and Accuracy plots.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages