Skip to content

mahdi-marjani/object-tracking-entry-exit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

People Entry/Exit Counter

Simple real-time counter that tracks how many people enter or exit a scene using YOLOv8.

Great for monitoring doors, hallways, stores, or any fixed camera view.

object_counting_output.mp4

Quick Start

git clone https://github.com/mahdi-marjani/mahdi-marjani-object-tracking-entry-exit.git
cd mahdi-marjani-object-tracking-entry-exit
pip install -r requirements.txt
python main.py

What you get

  • Live view with tracking and counting line
  • Counts people crossing the line (in/out separately)
  • Saves result video → ./videos/object_counting_output.mp4
  • Logs every event with timestamp → report.txt

Example log:

1 person entered 2025-12-28 14:30:15
2 person exited 2025-12-28 14:32:40

Customize

  • Replace ./videos/people.mp4 with your own video or webcam (0)
  • Move line_points in main.py to set the counting line
  • Change classes_to_count to track other objects (e.g. cars = [2])

enjoy! 🚀

About

Real-time people entry/exit counter using YOLOv8

Topics

Resources

Stars

7 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages