All Projects → kraten → Vehicle Speed Check

kraten / Vehicle Speed Check

Vehicle Speed Check

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Vehicle Speed Check

Facemoji
😆 A voice chatbot that can imitate your expression. OpenCV+Dlib+Live2D+Moments Recorder+Turing Robot+Iflytek IAT+Iflytek TTS
Stars: ✭ 320 (+111.92%)
Mutual labels:  opencv, dlib
Anonymize Video
Replace faces in a video with imaginary persons generated by a progressive GAN deep neural network
Stars: ✭ 15 (-90.07%)
Mutual labels:  opencv, dlib
Libfaceid
libfaceid is a research framework for prototyping of face recognition solutions. It seamlessly integrates multiple detection, recognition and liveness models w/ speech synthesis and speech recognition.
Stars: ✭ 354 (+134.44%)
Mutual labels:  opencv, dlib
Thug Memes
Command line Thug Meme generator written in Python
Stars: ✭ 224 (+48.34%)
Mutual labels:  opencv, dlib
Faceai
一款入门级的人脸、视频、文字检测以及识别的项目.
Stars: ✭ 9,207 (+5997.35%)
Mutual labels:  opencv, dlib
Add Christmas Hat
Add Christmas hat on one's head based on OpneCV and Dlib
Stars: ✭ 251 (+66.23%)
Mutual labels:  opencv, dlib
Faceswap
Real-time FaceSwap application built with OpenCV and dlib
Stars: ✭ 611 (+304.64%)
Mutual labels:  opencv, dlib
Head Pose Estimation
Real-time head pose estimation built with OpenCV and dlib
Stars: ✭ 467 (+209.27%)
Mutual labels:  opencv, dlib
Facer
Simple (🤞) face averaging (🙂) in Python (🐍)
Stars: ✭ 49 (-67.55%)
Mutual labels:  opencv, dlib
Android Hpe
Android native application to perform head pose estimation using images coming from the front camera.
Stars: ✭ 46 (-69.54%)
Mutual labels:  opencv, dlib
Face recognition py
基于OpenCV的视频人脸识别
Stars: ✭ 215 (+42.38%)
Mutual labels:  opencv, dlib
Face Swap Android
Realtime Face Swap Android NDK app full source code. Developed with OpenCV (http://opencv.org) and Dlib C++ (http://dlib.net).
Stars: ✭ 111 (-26.49%)
Mutual labels:  opencv, dlib
Attendance Using Face
Face-recognition using Siamese network
Stars: ✭ 174 (+15.23%)
Mutual labels:  opencv, dlib
Face Landmark Android
Android AR Camera
Stars: ✭ 320 (+111.92%)
Mutual labels:  opencv, dlib
Proctoring Ai
Creating a software for automatic monitoring in online proctoring
Stars: ✭ 155 (+2.65%)
Mutual labels:  opencv, dlib
Predict Facial Attractiveness
Using OpenCV and Dlib to predict facial attractiveness.
Stars: ✭ 41 (-72.85%)
Mutual labels:  opencv, dlib
Awesome Face Detection
Compare with various detectors - s3fd, dlib, ocv, ocv-dnn, mtcnn-pytorch, face_recognition
Stars: ✭ 106 (-29.8%)
Mutual labels:  opencv, dlib
Deepway
This project is an aid to the blind. Till date there has been no technological advancement in the way the blind navigate. So I have used deep learning particularly convolutional neural networks so that they can navigate through the streets.
Stars: ✭ 118 (-21.85%)
Mutual labels:  opencv, dlib
Bgslibrary
A C++ Background Subtraction Library with wrappers for Python, MATLAB, Java and GUI on QT
Stars: ✭ 1,838 (+1117.22%)
Mutual labels:  opencv
Scene Text Recognition
Scene text detection and recognition based on Extremal Region(ER)
Stars: ✭ 146 (-3.31%)
Mutual labels:  opencv

Vehicle Speed Detection

output.gif

Technologies used :

  • Python
  • opencv
  • dlib

Tasks breakdown

  1. Vehicle Detection
    • We are using Haarcascade classifier to identify vehicles.
  2. Vehicle Tracking - ( assigning IDs to vehicles )
    • We have used corelation tracker from dlib library.
  3. Speed Calculation
    • We are calculating the distance moved by the tracked vehicle in a second, in terms of pixels, so we need pixel per meter to calculate the distance travelled in meters.
    • With distance travelled per second in meters, we will get the speed of the vehicle.

How to run project?

Follow steps:

  1. Clone repo : git clone https://github.com/kraten/vehicle-speed-check

  2. cd (change directory) into vehicle-speed-check cd vehicle-speed-check

  3. Create virtual environment python -m venv venv

  4. Activate virtual environment ./venv/bin/activate

  5. Install requirements pip install -r requirements.txt

  6. run speed_check.py script python speed_check.py

Note:

A lot of you were raising the same issue about code understanding. I know that I haven't properly commented out the code. So, here is the brief summary of what the code does and how-

We have estimated these values manually for the current road to calculate pixels per metre(ppm). Therefore, the value will vary from road to road and have to be adjusted to be used on any other video.

If I talk about the part how we estimated ppm, we need to know the actual width in metres of the road(you can use google to find the approximate width of the road in your country). Also, we have taken the video frame and calculated the width of the road in pixels digitally. Now, we have the width of the road in metres from the real world and in pixels from our video frame. To map the distances between these two worlds, we have calculated pixels per metre by dividing distance of road in pixels to metres.

d_pixels gives the pixel distance travelled by the vehicle in one frame of our video processing. To estimate speed in any standard unit first, we need to convert d_pixels to d_metres.

Now, we can calculate the speed(speed = d_meters * fps * 3.6). d_meters is the distance travelled in one frame. We have already calculated the average fps during video processing. So, to get the speed in m/s, just (d_metres * fps) will do. We have multiplied that estimated speed with 3.6 to convert it into km/hr.

Pull requests are welcome

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].