According to YOLOv3 and SORT algorithms, counting multi-type vehicles. Implemented by Pytorch.
Detecting and tracking the vehicles in ["bicycle","bus","car","motorbike","truck"].
- yolov3-darknet https://github.com/pjreddie/darknet
- yolov3-pytorch https://github.com/eriklindernoren/PyTorch-YOLOv3
- sort https://github.com/abewley/sort
- ubuntu/windows
- cuda>=10.0
- python>=3.6
pip3 install -r requirements.txt
- Download the pre-trained yolov3 weight file here and put it into
weights
directory; - Run
python3 app.py
; - Select video and double click the image to select area, and then start;
- After detecting and tracking, the result video and file are saved under
results
directory, the line ofresults.txt
with format [videoName,id,objectName] for each vehicle.