South-Central Minzu University,a. School of Computer Science; b. Hubei Provincial Engineering Research Center for Intelligent Management of Manufacturing Enterprises; c. Hubei Provincial Engineering Research Center of Agricultural Blockchain and Intelligent Management,Wuhan 430074,China
An improved forest fire detection method based on YOLOv8 is proposed to solve the challenge of achieving high real-time performance in forest fire detection. Building upon YOLOv8, the lightweight feature extraction network EfficientNet is utilized to optimize the original YOLOv8 backbone network CSPDarknet53 to diminish computational requirements and accelerate model convergence, thereby accelerating the fire detection speed. Additionally, the SENet attention mechanism module is integrated to bolster the model's accuracy in fire detection. The α-IoU loss function is implemented to supplant the CIoU loss function from YOLOv8's original loss function for calculating positioning loss. This function can adaptively fine-tune the IoU threshold to more effectively handle targets of varying sizes and shapes, while also enhancing the model′s capability to detect small targets. The outcomes demonstrate that the proposed method achieves an average accuracy of 87.2% at mA@0.5P, with a 17-frame increase in the frame rate per second(FPS), significantly enhancing the real-time capabilities of fire detection.
随着科技的迅猛发展,人工智能在各个领域中发挥着愈发重要的作用,特别是在森林火灾检测领域. 森林火灾作为一种破坏性极强的自然灾害,不仅会造成严重的经济损失,还会对生态环境和人类的生命安全构成威胁.因此,如何实现火灾的早期检测和及时预警,成为当前研究的重点方向之一[1-2].在传统的火灾检测方法中,基于图像处理的技术占据主导地位.例如,许多早期研究依赖于火焰的颜色、形状以及烟雾的特征来识别火灾.这些方法的主要优势在于实现简单、计算代价较低,但在实际应用中常受到环境光线、天气状况等外部因素的干扰,导致误检和漏检问题[3].随着深度学习的兴起,学者们逐渐将目光转向更为智能化和自动化的检测技术.深度学习中的卷积神经网络(CNN)为火灾检测提供了新的思路,能够通过训练大量的火灾图像数据来自动提取火焰和烟雾的特征,进而提升检测的准确性[4-5].刘磊等利用CNN构建了一个火焰检测系统,该系统通过学习火焰在不同条件下的形态变化,实现了火灾的较为精准的识别[6].尽管如此,由于CNN的计算复杂度较高,实时性仍然是一个重要的挑战.为了解决火灾检测中的实时性问题,YOLO(You Only Look Once)模型被广泛应用于该领域.YOLO模型作为一种统一的目标检测框架,YOLO通过将目标检测问题简化为一个回归问题,从而大幅提高了检测速度[7-8].在YOLO的多个版本中,YOLOv3在目标检测的准确性和速度之间取得了良好的平衡,因此在许多实时检测任务中得到了应用.然而,YOLOv3在检测较小的火灾目标时表现不佳,这限制了其在森林火灾检测中的应用.为了解决上述问题,研究人员不断对YOLO模型进行改进.邵林等提出了一种基于YOLOv3的改进方法,使用多尺度特征融合技术增强了对小目标的检测能力,并在森林火灾检测中取得了较好的效果[9].与此同时,YOLOv4和YOLOv5的发布进一步提升了目标检测的性能,尤其是在火灾检测的复杂场景中表现更为稳定[10].与YOLOv4相比,YOLOv8的检测精度进一步提升,尤其是在实时目标检测任务中表现突出.这一进步为火灾检测提供了新的研究思路和应用场景[11-12].然而,尽管YOLOv8在许多方面具有优势,如何在保持高准确度的同时进一步提升检测速度,仍然是一个值得深入探讨的问题[13].综上所述,本文基于YOLOv8提出了一种改进的实时目标检测模型,旨在解决火灾检测中实时性与精度之间的平衡问题,通过优化模型结构并结合轻量化技术,改进后的模型不仅稳定了检测速度,还能够更加准确地识别早期火源,为火灾的早期预警提供了更为有效的技术支持.
式中:表示特征图U中的某个通道,表示经过压缩之后的向量 Z,从公式中可以看出,每个尺寸为的特征图通道,经过全局平均之后,就只剩一个像素点.因此,一个的特征图经过squeeze之后,就变成了一个的向量,计作 Z .特征图经过压缩后,第二步就是综合这些通道的特征值.这个综合方法需要满足两个条件:其一要可以表达非线性关系,其二要可以提取处非互斥的关系.因此,提出了一个计算方法,如公式(5)所示:
,
为ReLU,为权重矩阵,为权重矩阵.从上面可以看出,这个Excitation就是两个全联接层:第一个连接层把的向量 Z 变成一个的向量.然后后面跟一个ReLU激活层.第二个连接层把的向量重新恢复为一个的向量.然后后面跟一个Sigmod的激活层.
BOCHKOVSKIYA, WANGC Y, LIAOH Y M. YOLOv4: Optimal speed and accuracy of object detection [J]. arXiv Preprint arxiv: 2020.
[4]
WANGC Y, BOCHKOVSKIYA, LIAOH Y M. Scaled-YOLOv4: Scaling cross stage partial network [C]//IEEE/CVF Conference on Computer Vision and Pattern Recognition. Virtual: IEEE, 2021:13029-13038.
[5]
LIUW, ANGUELOVD, ERHAND, et al. SSD: Single shot MultiBox detector[M]//Lecture Notes in Computer Science. Cham: Springer International Publishing, 2016: 21-37.
[6]
LIUL, OUYANGW, WANGX, et al. Deep learning for generic object detection: A survey[J]. International Journal of Computer Vision, 2020, 128(2): 261-318.
[7]
LIX, CHENC, HUX, YANGJ, ZHANGX. Fire detection in videos using YOLO-based deep learning [J]. Applied Sciences, 2020, 10(5): 1599.
[8]
GARGN, YADAVN. Fire detection in videos using YOLO object detection and optical flow analysis [J]. IEEE Access, 2021, 9: 2560-2571.
[9]
SHAOL, SONGZ, WANGL. Fire detection based on YOLOv3 and deep residual attention network [J]. IEEE Access, 2020, 8: 165190-165201.
[10]
LIW, ZUOW. Fast fire detection in video based on improved YOLOv4 and deep learning [J]. IEEE Access, 2020, 8: 203973-203982.
[11]
CAOJ, LIX, WANGX, YANGJ, ZHANGX. An efficient fire detection method based on YOLOv8 and channel attention mechanism [J]. IEEE Access, 2023, 9: 20788-20796.
[12]
ZHANGX, CAOJ, YANGJ, ZHOUX. Fire detection in videos using improved YOLOv8 and spatial-temporal features [J]. Sensors, 2021, 21(4): 1246.
HUANGZ, LIX, XUY, ZHANGX, CHENC. Fire detection based on deep learning with spatial pyramid pooling [J]. IEEE Access, 2018, 6: 12482-12492.
[17]
HUANGZ, LIX, XUY, ZHANGX. Fire detection in video surveillance using a three-dimensional convolutional neural network [J]. Sensors, 2018, 18(3): 787-789.
[18]
CHENP, HUANGC, LINY. Fire detection using multi-task learning and deep convolutional neural network [J]. Sensors, 2019, 19(19): 4259.
[19]
SHAFIEEM J, YAGHMAEEF. Fire detection using deep learning: A review [J]. Fire Safety Journal, 2019, 107: 27-51.
[20]
GARGN, YADAVN. Early fire detection using YOLO-based object detection and deep belief network [J]. IEEE Access, 2020, 8: 147353-147363.
[21]
RANAS, KUMARA. Real-time fire detection and monitoring system using deep learning [C]// 2020 4th International Conference on Computing Methodologies and Communication (ICCMC). Erode: IEEE, 2020: 207-212.
[22]
LIUX, ZHANGY, WANGH, et al. α-IoU: An adaptive IoU loss function for enhanced object detection accuracy [C]// IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New Orleans: IEEE, 2022: 5123-5131.