RC Car detection using Computer Vision and YOLOv11. Blog Post
This was designed around being used with an Nvidia GPU, however it potentially will run (albeit much slower) on the CPU if you use --use-cuda False
.
Also, the tracking logic currently is very taxing, and reduces the processing FPS drastically. Use --no-track
to get an idea of the raw performance of the model.
This software requires the use of ffmpeg
. If you have an Nvidia GPU, make sure you have the nvidia driver, CUDA, and that the version of ffmpeg
you have includes support for nvidia encoding hevc_nvenc
and nvidia decoding hevc_cuvid
.
# Install requirements
pip install -r requirements.txt
# Remove headless opencv and re-install the regular opencv (weird quirk)
pip uninstall -y opencv-python-headless opencv-python
pip install opencv-python~=4.10.0.84
Make sure you have git-lfs
installed, and then run the following to download the sample model and data:
git lfs pull
python vision_cli.py videos/rc_demo.mp4 \
--show-preview \
--preview-size 1280x720 \
--save-video \
--show-plot \
--show-triangle \
--triangle-size 10x10 \
--triangle-thickness 2 \
--show-trace \
--start-time 5 \
--yolo-size 1280x720 \
--out-size 1280x720 \
--vid-stride 1 \
--trail-stabilize \
--trace-length 500 \
--trace-thickness 3
trail_stabilization.mp4
python vision_cli.py videos/rc_demo.mp4 \
--show-preview \
--preview-size 1280x720 \
--save-video \
--show-plot \
--show-triangle \
--triangle-size 10x10 \
--triangle-thickness 2 \
--show-trace \
--start-time 5 \
--yolo-size 1280x720 \
--out-size 1280x720 \
--vid-stride 1 \
--trace-length 500 \
--trace-thickness 3
trail_no_stabilization.mp4
python vision_cli.py videos/rc_demo.mp4 \
--show-preview \
--preview-size 1280x720 \
--save-video \
--show-plot \
--show-box \
--show-label \
--start-time 5
basic_ids.mp4
python vision_cli.py videos/rc_demo.mp4 \
--show-preview \
--preview-size 1280x720 \
--save-video \
--show-plot \
--show-box \
--show-label \
--start-time 5 \
--no-track \
--conf 0.4