This page is for the SlimYOLOv3: Narrower, Faster and Better for UAV Real-Time Applications
Drones or general Unmanned Aerial Vehicles (UAVs), endowed with computer vision function by on-board cameras and embedded systems, have become popular in a wide range of applications. However, real-time scene parsing through object detection running on a UAV platform is very challenging, due to the limited memory and computing power of embedded devices. To deal with these challenges, in this paper we propose to learn efficient deep object detectors through performing channel pruning on convolutional layers. To this end, we enforce channel-level sparsity of convolutional layers by imposing L1 regularization on channel scaling factors and prune less informative feature channels to obtain βslimβ object detectors. Based on such approach, we present SlimYOLOv3 with fewer trainable parameters and floating point operations (FLOPs) in comparison of original YOLOv3 (Joseph Redmon et al., 2018) as a promising solution for real-time object detection on UAVs. We evaluate SlimYOLOv3 on VisDrone2018-Det benchmark dataset; compelling results are achieved by SlimYOLOv3-SPP3 in comparison of unpruned counterpart, including ~90.8% decrease of FLOPs, ~92.0% decline of parameter size, running ~2 times faster and comparable detection accuracy as YOLOv3. Experimental results with different pruning ratios consistently verify that proposed SlimYOLOv3 with narrower structure are more efficient, faster and better than YOLOv3, and thus are more suitable for real-time object detection on UAVs.
-
pytorch >= 1.0
./darknet/darknet detector train VisDrone2019/drone.data cfg/yolov3-spp3.cfg darknet53.conv.74.weights
python yolov3/train_drone.py --cfg VisDrone2019/yolov3-spp3.cfg --data-cfg VisDrone2019/drone.data -sr --s 0.0001 --alpha 1.0
python yolov3/prune.py --cfg VisDrone2019/yolov3-spp3.cfg --data-cfg VisDrone2019/drone.data --weights yolov3-spp3_sparsity.weights --overall_ratio 0.5 --perlayer_ratio 0.1
./darknet/darknet detector train VisDrone2019/drone.data cfg/prune_0.5.cfg weights/prune_0.5/prune.weights
(1) GoogleDrive yolov3-tiny_final.weights
BaiduDisk yolov3-tiny_final.weights(8hu4)
BaiduDisk yolov3_final.weights(kamf)
BaiduDisk yolov3-spp1_final.weights(9e6z)
BaiduDisk yolov3-spp3_final.weights(5s7s)
BaiduDisk prune_0.5_final.weights(eqgh)
BaiduDisk prune_0.9_final.weights(ysx9)
BaiduDisk prune_0.95_final.weights(1gmn)
(1) prune_0.5_0.5_final.weights
BaiduDisk prune_0.5_0.5_final.weights(7sea)
(1) prune_0.5_0.5_0.7_final.weights
BaiduDisk prune_0.5_0.5_0.7_final.weights(g8ku)
./darknet/darknet detector valid VisDrone2019/drone.data cfg/prune_0.5.cfg backup_prune_0.5/prune_0_final.weights
python3.6 yolov3/test_drone.py --cfg cfg/prune_0.5.cfg --data-cfg VisDrone2019/drone.data --weights backup_prune_0.5/prune_0_final.weights --iou-thres 0.5 --conf-thres 0.1 --nms-thres 0.5 --img-size 608
python yolov3/test_single_image.py --cfg cfg/yolov3-tiny.cfg --weights ../weights/yolov3-tiny.weights --img_size 608
If you find this code useful for your research, please cite our paper:
@article{
author = {Pengyi Zhang, Yunxin Zhong, Xiaoqiong Li},
title = {SlimYOLOv3: Narrower, Faster and Better for Real-Time UAV Applications},
journal = {CoRR},
volume = {abs/1907.11093},
year = {2019},
ee = {https://arxiv.org/abs/1907.11093}
}