Skip to content

Estimating distance to the nearest vehicle from the car dashboard camera

Notifications You must be signed in to change notification settings

monjurulkarim/vehicle_distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Measuring the distance to the nearest vehicle

For developing advanced driving assistance systems (ADAS) it is required to detect the distance to the nearest vehicle from the user vehicle using the vehicle mounted camera. This repository contains the code for estimating the distance to the nearest vehicle using the principle of similar triangles. For detecting objects Yolo v3 has been used.

ezgif com-gif-maker (3)

For object detection Yolo v3 has been used. The code for Yolo V3 has been taken from https://github.com/qqwweee/keras-yolo3. Then detection file has been modified to get the nearest vehicle and to get the perspective distance to that vehicle using the principle of similar triangles. The algorithm for distance estimation can be found in section 2.3 of this paper.

Getting Started

  • Install the required dependencies: (for reference see https://github.com/qqwweee/keras-yolo3 )
  • download the pre-trained weight from: download and put it inside model_data directory.
  • yolo.py : this file is for the detecting objects. Function detect_image has been modified to calculate the distance to the nearest car.
  • yolo_video.py: call this code to run the inference

How to run the detection code

On your terminal at the same directory type the following:

python yolo_video.py --image

Citation

If you use this repository, please cite the following paper:

@article{karim2021system,
  title={A system of vision sensor based deep neural networks for complex driving scene analysis in support of crash risk assessment and prevention},
  author={Karim, Muhammad Monjurul and Li, Yu and Qin, Ruwen and Yin, Zhaozheng},
  journal={arXiv preprint arXiv:2106.10319},
  year={2021}
}

About

Estimating distance to the nearest vehicle from the car dashboard camera

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages