To verify the effectiveness of the proposed YOLOv11 and CNN fusion model in production line safety monitoring, a dataset covering various safety hazard scenarios was constructed. This dataset contains 12,000 production line scene images, divided into training, validation, and test sets in a 7:1.5:1.5 ratio, with a fixed random seed of 42. It covers various working conditions, including standard lighting, low lighting, partial occlusion, heavy occlusion, motion blur, and complex backgrounds. The confidence threshold for inference was set to 0.5, and the non-maximum suppression (NMS) threshold was set to 0.45. All experiments were repeated three times, and results are reported as mean ± standard deviation. The annotation categories are workers, safety helmets, robotic arms, hazardous areas, tools, and vehicles, using PASCAL Visual Object Classes (VOC) format. The intersection-over-union (IoU) threshold is set to 0.5, and annotation consistency is verified through two-person cross-validation. Input images were uniformly scaled to 640 × 640 and augmented with Mosaic data. Training was performed using the SGD optimizer with an initial learning rate of 0.01, momentum of 0.9, weight decay of 0.0005, and a batch size of 32. The training ran for 200 epochs, and cosine annealing was used to adjust the learning rate.
To thoroughly assess the model's effectiveness, a variety of evaluation metrics were utilized: mean average precision (mAP), frames per second (FPS) to gauge the rate of image frame processing, precision to evaluate the accuracy of positive predictions, recall to measure the model's ability to detect true positives, and area under the curve (AUC) to indicate the area under the receiver operating characteristic (ROC) curve, thereby reflecting the model's overall classification capability. The calculation formulas are shown in Equations (4), (5), (6), (7), (8), (9), (10), (11):
(4)
(5)
(6)
Recall
(7)
(8)
(9)
(10)
(11)
Here, mAP@0.5 indicates the mean average precision at an IoU threshold of 0.5; N is the number of categories; APi is the average precision of the i-th category; and mAP@[0.5:0.95] is the average mAP calculated across IoU thresholds from 0.5 to 0.95. TP, FP, FN, and TN represent the numbers of true positives, false positives, false negatives, and true negatives, respectively. F is the total number of frames processed, T is the total processing time, TPR is the true-positive rate, and FPR is the false-positive rate.
For the YOLOv11 detection component, the loss function is shown in Equation (12):
(12)
Where Lcoord denotes the deviation between the predicted frame and the real frame, Lconf measures the confidence error of the predicted frame, Lclass measures the category prediction error, and λcoord, λconf, and λclass are the weight coefficients used to balance the corresponding losses.
Analysis of the data in Table 1 shows that the proposed method achieves an mAP@0.5 of 0.91 and an mAP@0.5:0.95 of 0.82, representing improvements of 0.04 and 0.04, respectively, compared to YOLOv5. Its F1-score is 0.935, which is also higher than those of the comparison models. The detection speed is 120 FPS, four times that of Faster R-CNN, but slightly lower than YOLOv10 and YOLOv11. The number of parameters is 6.7M, only 1.5M more than YOLOv11, with a 0.03 improvement in mAP@0.5. Compared to EfficientDet, which has a similar computational cost, the accuracy is 0.06 higher, while the number of parameters is 56% lower. The data demonstrate that the introduced multi-scale fusion and attention mechanism effectively enhances small-target detection accuracy, achieving a good balance between speed and accuracy. In summary, our proposed method achieves a balance between detection accuracy and speed. The mAP@0.5 is 0.02 higher than that of the second-best model, the F1-score reaches 0.935, and the 6.7M parameters are sufficient for practical deployment. The multi-scale fusion and attention mechanism enhances the recognition of small and occluded targets in complex scenes. The model balances accuracy and efficiency, making it suitable for real-time scenarios such as industrial safety monitoring. Of note, all comparison models use official pretrained weights, with a uniform input resolution of 640 × 640, NMS threshold of 0.45, and confidence threshold of 0.5.
| Method | mAP@0.5 | mAP@0.5:0.95 | F1-score | FPS | Params (M) |
| YOLOv5 | 0.87 | 0.78 | 0.89 | 130 | 7.1 |
| EfficientDet | 0.85 | 0.73 | 0.88 | 50 | 15.3 |
| RetinaNet | 0.82 | 0.68 | 0.85 | 45 | 37.6 |
| Faster R-CNN | 0.84 | 0.7 | 0.87 | 30 | 45.2 |
| YOLOv10 | 0.89 | 0.77 | 0.88 | 135 | 5.3 |
| YOLOv11 | 0.88 | 0.75 | 0.895 | 140 | 5.2 |
| OURS | 0.91 | 0.82 | 0.935 | 120 | 6.7 |
Table 1: Comprehensive comparison table of model performance. Analysis of the data shows that the proposed method achieves mAP@0.5 of 0.91 and mAP@0.5:0.95 of 0.82, representing improvements of 0.04 and 0.04, respectively, over YOLOv5. Its F1-score is 0.935, which is also higher than those of the comparison models. The detection speed is 120 FPS, four times that of Faster R-CNN, but slightly lower than YOLOv10 and YOLOv11. The number of parameters is 6.7M, only 1.5M more than YOLOv11, with a 0.03 improvement in mAP@0.5. Compared to EfficientDet, which has a similar computational cost, the accuracy is 0.06 higher, while the number of parameters is 56% lower. The data demonstrate that the introduced multi-scale fusion and attention mechanism effectively enhances the accuracy of small-target detection, achieving a good balance between speed and accuracy. In summary, our proposed method achieves a balance between detection accuracy and speed. The mAP@0.5 is 0.02 higher than that of the second-best model, the F1-score reaches 0.935, and the 6.7M parameters are sufficient for practical deployment. The multi-scale fusion and attention mechanism enhances the recognition of small and occluded targets in complex scenes. The model balances accuracy and efficiency, making it suitable for real-time scenarios such as industrial safety monitoring. Of note, all comparison models use official pretrained weights, with a uniform input resolution of 640 × 640, a uniform NMS threshold of 0.45, and a uniform confidence threshold of 0.5.
Figure 2 provides an in-depth analysis of the model's false detection types. YOLOv11 + CNN has the lowest background false-detection rate (85 times/10,000 frames), with most false detections occurring in similar objects (62 times) and partially occluded scenes (48 times). ROC curve analysis indicates that the model's TPR reached 0.9 (AUC = 0.98) at an FPR of 0.1, and the narrowest spacing between curves supports the high reliability of detection confidence. These analysis results not only support the model's performance but also provide a clear technical roadmap for subsequent false-detection optimization, particularly by strengthening its ability to distinguish similar objects.

Figure 2. Error analysis. Analysis of the model's false detection types. YOLOv11 + CNN has the lowest background false detection rate (85 times/10,000 frames), with the majority of false detections concentrated in similar objects (62 times) and partially occluded scenes (48 times). ROC curve analysis indicates that the model's TPR reached 0.9 (AUC = 0.98) at an FPR of 0.1, and the narrowest spacing between curves supports the reliability of the detection confidence. These analysis results not only support the model's performance but also provide a clear technical roadmap for subsequent false-detection optimization, particularly by strengthening its ability to distinguish similar objects. Please click here to view a larger version of this figure.
Figure 3 compares the model's performance on various hardware platforms. YOLOv11 + CNN achieves an ultra-low latency of 18 ms on the Edge tensor processing unit (TPU), with a fluctuation of only ±2 ms, and power consumption is controlled at 15 W. Throughput tests demonstrate that the model achieves a processing speed of 70 FPS on Jetson Xavier edge computing devices, with the 99th percentile latency controlled within 50 ms. These deployment performance indicators enable it to adapt to the deployment needs of various computing platforms in industrial fields. The error analysis further shows that the model can maintain stable performance in resource-constrained environments, demonstrating its engineering applicability.

Figure 3. Deployment performance. Comparison of the model's performance on various hardware platforms. YOLOv11 + CNN achieves an ultra-low latency of 18 ms on the Edge TPU (with a fluctuation of only ±2 ms), and power consumption is controlled at 15 W. Throughput tests demonstrate that the model achieves a processing speed of 70 FPS on Jetson Xavier edge computing devices, with the 99th percentile latency controlled within 50 ms. These deployment performance indicators indicate that it can adapt to the deployment needs of various computing platforms in industrial fields. The error analysis further shows that the model can maintain stable performance in resource-constrained environments, demonstrating its engineering applicability. Please click here to view a larger version of this figure.
Figure 4 compares the detection performance differences of each model across six target categories. YOLOv11 + CNN achieved an accuracy of 0.96 on the safety helmet recognition task, surpassing the benchmark model by 4 percentage points. The dotted plot indicates that the model exhibits minimal performance fluctuations across categories (±0.05), reflecting its generalization capabilities. The confusion matrix, presented as a heat map, reveals a 15% mutual false detection between the hazardous area and the robotic arm. This finding provides a clear direction for subsequent model optimization.

Figure 4. Category detection analysis. Comparison of the detection performance differences of each model across six target categories. YOLOv11 + CNN achieved an accuracy of 0.96 on the safety helmet recognition task, surpassing the benchmark model by 4 percentage points. The dotted plot indicates that the model exhibits minimal performance fluctuations across categories (±0.05), reflecting its generalization capabilities. The confusion matrix, presented as a heat map, reveals a 15% mutual false detection between the hazardous area and the robotic arm. This finding provides a clear direction for subsequent model optimization. Please click here to view a larger version of this figure.
Figure 5 provides a comprehensive record of the training process for each model. YOLOv11 + CNN exhibits the fastest convergence rate, with the loss dropping to 0.1 within 30 epochs, and the gap between its validation-set mAP curve and the training set is consistently less than 1%. The error band plot analysis shows that the model's final validation mAP@0.5 is stable at 0.94 ± 0.01, and its performance fluctuation range is only one-third of that of RetinaNet. These results support the effectiveness of the joint training protocol. The model shows performance advantages in the early stages of training, indicating that its architectural design enables it to learn features quickly.

Figure 5. Analysis of the training process. A record of the training process for each model. YOLOv11 + CNN exhibits the fastest convergence rate (the loss drops to 0.1 within 30 epochs), and the gap between its validation set mAP curve and the training set is always less than 1%. The error band plot analysis shows that the final validation mAP@0.5 of the model is stable at 0.94 ± 0.01, and the performance fluctuation range is only one-third of that of RetinaNet. These results support the effectiveness of the joint training protocol. The model shows performance advantages in the early stages of training, indicating that its architectural design enables it to learn features quickly. Please click here to view a larger version of this figure.
Table 2 presents quantitative performance results for different detection models in complex environments. Test data across standard lighting conditions and various extreme scenarios show that YOLOv11 + CNN maintains optimal performance under all conditions. Under standard lighting conditions, the mAP@0.5 of this model reached 0.91, significantly better than YOLOv5 (0.87) and Faster R-CNN (0.84). With the deterioration of environmental conditions, the performance of each model decreases to varying degrees, but YOLOv11 + CNN shows the strongest environmental robustness: under low light conditions (< 50 lux), the performance only decreases by 3% (to 0.88), which is better than the 5% reduction of the comparative model; in heavily occluded scenarios (> 50%), its mAP can still be maintained at 0.78, and the performance degradation (13%) is significantly smaller than that of YOLOv5 (15%) and Faster R-CNN (16%). These results demonstrate that YOLOv11 + CNN enhances the model's adaptability to complex factors, such as illumination changes and occlusions, through improved feature fusion and attention mechanisms, thereby supporting practical applications in industrial scenarios.
| Test Condition | YOLOv11 + CNN | YOLOv5 | Faster R-CNN | Performance Fluctuation |
| Standard Lighting | 0.91 | 0.87 | 0.84 | 0.01 |
| Low Light (< 50 lux) | 0.88 (-3%) | 0.82 (-5%) | 0.79 (-5%) | 0.02 |
| Partial Occlusion (30%–50%) | 0.85 (-6%) | 0.80 (-7%) | 0.76 (-8%) | 0.03 |
| Heavy Occlusion (> 50%) | 0.78 (-13%) | 0.72 (-15%) | 0.68 (-16%) | 0.04 |
| Motion Blur | 0.83 (-8%) | 0.77 (-10%) | 0.73 (-11%) | 0.05 |
Table 2: Quantitative analysis table of environmental adaptability. Performance of different detection models in complex environments through quantitative analysis. Test data from standard lighting conditions to various extreme scenarios show that YOLOv11 + CNN maintains the highest performance under all test conditions. Under standard lighting conditions, the mAP@0.5 of this model reached 0.91, significantly better than YOLOv5 (0.87) and Faster R-CNN (0.84). With the deterioration of environmental conditions, the performance of each model decreases to varying degrees, but YOLOv11 + CNN shows the strongest environmental robustness among the evaluated models: under low light conditions (< 50 lux), the performance only decreases by 3% (to 0.88), which is better than the 5% reduction of the comparative model; in heavily occluded scenarios (> 50%), its mAP can still be maintained at 0.78, and the performance degradation (13%) is significantly smaller than that of YOLOv5 (15%) and Faster R-CNN (16%). These results demonstrate that YOLOv11 + CNN enhances the model's adaptability to complex factors, such as illumination changes and occlusion interference, through an improved feature fusion mechanism and attention design, supporting practical applications in industrial scenarios.
Table 3 shows that the SGD optimizer was used in this experiment, with a momentum of 0.9 to accelerate convergence and suppress oscillations. An initial learning rate of 0.01 was used with cosine annealing, which gradually decayed during training to refine optimization. A weight decay of 0.0005 was introduced to apply L2 regularization and reduce overfitting. A batch size of 32 balanced computational efficiency with gradient estimation stability. The 200 training epochs ensured sufficient convergence. The parameters were adapted to the single-stage detection task, balancing training speed and accuracy.
| Parameter | Value |
| Optimizer | SGD |
| Initial learning rate | 0.01 |
| Momentum | 0.9 |
| Weight decay | 0.0005 |
| Batch size | 32 |
| Training epochs | 200 |
| Learning rate scheduling | Cosine annealing |
Table 3: Training hyperparameter table. The SGD optimizer was used in this experiment, with a momentum of 0.9 to accelerate convergence and suppress oscillations. An initial learning rate of 0.01 was used with cosine annealing, which gradually decayed during training to refine optimization. A weight decay of 0.0005 was introduced to apply L2 regularization and reduce overfitting. A batch size of 32 balanced computational efficiency with gradient estimation stability. The 200 training epochs ensured sufficient convergence. The parameters were adapted to the single-stage detection task, balancing training speed and accuracy.
Table 4 shows that, using YOLOv11 as the baseline, the mAP@0.5 is 0.89. Introducing multi-scale fusion alone reduces the accuracy to 0.88. Further layering channel attention and spatial attention sequentially improves the accuracy to 0.90 and 0.89, respectively. The combined accuracy of all modules reaches 0.91, an improvement of 0.02 over the baseline. The data show that channel attention directly improves accuracy, and the combined performance of multi-scale and attention is optimal.
| Configuration | mAP@0.5 |
| YOLOv11 (baseline) | 0.89 |
| + Multi-scale fusion | 0.88 |
| + Multi-scale + channel attention | 0.9 |
| + Multi-scale + spatial attention | 0.89 |
| Full module (YOLOv11 + CNN) | 0.91 |
Table 4: Ablation test table. Using YOLOv11 as the baseline, the mAP@0.5 is 0.89. Introducing multi-scale fusion alone reduces the accuracy to 0.88. Adding channel attention or spatial attention after multi-scale fusion improves the accuracy to 0.90 and 0.89, respectively. The combined accuracy of all modules reaches 0.91, an improvement of 0.02 over the baseline. The data show that channel attention yields greater gains than spatial attention in this setting, and that the combined performance of multi-scale fusion and attention is optimal.
Figure 6 systematically evaluates the model's performance in extreme environments. The mAP of YOLOv11 + CNN dropped by only 6% (to 0.88) in low light conditions and still maintained an mAP of 0.78 (8% ahead of the benchmark) in heavily occluded scenes. These results demonstrate that the model exhibits environmental adaptability, effectively addressing common illumination changes and local occlusion issues in industrial production, thereby supporting the stable operation of the detection system.

Figure 6. Environmental adaptability. A systematic evaluation of the model's performance in extreme environments. The mAP of YOLOv11 + CNN dropped by only 6% (to 0.88) in low light conditions, and still maintained an mAP of 0.78 (8% ahead of the benchmark) in heavily occluded scenes. These results demonstrate that the model exhibits environmental adaptability, effectively addressing common illumination changes and local occlusion issues in industrial production, thereby supporting the stable operation of the detection system. Please click here to view a larger version of this figure.
Figure 7 compares the feature distribution differences between YOLOv11 and YOLOv11 + CNN on six types of industrial targets through t-SNE dimensionality reduction. The left figure shows that the features of the basic model YOLOv11 exhibit significant intraclass dispersion (intraclass distance 2.34 ± 0.15), particularly in the "Danger Zone" (red) and "Vehicle" (purple), where there is a significant overlap, which is consistent with the 15% false detection rate in experimental group 3. The figure on the right shows that the improved YOLOv11 + CNN significantly enhances intraclass compactness via the feature enhancement module, increasing the average distance between cluster centers within each category by 1.8 times.

Figure 7. t-SNE Feature Distribution Comparison. A comparison of the feature distribution differences between YOLOv11 and YOLOv11 + CNN on six types of industrial targets through t-SNE dimensionality reduction. The left figure shows that the features of the basic model YOLOv11 exhibit significant intraclass dispersion (intraclass distance 2.34 ± 0.15), particularly in the "Danger Zone" (red) and "Vehicle" (purple) where there is substantial overlap, which is consistent with the 15% false detection rate in experimental group 3. The figure on the right shows that the improved YOLOv11 + CNN significantly improves the intraclass compactness through the feature enhancement module, and the average distance between cluster centers in each category is increased by 1.8 times. Please click here to view a larger version of this figure.
Figure 8 verifies the contribution of each module through systematic ablation experiments. The ablation results show that adding channel attention after multi-scale fusion increases mAP@0.5 to 0.90, while adding spatial attention increases mAP@0.5 to 0.89. The full module achieves the highest mAP@0.5 of 0.91. The heat map visualization shows that the compound attention mechanism can simultaneously enhance the detection response to the center of the hazardous area (activation value: +0.15) and small targets at the edge (+0.08). The experimental data demonstrate that multi-scale feature fusion and attention mechanisms have a cumulative effect, enabling the model to meet the target-detection requirements at different scales.

Figure 8. Modular ablation experiment. Verification of the contribution of each module through systematic ablation experiments. The ablation results show that adding channel attention after multi-scale fusion increases mAP@0.5 to 0.90, while adding spatial attention increases mAP@0.5 to 0.89. The full module achieves the highest mAP@0.5 of 0.91. The heat map visualization shows that the compound attention mechanism can simultaneously enhance the detection response to the center of the hazardous area (activation value: +0.15) and small targets at the edge (+0.08). The experimental data demonstrate that multi-scale feature fusion and attention mechanisms have a cumulative effect, enabling the model to meet the target-detection requirements across different scales. Please click here to view a larger version of this figure.
DATA AVAILABILITY:
Full raw production-line images and video streams are subject to industrial confidentiality restrictions and are not publicly released. A Supplementary Dataset Description (Supplemental File 1) provides dataset acquisition details, category and scenario distributions, annotation specifications, quality-control procedures, data splits, preprocessing, and augmentation procedures. A Pseudocode and Reproducibility Framework (Supplemental File 2) provides a pseudocode-level workflow, configuration descriptions, and guidance for reproduction. An anonymized subset and additional supporting materials may be requested from the corresponding author for non-commercial academic research, subject to institutional and confidentiality restrictions.
Supplemental File 1. Supplementary dataset description. This file describes the dataset acquisition protocol, scenario coverage, class distribution, annotation specifications, quality-control procedures, train/validation/test partitioning, preprocessing, and augmentation procedures. Please click here to download this file.
Supplemental File 2. Pseudocode and reproducibility framework. This file provides pseudocode-level workflow and configuration details for preprocessing, training, evaluation, and deployment, and describes restrictions on raw industrial footage and access to supporting materials. Please click here to download this file.