edge-ai4cv / yolov5-multi-video-inference

A simple YOLOv5 demonstration that inferencing multiple video files or IP cameras concurrently. Detection results are saved to video files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yolov5 multiple video inference

Features

  • Multi-threading yolov5 inference with multiple video files or IP cameras.
  • Display all the detection results within one window when inferencing.
  • Save detection results to video files.
  • Compatible with x86_64 and Nvidia Jeston platforms.

Prerequisites

How to build and run

  1. Generate yolov5 engine file as described in wang-xinyu/tensorrt/yolov5

  2. Build "yolov5-multi-video"

git clone https://github.com/edge-ai4cv/yolov5-multi-video.git
cd yolov5-multi-video
mkdir build
cd build
cmake ..
make
  1. Run "yolov5-multi-video"
// for multiple video files. results are saved as AVI format video files
./yolov5-multi-video -f [engine] [video1] [video1] [....]

// for multile IP cameras. results are saved as AVI format video files
./yolov5-multi-video -c [engine] [rtsp://cam1] [rtsp://cam2] [....]

// ------------- below functionalites are reserved from original Git for convenience---------------------
// for batched images in [image folder]. results are saved as JPG image files. 
sudo ./yolov5-multi-video -d [engine] [image folder]  

// for serialize model to engine file. 
./yolov5-multi-video -s [.wts] [.engine] [s/m/l/x or c gd gw]  
  1. To interrup program, press "Esc" and you can then access the saved video files.

Acknowledgments

About

A simple YOLOv5 demonstration that inferencing multiple video files or IP cameras concurrently. Detection results are saved to video files.

License:Other


Languages

Language:C++ 82.3%Language:Cuda 15.8%Language:CMake 1.9%