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.
- update apt-get
sudo apt-get update
- Install apt-get deps
sudo apt-get install openjdk-8-jdk git python-dev python3-dev python-numpy python3-numpy build-essential python-pip python3-pip python-virtualenv swig python-wheel libcurl3-dev curl
- install nvidia drivers
# download drivers
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
# download key to allow installation
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
# install actual package
sudo dpkg -i ./cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
# install cuda
sudo apt-get update
sudo apt-get install cuda-9-0
2a. reboot Ubuntu
sudo reboot
2b. check nvidia driver install
nvidia-smi
# you should see a list of gpus printed
# if not, the previous steps failed.
- Install cudnn
wget https://s3.amazonaws.com/open-source-william-falcon/cudnn-9.0-linux-x64-v7.3.1.20.tgz
sudo tar -xzvf cudnn-9.0-linux-x64-v7.3.1.20.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
- Add these lines to end of ~/.bashrc:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
export CUDA_HOME=/usr/local/cuda
export PATH="$PATH:/usr/local/cuda/bin"
4a. Reload bashrc
source ~/.bashrc
- Install OpenCV How to install OpenCV 3.4.0 on Ubuntu 16.04
-
Install YOLOv3: AlexeyAB/darknet
a. For cuda complie issues: execute this line
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
, beforemake
-
Download pretrained yolo weights, put it inside
darknet
folder -
Run YOLOv3 by
./darknet detector test ./cfg/coco.data ./cfg/yolov3.cfg ./yolov3.weights ./data/horses.jpg
a. if errors such as "The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support". If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script” happens, follow the steps as follows
sudo apt-get install libqt4-dev cd ~/ opencv-3.4.0 mkdir build cd build cmake -D WITH_QT=ON .. make sudo make install
-
Clone this repository
- replace the Makefile in
darknet
folder - add yolov3_dji.cfg in
cfg
folder - add
dji.data, dji.names, test.txt, train.txt
files indata
folder
- replace the Makefile in
-
download our trained weight
Test your video:
./darknet detector demo data/dji.data cfg/yolov3_dji.cfg yolov3_dji_final.weights yourVideo.mp4 -out_filename yourVideo.avi
-
In general, follow How to Train
a. if error
Out of memory
shows, in.cfg-file
, increasesubdivisions = 16, 32 or 64
following this -
Download our dataset, put all files in one folder
dji
, and adddji
indata
folder -
Training:
./darknet detector train data/dji.data cfg/yolov3_dji.cfg darknet53.conv.74
Please kindly cite this paper in your publications if this helps your research:
@article{wang2019orientation,
title={Orientation-and Scale-Invariant Multi-Vehicle Detection and Tracking from Unmanned Aerial Videos},
author={Wang, Jie and Simeonova, Sandra and Shahbazi, Mozhdeh},
journal={Remote Sensing},
volume={11},
number={18},
pages={2155},
year={2019},
publisher={Multidisciplinary Digital Publishing Institute}
}