A complete implementation of paper Orientation- and Scale-Invariant Multi-Vehicle Detection and Tracking from Unmanned Aerial Videos is
1. Fine-tune the vehicle detector with the dataset UAV-Vehicle-Detection-Dataset.
2. Step by step fine-tuning the vehicle detector Fine-tune-YOLOv3.
3. A multi-vehicle tracking is conducted by deep_sort_yolov3.
This is a customized tracker implementation of paper Orientation- and Scale-Invariant Multi-Vehicle Detection and Tracking from Unmanned Aerial Videos. The tracker is modified based on cosine_metric_learning and deep_sort_yolov3.
For multi-vehicle detection, refer to UAV-Vehicle-Detection-Dataset.
Key features added compared to deep_sort_yolov3:
- The
FPS
of the output tracking videos is exactly the same as the input videos. - A
.txt
file (tracking_DJI_0006.txt) contains the tracked vehicle locations in the pixel frame is generated.
- Clone cosine_metric_learning
feature/veri_dataset
branch
git clone --branch feature/veri_dataset https://github.com/nwojke/cosine_metric_learning.git
- Obtain the VeRi dataset
- Training on Veri dataset
python3 train_veri.py --dataset_dir=./VeRi_with_plate --loss_mode=cosine-softmax --log_dir=./output/veri/ --run_id=cosine-softmax
- Monitoring training process
tensorboard --logdir ./output/veri/sine-softmax --port 6006
- Obtain the trained weights
python3 train_veri.py --mode=freeze --restore_path=output/veri/cosine-softmax/model.ckpt-334551
This will create a veri.pb
file which can be supplied to Deep SORT. Again, the Market1501 script contains a similar function.
- Download
yolov3_dji_final.weights
from UAV-Vehicle-Detection-Dataset. Convert the yolo weight to a keras model by
python3 convert.py yolov3_dji.cfg yolov3_dji_final.weights model_data/yolo_dji.h5
OR, download my converted one at yolo_dji.h5
- Clone this repository
git clone https://github.com/jwangjie/deep_sort_yolov3
- Run the multi-vehicle tracking
python tracker.py