/yolov5_monocular_camera_ranging

This repository is a project of monocular camera ranging, which object detection frame is yolov5.

Primary LanguagePython

yolov5_monocular_camera_ranging

This repository is a project of monocular camera ranging, which object detection frame is yolov5. This project deal with real-time video. It just shows you a video directly which contains the type of object, the confidence of object and the distance from network camera to object.
result picture

yolov5

I just use the pretrained model of yolov5 directly.The detail of yolov5 is available here YOLOv5 🚀 Vision AI ⭐
The referenced project version is v5.0.The version of project does'nt matter.

quick start examples

install

python>=3.6 and pytorch>= 1.7:
$ git clone https://github.com/xiaol-arch/yolov5_monocular_camera_ranging
$ cd yolov5_monocular_camera_ranging
$ pip install -r requirements.txt

inference

Runing following instruction, you can get a resultant video.
This instruction is for video
$ python video.py
This instruction is for webcam
$ python distance.py
This intruction is for webcam which can track stuff
$ python track.py

to do

  • Modify issues of accuracy of ranging in program
  • Improve the README documentation
  • Add speed measurement to the program