GithubHelp home page GithubHelp logo

tlwzzy / vehicle-counting Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nicholaskajoh/ivy

0.0 1.0 0.0 47.26 MB

Video-based vehicle counting system built with OpenCV and a pre-trained YOLO model.

Python 100.00%

vehicle-counting's Introduction

Video-based Vehicle Counting System

My final year project (B.Sc Computer Science).

Abstract

Traffic congestion is a major challenge in many cities around the world, especially cities in developing nations where road networks are poorly designed and cities overpopulated. Collecting quality data about the flow of traffic is crucial in traffic management, as jams can be anticipated and prevented, and vehicles can be intelligently directed to routes with less traffic. This project aims to improve the traffic situation on, and condition of Nigerian roads by implementing a vehicle counting system that provides accurate data for traffic control agencies and systems. The significances of this system include estimating traffic flow on a given road per time, predicting future traffic conditions, understanding traffic patterns and the factors that affect them, and optimizing existing manual traffic management systems. The project was developed using the Python programming language and OpenCV (an open-source library of programming functions mainly aimed at real-time Computer Vision).

Setup

  • Install Python 3 on your machine.
  • Clone this repo [email protected]:nicholaskajoh/Vehicle-Counting.git.
  • Get video footage of a traffic scene (see link to sample video below).
  • Create and/or use a virtual environment.
  • Run pip install -r requirements.txt to install dependencies.
  • Run python 2_Vehicle_Counting.py (alternate implementations in 0_Vehicle_Counting.py and 1_Vehicle_Counting.py).

How it works

The vehicle counting system is made up of three main components: a detector, tracker and counter. The detector identifies vehicles in a given frame of video and returns a list of bounding boxes around the vehicles to the tracker. The tracker uses the bounding boxes to obtain regions of interest (ROIs) and uses them to track the vehicles in subsequent frames. The detector is also used to update tracker objects periodically to ensure that they are still tracking the vehicles correctly. The counter draws a counting lines across the road. When a vehicle crosses the line, the vehicle count is incremented.

Sample video files

Download link: https://drive.google.com/drive/folders/1h8ANowkfm4TXGDg7R5Z6rnosySVc-Ht7?usp=sharing.

vehicle-counting's People

Contributors

nicholaskajoh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.