Source-linked AI summary
Real-time object detection method based on improved YOLOv4-tiny
Zicong Jiang, Liquan Zhao, Shuaiyang Li, Yanfei Jia
TL;DR
The paper addresses real-time object detection under the limited computing and memory resources of mobile and embedded devices. It improves YOLOv4-tiny with simpler residual modules and an auxiliary attention-based network, achieving faster detection than lightweight baselines while retaining nearly the same mAP as YOLOv4-tiny.
Problem
Real-time object detection remains challenging on mobile and embedded devices because YOLO networks can have complex structures, many parameters, and substantial resource requirements.
Method
The method replaces two YOLOv4-tiny CSPBlock modules with ResBlock-D modules and merges an auxiliary network using convolutions, channel attention, spatial attention, and concatenation.
Results
The proposed method has faster detection than YOLOv3-tiny and YOLOv4-tiny, with 38% mAP versus YOLOv4-tiny's 38.1% and 294 FPS versus 270 FPS.
Takeaways & Limitations
The method is reported as more suitable for mobile and embedded devices because it provides faster detection and smaller GPU utilization than the compared lightweight methods.
Abstract
from arXiv · showhide
The "You only look once v4"(YOLOv4) is one type of object detection methods in deep learning. YOLOv4-tiny is proposed based on YOLOv4 to simple the network structure and reduce parameters, which makes it be suitable for developing on the mobile and embedded devices. To improve the real-time of object detection, a fast object detection method is proposed based on YOLOv4-tiny. It firstly uses two ResBlock-D modules in ResNet-D network instead of two CSPBlock modules in Yolov4-tiny, which reduces the computation complexity. Secondly, it designs an auxiliary residual network block to extract more feature information of object to reduce detection error. In the design of auxiliary network, two consecutive 3x3 convolutions are used to obtain 5x5 receptive fields to extract global features, and channel attention and spatial attention are also used to extract more effective information. In the end, it merges the auxiliary network and backbone network to construct the whole network structure of improved YOLOv4-tiny. Simulation results show that the proposed method has faster object detection than YOLOv4-tiny and YOLOv3-tiny, and almost the same mean value of average precision as the YOLOv4-tiny. It is more suitable for real-time object detection.
I. INTRODUCTION
Object detection methods trade accuracy against speed, with one-stage YOLO methods offering faster detection but lightweight deployment remaining challenging on resource-limited devices. Lightweight YOLO variants reduce network complexity and parameters to support mobile and embedded applications.
- Two-stage detectors generally achieve higher accuracy, whereas one-stage detectors provide faster object detection.
- YOLOv3 information fusion does not fully use low-level information, restricting its potential industrial application.YOLO-Inception addresses this weakness with diversified receptive fields for richer semantic information and small-object detection.
- Complex YOLO networks require substantial GPU computing power, memory, and processing capacity for real-time detection on mobile and embedded devices.The stated target settings include autonomous-driving, augmented-reality, smartphone, and embedded-video-surveillance devices.
- Lightweight methods use simpler networks and fewer parameters to lower resource and memory requirements and increase detection speed.Examples include MobileNet, SqueezeNet, ShuffleNet, and lightweight YOLO series methods.
A. NETWORK STRUCTURE
YOLOv4-tiny simplifies YOLOv4 through a smaller backbone, lighter activation and feature-fusion design, and multiscale prediction. Its structure is intended to increase detection speed while retaining practical accuracy.
- A. NETWORK STRUCTURE: YOLOv4-tiny replaces YOLOv4's CSPDarknet53 backbone with CSPDarknet53-tiny to accelerate object detection.The method can reach 371 frames per second on a 1080Ti GPU, with accuracy described as suitable for real applications.
- A. NETWORK STRUCTURE: CSPDarknet53-tiny uses CSPBlock modules that split feature maps into two parts and combine them through cross-stage residual paths.This design allows gradient flow through two network paths and increases feature correlation.
- A. NETWORK STRUCTURE: YOLOv4-tiny uses LeakyReLU instead of YOLOv4's Mish activation to simplify computation.The supplied passage identifies the activation choice but does not provide the complete function definition.
- A. NETWORK STRUCTURE: For feature fusion, YOLOv4-tiny uses a feature pyramid network and 13×13 and 26×26 feature maps for prediction.The described network assumes 416×416 input images and 80 feature classes.
B. PREDICTION PROCESS
YOLOv4-tiny predicts objects on fixed-size grid representations using multiple bounding boxes per grid cell, then filters and evaluates predictions through confidence, classification, and localization losses.
- B. PREDICTION PROCESS: Each input image is resized to a fixed size, divided into an S×S grid, and assigned B bounding boxes per grid cell.This generates S×S×B boxes covering the image; the grid containing an object's center predicts that object.
- B. PREDICTION PROCESS: A confidence threshold removes predicted boxes whose confidence scores do not exceed the threshold.Boxes above the threshold are kept, while lower-scoring boxes are deleted to reduce redundancy.
- B. PREDICTION PROCESS: The overall YOLOv4-tiny loss contains confidence, classification, and bounding-box regression components.The supplied passages identify the three-part composition but do not provide a complete readable combined equation.
- B. PREDICTION PROCESS: The confidence loss uses object and no-object assignments for bounding boxes across image grids.W^obj_ij indicates whether a box is responsible for detecting the current object, while λ_noobj weights no-object terms.
- B. PREDICTION PROCESS: Classification loss compares predicted and ground-truth class probabilities for each bounding box.The supplied notation defines p_i^j(c) and its ground-truth counterpart for class c.
- B. PREDICTION PROCESS: Bounding-box regression loss uses intersection over union and center-distance terms to compare predicted and truth boxes.The passage defines IOU, predicted and truth dimensions, center-point distance, and the enclosing-box diagonal distance.
III. PROPOSED METHOD
The proposed YOLOv4-tiny replaces two CSPBlock modules with lower-complexity ResBlock-D modules and adds an attention-based auxiliary residual network. These changes combine global and local feature extraction while targeting faster detection with limited accuracy impact.
- Backbone modification: ResBlock-D uses two paths: a convolutional path and an average-pooling path, reducing components relative to CSPBlock.Path A contains 1x1, 3x3 stride-2, and 1x1 convolutions; path B contains stride-2 average pooling and 1x1 convolution.
- Accuracy–speed balance: Replacing CSPBlock with ResBlock-D improves detection speed but reduces detection accuracy, motivating an auxiliary residual network for balance.The auxiliary network is added to the ResBlock-D module to improve accuracy.
- Auxiliary residual network: The auxiliary network fuses its residual output with a shallow backbone feature by element-wise summation before the next backbone layer.This converges deep and shallow network information while avoiding a large increase in calculation.
- Auxiliary residual network: Two consecutive 3x3 convolutions provide a larger receptive field, while channel and spatial attention extract more effective features.The design combines global information from the larger receptive field with local information from smaller receptive fields; CBAM implements both attention types.
- Backbone modification: The method replaces two CSPBlock modules in YOLOv4-tiny with ResBlock-D modules to reduce computation complexity.The reported computation complexity rate of CSPBlock to ResBlock-D is about 10:1.
- Complete network: The complete network merges the auxiliary block into the backbone and uses concatenation to combine intermediate feature outputs.The resulting backbone is intended to extract global and local object features for improved detection accuracy.
III. SIMULATION AND DISCUSSIONS
Experiments on MS COCO compare detection accuracy, speed, and GPU utilization across YOLO variants, including CPU and Raspberry Pi tests. The proposed method improves speed and resource use while maintaining nearly the same mAP as YOLOv4-tiny and often producing higher confidence scores.
- Experimental setup: MS COCO experiments use mAP, FPS, and GPU utilization to evaluate detection performance across methods.The tests use consistent training parameters, 416×416 inputs, and batch size 16.
- CPU/GPU comparison: 38% mAP and 294 FPS are reported for the proposed method, versus 38.1% mAP and 270 FPS for YOLOv4-tiny.The proposed method’s relative mAP reduction is 0.26%, while its relative FPS increases by 8.9%.
- Resource use: 1003 MB GPU utilization is reported for the proposed method, compared with 1055 MB for YOLOv4-tiny and 1123 MB for YOLOv3-tiny.The proposed method has the smallest reported GPU utilization among these lightweight methods.
- Qualitative results: Across six MS COCO images, both methods detect the same objects, while the proposed method generally reports higher confidence scores.For 22 detected objects, only five YOLOv4-tiny confidence scores exceed those of the proposed method.
- Embedded-device evaluation: On Raspberry Pi, the proposed method reaches 0.31 FPS, compared with 0.19 FPS for YOLOv4-tiny and 0.18 FPS for YOLOv3-tiny.Its FPS increases by 63% over YOLOv4-tiny and 72% over YOLOv3-tiny in this test.
V. CONCLUSION
The paper improves YOLOv4-tiny by simplifying its backbone and adding an auxiliary feature-extraction network. The resulting method detects objects faster than YOLOv3-tiny and YOLOv4-tiny while maintaining almost the same mean average precision as YOLOv4-tiny.
- Two ResBlock-D modules replace two CSPBlock modules in YOLOv4-tiny to simplify the network and reduce detection time.
- The auxiliary network combines two 3 × 3 convolutions, channel attention, spatial attention, and concatenation to extract global features.
- Merging the auxiliary network with the backbone connects deep and shallow features for global and local object representation without a large calculation increase.
- The proposed method has faster object detection speed than YOLOv3-tiny and YOLOv4-tiny.
- The proposed method achieves almost the same mean average precision as YOLOv4-tiny.