Skip to content

A survey report for Traffic Monitroing System. && a simple workflow for traffic volume, vehicle measurement.

License

Notifications You must be signed in to change notification settings

LokiXun/traffic_monitoring_system_survey_and_simple_design

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple Traffic Monitoring System Design 🚅

Author: LokiXun [email protected]

demo_result_clip.gif

  • survey paper

    A Systematic Review of Drone Based Road Traffic Monitoring System 👍

    This survey is really good and introduce most categories of image processing, MOT, Object Detection methods which applied in traffic monitoring system. Maybe a Not Bad material to learn these algorithms with this actual scenario.

    • traditional methods

      [Moving Vehicle Detection for Automatic Traffic Monitoring.pdf](./docs/traffic_monitoring_system_survey/Moving Vehicle Detection for Automatic Traffic Monitoring.pdf)

Usage

src/main.py  # entry

checkpoints

TODO ⏲️

  • realize the fundamental modules

    • passed vehicle counting

      the region needs to be specified beforehand.

    • Scene density

      only count the vehicles bounding boxes number in certain frame (only responsible for 1 frame)

    • velocity measurement

      quite raw, because the pixel-to-reality length scale is approximate from the length of one car's bounding box and we assume the car's long is 5m. Also, the video taken have a vanishing point issue, which means the further scale is smaller than the point near the camera.

      Further, the video tested by us was taken on the gantry, which means the view is fixed and have no shaking view's problem.

  • program workflow

    • save the processed result to the offline video file
    • speed up the whole pipline to make the program run faster and show result in real-time, like split each module and make them running in threads
  • Preprocessing

    • more accurate scale

    • change to BEV view

    • image alignment

    • train a more robust YoloV5 vehicle detection model

      current used model is pretrained on not-UAV dataset and filter the detection result by using 'car', 'motorcycle', 'bus', 'truck' labels , which may be inaccurate. And if the view changes a bit, the detection performance is crushed badly! 💩

      • light the trained model using TensorRT, ONNX or other platforms

Background & Needs:rainbow:

Using an moving status drone to take traffics videos, we would like to extract the vehicles from the video data and calculate each vehicle's instant velocity and detect traffics' volume and vehicles' density, realizing a simple version of the traffic monitoring system.

  • An overall workflow of the program

    traffic_monitoring_system_design.png

Traffic Volume 👨‍🏭

Say in Human's way: (Count vehicles which passed the assigned region in short period)

We assume the drone would hover around or stay at nearly a unchanged position. And we need to specify the a line-shape target region to denote where a car is passed or not.

For the view in video may shake a little, so we need to deploy some image-alignment methods to make the view nearly the same.

Traffic Density

Count vehicles' number in current frame

Velocity Measurement ⚡

Speed estimation of multiple moving objects from a moving UAV platform 👍

measure vehicles' travel distance in a short frame period, current take $FrameNum \in[2,10]$ frames. And Gather the pixel-level distance in history frames (saved in one array for each ID). And we need to acquire these parameters.

  1. pixel's scale (unit=meters/second)

    correspond to what length in reality. We realize this by assume that the car's length is 5 meters and take one detection bounding box's length(pixel number) as reference to get the rough scale. $scale = 5 m/BoundBoxLen$

  2. FPS.

After all the variables, we could use the below equation to calculate the nearly actual velocity.

$$ VelocityActual = \frac{PixelDistance * Pixel2RealityScale}{FrameNum * 1/FPS} $$

Methodology

Preprocessing

Object detection

Code Reference 👷

About

A survey report for Traffic Monitroing System. && a simple workflow for traffic volume, vehicle measurement.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages