YOLOv12-ECDR: A Compact YOLO-Based Detector for Flame and Smoke Detection in Forest Fire Images
Abstract
Forest fire detection in natural outdoor images remains challenging because flame and smoke often appear with blurred boundaries, small scales, and background interference. This paper proposes YOLOv12-ECDR, a parameter-efficient detector based on YOLOv12n for flame and smoke detection. The model integrates ECAAttention and RFCAConv in the backbone to enhance channel and spatial representation, and uses DWConv together with C2f/C3-related adjustments to improve feature reuse and multi-scale fusion. Experiments used two fire–smoke image collections: a public Roboflow Forest Fire dataset with 1,397 training images and 399 validation images, and an author-assembled web-sourced collection with 3,503 training images and 1,001 validation images. YOLOv12n and YOLOv12-ECDR were trained with three random seeds on both collections. On Dataset 1, YOLOv12-ECDR improved the three-seed mean Precision, mAP0.50, and mAP0.50:0.95 by 2.8, 1.1, and 1.7 percentage points, respectively, although mean Recall decreased by 1.9 percentage points. On Dataset 2, it improved Precision, Recall, mAP0.50, and mAP0.50:0.95 by 1.7, 0.3, 0.9, and 0.9 percentage points, respectively. Compared with YOLOv12n, YOLOv12-ECDR reduces the parameter count by approximately 11.1%, but its GFLOPs increase from 6.3 to 7.1. On an RTX 4090 D, YOLOv12-ECDR required 6.49–6.56 ms per image for FP32 model forward at batch size 1 and $640\times 640$ resolution. The results support moderate gains in the reported accuracy metrics and a smaller parameter count under the evaluated settings.