Skip to content

jwangjie/deep_sort_yolov3

 
 

Repository files navigation


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:

  1. The FPS of the output tracking videos is exactly the same as the input videos.
  2. A .txt file (tracking_DJI_0006.txt) contains the tracked vehicle locations in the pixel frame is generated.

1. Train the deep association metric model

  1. Clone cosine_metric_learning feature/veri_dataset branch
git clone --branch feature/veri_dataset https://github.com/nwojke/cosine_metric_learning.git
  1. Obtain the VeRi dataset
  2. 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
  1. Monitoring training process
tensorboard --logdir ./output/veri/sine-softmax --port 6006
  1. 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.

2. Track multiple vehicles using deep sort package

  1. 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

  1. Clone this repository
git clone https://github.com/jwangjie/deep_sort_yolov3
  1. Run the multi-vehicle tracking
python tracker.py

About

Multi-vehicle tracking using YOLO v3 and deep_sort with TensorFlow.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%