3.1. Overall Framework
In this study, the YOLOv10n implementation provided by Ultralytics was adopted as the baseline model [
28]. YOLOv10n is the nano variant of the YOLOv10 series and is commonly used as a representative real-time object detector due to its favorable inference speed and computational efficiency. To reduce model complexity while maintaining smoke detection performance, this study improves YOLOv10n from three aspects: backbone feature extraction, detection head design, and bounding-box regression supervision. These modifications aim to enhance the representation and localization of key smoke features while reducing the number of parameters and computational cost.
Specifically, RepViTBlock is introduced into the backbone because smoke regions in UAV-view images often contain weak texture and blurred boundaries, requiring more effective feature refinement under a lightweight structure. The lightweight efficient detection head, LECD, is designed because the detection head of YOLOv10n still accounts for a considerable proportion of parameters and computations, and reducing redundancy in this part can directly improve model efficiency. In addition, MPDIoU is adopted during training because corner-point distance constraints can provide additional geometric supervision for annotation-based smoke bounding-box regression, especially when smoke regions have irregular shapes and ambiguous visual boundaries. These improvements are integrated into a lightweight smoke detection framework named LRM-YOLO.
LRM-YOLO follows the Backbone–Neck–Head architecture of YOLOv10n. The Neck retains the Spatial Pyramid Pooling-Fast (SPPF) and Partial Self-Attention (PSA) modules of the baseline, while the main modifications are applied to the Backbone, Head, and training loss. Therefore, we propose the LRM-YOLO detection framework, whose overall network architecture is shown in
Figure 1.
Although YOLOv10n possesses good real-time detection capabilities, it still suffers from insufficient representation of weak-feature smoke when applied to forest fire smoke detection tasks. A RepViTBlock is introduced into the Backbone to enhance the representation of smoke with blurred boundaries, small-scale details, and weak features; the Head employs our newly designed efficient detection head, LECD, to reduce the number of parameters and computational overhead while maintaining detection efficiency. Furthermore, during training, the MPDIoU loss function is adopted in place of the traditional regression loss to enhance the localization capability for targets with blurred boundaries and irregular shapes.
3.2. RepViTBlock Module
RepViTBlock follows the design philosophy of RepViT, which separates token mixing and channel mixing in a MetaFormer-style manner. Specifically, spatial information interaction is mainly performed by the depthwise convolution-based token mixer, while inter-channel transformation is conducted by the pointwise-convolution-based channel mixer. In addition, structural re-parameterization is introduced into the token mixer during training to improve representation learning, and the multi-branch structure can be fused into a single-path structure during inference to reduce structural redundancy [
29]. As shown in
Figure 2, four C2f stages in the YOLOv10n backbone are replaced with RepViTBlock modules, while the original downsampling layers are retained to improve feature representation efficiency under lightweight constraints.
In the YOLOv10n configuration, RepViTBlock modules are introduced at four backbone stages, corresponding to layers 2, 4, 6, and 8. Under the nano-scale depth and width coefficients, these stages operate on feature maps at P2/4, P3/8, P4/16, and P5/32, with channel dimensions of 32, 64, 128, and 256, respectively. The corresponding effective repetition numbers are 1, 2, 2, and 1. Each RepViTBlock uses a stride of and preserves both the spatial resolution and channel dimension, while its hidden channel dimension is set to twice the input channel dimension. The original Conv and SCDown layers are retained between stages to perform spatial downsampling.
Based on this design, RepViTBlock separates spatial feature modeling from channel feature transformation. For an input feature map
, the corresponding output feature map
has the same dimensions because the input and output channel dimensions are identical and no downsampling is performed inside the block. Its overall forward process can be formulated as
where
and
denote the token mixer and channel mixer, respectively, while
and
represent the input and output feature maps. In this design, the token mixer is responsible for spatial information interaction, whereas the channel mixer performs inter-channel transformation and feature refinement.
When the stride is
, RepViTBlock is mainly used for feature enhancement while preserving the spatial resolution. The token mixer adopts a RepVGGDW-based structure, which can be expressed as:
where
and
denote depthwise convolutions, and
denotes the optional channel attention operation. In the implemented configuration, the token mixer contains a
depthwise convolution–batch-normalization branch, a
depthwise convolution–batch-normalization branch, an identity branch. The channel mixer then refines the features through pointwise transformation and residual connection:
where
and
denote pointwise convolutions, and
denotes the GELU activation function. The first
pointwise convolution expands the channel dimension from
C to
, and the second projects it from
back to
C. Both pointwise convolutions are followed by batch normalization. Since the channel mixer preserves the feature-map dimensions after projection, its output is added to
through a residual connection.
The depthwise convolution captures local spatial patterns within each channel, helping preserve the weak texture and diffuse boundary information of smoke, while the depthwise and identity branches retain complementary and original features during training. The subsequent SE operation adaptively emphasizes channels containing informative smoke responses and suppresses less relevant background information. Moreover, applying RepViTBlock at the P2/4, P3/8, P4/16, and P5/32 backbone stages enables feature refinement at different spatial resolutions, supporting the representation of nearby large-scale smoke and distant small-scale smoke. After training, the parallel branches in RepVGGDW can be fused into an equivalent single depthwise convolution, thereby simplifying the inference structure without changing its equivalent output.
3.3. Lightweight Efficient Convolutional Detection Head (LECD)
The detection head is a critical component of object detection networks, as it is directly responsible for object classification and bounding-box regression. Its structural design has an important influence on the model’s ability to predict object categories, locations, and scale variations. To address parameter redundancy and insufficient computational efficiency in the baseline detection head [
30], this study draws inspiration from the Mobile Inverted Bottleneck Convolution (MBConv) architecture in EfficientNet [
31] and designs a lightweight and efficient detection head, termed LECD. The structure of the P3 detection head is illustrated in
Figure 3. The LECD design is applied independently to the P3/8, P4/16, and P5/32 detection feature maps. At each scale, the bounding-box regression branch contains two consecutive MBConv blocks followed by a
prediction convolution, whereas the original lightweight classification branch is retained. In the proposed design, the regression branch is redesigned using MBConv-based modules, while the original lightweight classification branch is retained. This strategy avoids unnecessary modification of the entire prediction path and allows the optimization to focus more directly on the regression process, which is particularly important for smoke target localization.
In the implemented MBConv block, the expansion ratio is set to 1. Therefore, the optional channel-expansion convolution is omitted. The input feature is directly processed by a depthwise convolution with a stride of 1, followed by batch normalization and ReLU6 activation. The batch-normalization momentum and epsilon are set to 0.01 and , respectively. A projection convolution followed by batch normalization is subsequently used to generate the output feature, without an additional activation after the projection layer.
Building on this structure, the Squeeze-and-Excitation module in the conventional MBConv design is replaced with the Convolutional Block Attention Module (CBAM) [
32]. CBAM is enabled after the
depthwise convolution and before the
projection convolution in both MBConv blocks of each regression branch. It therefore operates on the multiscale semantic feature maps generated by the backbone and neck rather than directly on the input image.
The improved MBConv architecture is shown in
Figure 4. In our experiments, this design improves the regression branch of the YOLOv10n baseline while reducing both the complexity and computational overhead of the detection head.
The channel-attention component of CBAM uses separate global-average-pooling and global-max-pooling branches with a channel reduction ratio of 16. Each branch contains a convolution for channel reduction, a ReLU activation, another convolution for channel restoration, and a sigmoid function. The two resulting channel-attention maps are added and multiplied by the input feature map. The spatial-attention component subsequently concatenates the channel-wise average and maximum feature maps and applies a convolution followed by a sigmoid function to generate spatial attention weights. In this manner, channel-response recalibration is combined with spatial feature enhancement in the bounding-box regression branch. Residual connection is applied only when the stride is 1 and the input and output channel dimensions are identical, thereby preserving the original feature information and facilitating feature propagation.
3.4. MPDIoU Loss Function
In forest fire smoke detection, this paper introduces the MPDIoU [
33] loss function in the bounding-box regression stage to replace the Complete Intersection over Union (CIoU) regression loss used in the baseline model. Building upon the overlap-area constraint, MPDIoU further incorporates distance information between the keypoints of the predicted bounding box and the ground-truth bounding box. This allows it to explicitly describe the geometric deviation between the predicted box and the annotated box, thereby improving bounding-box regression accuracy under the adopted rectangular annotation protocol. It should be noted that this process aims to improve annotation-based localization rather than recover the exact physical boundary of smoke. MPDIoU extends IoU by introducing distance constraints between the corresponding points at the top-left and bottom-right corners of the predicted and ground-truth bounding boxes, defined as:
where
and
represent the Euclidean distances between the corresponding corner points of the two boxes. Specifically,
and
denote the coordinates of the top-left and bottom-right corners of the predicted box, respectively, while
and
denote the coordinates of the top-left and bottom-right corners of the ground-truth bounding box, respectively. The MPDIoU loss function is illustrated in
Figure 5.
In this study, the ground-truth bounding box is used as the regression target to supervise bounding-box prediction during training. Specifically, for each input image, the detection head predicts a bounding-box, and the MPDIoU loss is computed between the two bounding boxes to quantify their geometric discrepancy. This loss is then backpropagated through the network, and the model parameters are updated by gradient-based optimization, so that the predicted box is gradually guided toward the annotated smoke region. Since a rectangular bounding box can be represented by its top-left and bottom-right corner points, MPDIoU uses the distances between corresponding corner points to describe the overall deviation between the predicted and annotated boxes. Therefore, in our work, MPDIoU improves the accuracy of annotation-based bounding box regression rather than recovering the exact physical boundary of diffuse smoke.
Based on this annotation-based regression mechanism, MPDIoU enhances the localization accuracy of predicted bounding boxes. This is useful for diffuse smoke detection, where the annotated box provides an approximate but practical representation of the visually distinguishable smoke region. Under this annotation protocol, MPDIoU serves as an regression constraint for improving box localization quality, while introducing almost no additional computational cost [
33].