In this repo, we include the submission to AICity Challenge 2021 Vehicle Counts by Class at Multiple Intersections.
Our implementation comprised of:
(1) we re-designed a detection-tracking-counting (DTC) for movement-specific vehicle counting problem regard to both effectiveness and efficiency.
(2) We modified Deep SORT with the efficient features to improve the multiple objects tracking performance.
(3) We proposed the cosine similarity-based and orbit-based nearest neighbor analysis to improve the vehicle counting performance.
-
Download images-set and lables : link
-
Unzip data, then move all to 'AIC21-track1-team19/ScaledYOLOv4-yolov4-csp/data/'.
cd mish-cuda-master python setup.py build install
pip install -r requirements.txt
-
Download weights : link
-
Unzip weights, then move all to 'AIC21-track1-team19/ScaledYOLOv4-yolov4-csp/'.
python train.py --device 0 --batch-size 8 --data ./data/data.yaml --cfg yolov4-csp-3-0.25.cfg --name yolov4-csp-3-0.25 --hyp ./data/hyp.finetune.yaml --img-size 512 512 --weight yolov4-csp.weights --epoch 300
python train.py --device 0 --batch-size 8 --data ./data/data.yaml --cfg yolov4-csp-3-0.25.cfg --weights 'runs/exp0_yolov4-csp-3-0.25/weights/last.pt' --name yolov4-csp-3-0.25 --resume
python -m torch.distributed.launch --nproc_per_node 4 train.py --device 0,1,2,3 --batch-size 64 --data ./data/data.yaml --cfg yolov4-csp-3-0.25.cfg --weights yolov4-csp.weights --name yolov4-csp-3-0.25 --sync-bn
Directory structure:
- Dataset_A (link)
- ScaledYOLOv4-yolov4-csp
- mish-cuda-master
- source_code
- weights
- Go to 'AIC21-track1-team19/weigths'
- Download weights: link
- Go to 'AIC21-track1-team19/source_code/'
- Run code
python run_0304.py
- Output file is in ./submission_output/submission.txt