A Visual Detection and Multi-Zone Personnel Safety Control Method for Firework Manufacturing Workshops
Abstract
1. Introduction
- GAM is integrated into the YOLO26 Spatial Pyramid Pooling-Fast (SPPF) node to improve small-target personnel detection under dusty, occluded, overhead-view workshop conditions.
- A cross-camera ReID-based collaborative counting strategy is developed to maintain global identity consistency across multiple workshops and support reliable local and global personnel-count judgment.
- An IEF is introduced to match irregular workshop boundaries and reduce spatial false alarms in safe transit corridors.
2. Preliminary
2.1. In-Situ Industrial Data
2.2. Selection of Object Detection Model
3. Methods
3.1. YOLO26-GAM Visual Detection
- Global Refinement of Deep Semantics: It refines the P5 layer features where semantic information is most abstract but spatial resolution is lowest, distilling worker-related signatures from cluttered industrial backgrounds.
- Enhanced Feature Fusion Foundation: It ensures that the Neck receives more discriminative and spatially aware representations, which improves the subsequent “one-to-one” label assignment process in the NMS-free head and increases the detection recall of small targets in high-altitude views.
3.2. ReID-Assisted Multi-Zone Personnel Safety Control
3.2.1. Mathematical Model for the Site-Specific “10/2” Personnel-Count Constraint
- Local Capacity Constraint: To prevent excessive personnel density in high-risk zones, the personnel count of any individual workshop i is bounded by:where . Any state where triggers an immediate Level-1 localized alarm.
- Global Aggregate Constraint: To limit the total number of personnel simultaneously present across the monitored workshops, the global personnel count is constrained by:where is the set of ReID identities identified in workshop , and . The operator ∪ represents a non-redundant union achieved through cross-camera identity fusion.
3.2.2. Cross-Camera Identity Association via Person Re-Identification
- –
- Identity Match: If , the system recognizes the target as an existing identity moving between camera views.
- –
- New Entry: If , the target is classified as a new personnel entry. The feature is appended to , and is incremented by 1.
3.3. Polygon-Based Irregular Electronic Fence
4. Experiments
4.1. Experimental Setup
4.1.1. Training Protocols
4.1.2. Evaluation Metrics
4.2. Benchmarking of Edge Detection Models
4.2.1. Accuracy and Localization Analysis
4.2.2. Real-Time Responsiveness and Edge Feasibility
4.3. Attention Mechanism Analysis for Industrial Visual Features
Repeated-Run Statistical Analysis
4.4. ReID-Assisted Multi-Zone Safety-Control Analysis
4.4.1. Multi-Zone Personnel Counting Accuracy
4.4.2. Alarm Logic and Response Analysis
4.5. Spatial Filtering Analysis of the Irregular Electronic Fence
- Left panel (standard YOLO26 without fence): The system shows over-detection. Personnel transiting through the non-production corridor are detected and incorrectly factored into the site-specific personnel-count logic. This leads to a false breach of the single-workshop safety threshold (), triggering an erroneous emergency alert.
- Right panel (proposed YOLO26 with IEF): By using a polygon ROI that conforms to the workshop’s hazardous boundary, the system achieves accurate spatial localization. Although personnel remain visible in the adjacent corridor, the centroid validation logic recognizes that their coordinates reside outside the defined hazard area A, and they are therefore filtered from the counting queue.
4.6. Ablation Study
4.7. Field Deployment in an Electronic Industrial Safety-Control System
- Hardware Configuration: The setup integrates high-speed industrial cameras positioned at high-altitude workstations and a Programmable Logic Controller (PLC) featuring dual-termination modes, including manual emergency override and relay-based automated shutdown mechanisms.
- Software Architecture: As illustrated in Figure 15, the platform incorporates three core functionalities: real-time multi-workshop video monitoring, detection visualization with hierarchical personnel-count overlays, and a relay status control interface.
4.8. Failure Case Analysis
4.9. Monitoring Data Security and Privacy Considerations
4.10. Limitations and Future Validation
5. Conclusions
- With YOLO26-GAM as the detection core, the proposed method improved small-target personnel detection under dusty, occluded, and overhead-view workshop conditions. On the in-situ data, it achieved a 98.3% mAP@0.5 with a per-image CPU processing time of 36.5 ms. Relative to YOLOv8n, this corresponds to a 5.9 percentage point improvement in mAP@0.5 and a 54.6% latency reduction.
- The ReID-assisted multi-zone collaborative counting strategy maintained identity consistency across non-overlapping cameras and supported local and global personnel-count control. This design reduced duplicate counting and improved the reliability of safety-threshold assessment in multi-workshop monitoring.
- The polygon-based IEF aligned the monitored region with irregular workshop boundaries. By excluding detections in safe transit corridors and other non-hazardous areas, the method reduced spatial false alarms while preserving the real-time responsiveness required for safety intervention.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Pirone, A.; Vallerotonda, M.R.; Bragatto, P.A. Lessons learned from recent accidents in fireworks establishments. Chem. Eng. Trans. 2016, 53, 259–264. [Google Scholar]
- Wang, F.; Wang, X.; Liu, D.; Liu, H. Comprehensive safety risk evaluation of fireworks production enterprises using the frequency-based ANP and BPNN. Heliyon 2023, 9, e21724. [Google Scholar] [CrossRef] [PubMed]
- Nallathambi, I.; Savaram, P.; Sengan, S.; Alharbi, M.; Alshathri, S.; Bajaj, M.; Aly, M.H.; El-Shafai, W. Impact of fireworks industry safety measures and prevention management system on human error mitigation using a machine learning approach. Sensors 2023, 23, 4365. [Google Scholar] [CrossRef] [PubMed]
- Daud, M.M.; Saad, H.M.; Ijab, M.T. Conceptual design of human detection via deep learning for industrial safety enforcement in manufacturing site. In 2021 IEEE International Conference on Automatic Control & Intelligent Systems (I2CACIS); IEEE: Piscataway, NJ, USA, 2021; pp. 369–373. [Google Scholar]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR); IEEE: Piscataway, NJ, USA, 2016; pp. 779–788. [Google Scholar]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. SSD: Single shot multibox detector. In European Conference on Computer Vision (ECCV); Springer: Cham, Switzerland, 2016; pp. 21–37. [Google Scholar]
- Du, F.; Jiao, S.; Chu, K. Application Research of Bridge Damage Detection Based on the Improved Lightweight Convolutional Neural Network Model. Appl. Sci. 2022, 12, 6225. [Google Scholar] [CrossRef]
- Wang, K.; Zhou, H.; Wu, H.; Yuan, G. RN-YOLO: A Small Target Detection Model for Aerial Remote-Sensing Images. Electronics 2024, 13, 2383. [Google Scholar] [CrossRef]
- Sun, Y.; Chen, W.; Wang, Q.; Fang, T.; Liu, X. Improvement and Optimization of Underwater Image Target Detection Accuracy Based on YOLOv8. Symmetry 2025, 17, 1102. [Google Scholar] [CrossRef]
- Li, J.; Xu, R.; Liu, Y. An Improved Forest Fire and Smoke Detection Model Based on YOLOv5. Forests 2023, 14, 833. [Google Scholar] [CrossRef]
- Liu, B.; Wang, J.; An, Q.; Wan, Y.; Zhou, J.; Chen, X. Gardens Fire Detection Based on the Symmetrical SSS-YOLOv8 Network. Symmetry 2025, 17, 1269. [Google Scholar] [CrossRef]
- Çelik, M.; Akar, F.; Bayılmış, C.; Akgün, D. A real-time valve counting system based on YOLOv8. In 2024 8th International Artificial Intelligence and Data Processing Symposium (IDAP); IEEE: Piscataway, NJ, USA, 2024; pp. 1–5. [Google Scholar]
- Akar, F.; Berber, S.; Koca, O.; Bayılmış, C. A real-time carboy tracking and counting system based on YOLOv8 and ByteTrack. In 2024 International Conference on Artificial Intelligence, Metaverse and Cybersecurity (ICAMAC); IEEE: Piscataway, NJ, USA, 2024; pp. 1–5. [Google Scholar]
- Elaoua, A.; Nadour, M.; Cherroun, L.; Elasri, A. Real-time people counting system using YOLOv8 object detection. In 2023 2nd International Conference on Electronics, Energy and Measurement (IC2EM); IEEE: Piscataway, NJ, USA, 2023; pp. 1–5. [Google Scholar]
- Shyaa, T.A.R.; Hashim, A.A. Enhancing real human detection and people counting using YOLOv8. BIO Web Conf. 2024, 97, 00061. [Google Scholar] [CrossRef]
- Hu, J.; Xiao, F.; Jin, Q.; Zhao, G.; Lou, P. Synthetic data generation based on RDB-CycleGAN for industrial object detection. Mathematics 2023, 11, 4588. [Google Scholar] [CrossRef]
- Chen, J.; Shao, C.; Su, Z. Mixed Label Assignment Realizes End-to-End Object Detection. Electronics 2024, 13, 4856. [Google Scholar] [CrossRef]
- Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J.; Ding, G. YOLOv10: Real-time end-to-end object detection. Adv. Neural Inf. Process. Syst. 2024, 37, 107984–108011. [Google Scholar] [CrossRef]
- Zhao, Y.; Lv, W.; Xu, S.; Wei, J.; Wang, G.; Dang, Q.; Liu, Y.; Chen, J. DETRs beat YOLOs on real-time object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR); IEEE: Piscataway, NJ, USA, 2024; pp. 16965–16974. [Google Scholar]
- Dinh, H.T.; Kim, E.-T. A Lightweight Network Based on YOLOv8 for Improving Detection Performance and the Speed of Thermal Image Processing. Electronics 2025, 14, 783. [Google Scholar] [CrossRef]
- Chen, J.; Zhao, J.; Zhang, D.; Ye, Z.; Liu, J.; Huang, W. Research on an image recognition automatic counting system based on improved YOLOv8. In 2024 IEEE 6th International Conference on Power, Intelligent Computing and Systems (ICPICS); IEEE: Piscataway, NJ, USA, 2024; pp. 1417–1421. [Google Scholar]
- Cheng, G.; Zhao, Q. An oil field well site personnel safety gear detection algorithm based on improved YOLOv8. In 2025 10th International Conference on Intelligent Computing and Signal Processing (ICSP); IEEE: Piscataway, NJ, USA, 2025; pp. 585–589. [Google Scholar]
- He, J.; Zhang, L.; Zhang, X.; Xu, T.; Wang, K.; Li, P.; Liu, X. Symmetry-Guided Prototype Alignment and Entropy Consistency for Multi-Source Pedestrian ReID in Power Grids: A Domain Adaptation Framework. Symmetry 2025, 17, 672. [Google Scholar] [CrossRef]
- Chen, J.; Wang, Y.; Qin, J.; Liu, L.; Shao, L. Fast person re-identification via cross-camera semantic binary transformation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR); IEEE: Piscataway, NJ, USA, 2017; pp. 3873–3882. [Google Scholar]
- Lin, Y.; Wu, Y.; Yan, C.; Xu, M.; Yang, Y. Unsupervised person re-identification via cross-camera similarity exploration. IEEE Trans. Image Process. 2020, 29, 5481–5490. [Google Scholar] [CrossRef] [PubMed]
- Duan, B.; Zhang, W.; Wu, D.; Wang, L.; Li, B.; Wang, W. Cross-camera prototype learning for intra-camera supervised person re-identification. In International Conference on Artificial Neural Networks (ICANN); Springer: Cham, Switzerland, 2023; pp. 401–413. [Google Scholar]
- Mendes, D.; Correia, S.; Jorge, P.; Brandão, T.; Arriaga, P.; Nunes, L. Multi-Camera Person Re-Identification Based on Trajectory Data. Appl. Sci. 2023, 13, 11578. [Google Scholar] [CrossRef]
- Yin, Q.; Wang, G.A.; Wu, J.; Luo, H.; Tang, Z. Dynamic re-weighting and cross-camera learning for unsupervised person re-identification. Mathematics 2022, 10, 1654. [Google Scholar] [CrossRef]
- Chen, J.; Gao, C.; Sun, L.; Sang, N. CCSD: Cross-camera self-distillation for unsupervised person re-identification. Vis. Intell. 2023, 1, 27. [Google Scholar] [CrossRef]
- Wang, C.; Zhang, K.; Li, Y.; Cui, Y.; Zhang, D.; Yang, H. Exploration of the application of electronic fences driven by computer algorithms in industrial safety. In Fourth International Conference on Electronics Technology and Artificial Intelligence (ETAI 2025); SPIE: Bellingham, WA, USA, 2025; Volume 13692, pp. 1377–1383. [Google Scholar]
- Zhuang, Y.; Zhang, J.; Feng, J.; Zhang, J. Aerial oriented object detection with rasterized polygon-based learning. In IGARSS 2025–2025 IEEE International Geoscience and Remote Sensing Symposium; IEEE: Piscataway, NJ, USA, 2025; pp. 6073–6077. [Google Scholar]
- Çarklı Yavuz, B. Scale-Dependent Performance Analysis of YOLO26 and YOLOv11 for PPE Detection. Electronics 2026, 15, 1146. [Google Scholar] [CrossRef]
- Luo, H.; Gu, Y.; Liao, X.; Lai, S.; Jiang, W. Bag of Tricks and a Strong Baseline for Deep Person Re-Identification. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW); IEEE: Piscataway, NJ, USA, 2019; pp. 1487–1495. [Google Scholar]
- Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. In Proceedings of the IEEE International Conference on Computer Vision (ICCV); IEEE: Piscataway, NJ, USA, 2017; pp. 618–626. [Google Scholar]
- Lin, Y.; Wei, Y.; Chen, D.; Li, Y.; Erkan, U.; Toktas, A.; Gao, S.; Zhang, Y. Cryptanalysis and Improvement of a Video Cryptosystem via Chaos and S-Box. ACM Trans. Multimed. Comput. Commun. Appl. 2026, 22, 173. [Google Scholar] [CrossRef]
















| Component | Configuration |
|---|---|
| Backbone | ImageNet-pretrained ResNet-50-IBN with last stride 1. |
| Feature representation | Global average pooling, batch-normalization neck, 2048-dimensional embedding, and L2 normalization for matching. |
| Input and augmentation | Training and test crops of pixels; random horizontal flipping, padding, and random erasing with probability 0.5. |
| Sampling | Naive identity sampler; batch size 64 with four images per identity. |
| Loss | Cross-entropy loss with label smoothing and hard-mining triplet loss with margin 0.3. |
| Optimization | Adam optimizer; initial learning rate 0.00035; weight decay 0.0005. |
| Schedule | 120 epochs; MultiStepLR milestones at epochs 40 and 90 with ; 2000 warm-up iterations. |
| Model | P (%) | R (%) | mAP@0.5 (%) | CPU Latency (ms/Image) | Params (M) | GFLOPs |
|---|---|---|---|---|---|---|
| Faster R-CNN | 92.4 | 85.1 | 91.5 | 455.2 | 41.1 | 205.2 |
| SSD-VGG16 | 82.5 | 76.8 | 85.8 | 110.5 | 26.3 | 60.4 |
| YOLOv5n | 88.6 | 84.3 | 91.2 | 73.6 | 2.6 | 7.7 |
| YOLOv6n | 89.1 | 85.2 | 92.1 | 78.4 | 4.5 | 11.4 |
| YOLOv7-tiny | 87.8 | 86.5 | 91.8 | 65.2 | 6.1 | 13.2 |
| YOLOv8n | 90.2 | 87.3 | 92.4 | 80.4 | 3.2 | 8.7 |
| YOLOv9-tiny | 90.8 | 87.9 | 93.1 | 75.1 | 7.1 | 26.4 |
| YOLOv10n | 91.5 | 86.8 | 92.8 | 39.5 | 2.3 | 6.7 |
| YOLOv11n | 92.1 | 88.5 | 93.5 | 56.1 | 2.6 | 6.5 |
| Ours (YOLO26) | 95.4 | 91.8 | 96.3 | 37.5 | 2.5 | 5.8 |
| Model | P (%) | R (%) | mAP@0.5 (%) | Latency (ms/Image) | Params (M) | GFLOPs |
|---|---|---|---|---|---|---|
| YOLO26 (Baseline) | 95.4 | 91.8 | 96.3 | 37.5 | 2.50 | 5.80 |
| YOLO26 + CBAM | 95.6 | 92.1 | 96.5 | 37.3 | 4.25 | 13.75 |
| YOLO26 + Shuffle | 96.2 | 91.4 | 96.4 | 37.4 | 2.50 | 5.80 |
| YOLO26 + SE | 95.9 | 92.8 | 97.6 | 36.9 | 2.52 | 5.82 |
| Ours (YOLO26 + GAM) | 97.1 | 93.2 | 97.8 | 36.7 | 2.90 | 6.67 |
| Model | P (%) | R (%) | mAP@0.5 (%) |
|---|---|---|---|
| YOLO26 + CBAM | 95.42 ± 0.29 | 92.54 ± 0.30 | 96.50 ± 0.15 |
| YOLO26 + GAM | 97.12 ± 0.24 | 93.60 ± 0.27 | 97.80 ± 0.13 |
| Method | Scenario | (%) | Alarm Success Rate (%) | ReID Precision (%) |
|---|---|---|---|---|
| Baseline (Independent) | Global (Overall) | 87.3 | 85.3 | Not applicable |
| Proposed (Collaborative) | Global (Overall) | 98.2 | 99.0 | 97.1 |
| Configuration | FDR (%) | TPR (%) | Alarm Precision (%) |
|---|---|---|---|
| Baseline (Without Fence) | 18.5 | 98.8 | 80.6 |
| Proposed (With IEF) | 2.2 | 99.1 | 98.4 |
| Improvement | (−16.3) | (+0.3) | (+17.8) |
| No. | GAM | Fence | ReID | P (%) | R (%) | mAP@0.5 (%) | Processing Time (ms/Image) |
|---|---|---|---|---|---|---|---|
| 1 (Basic) | 95.4 | 91.8 | 96.3 | 37.5 | |||
| 2 | ✓ | 97.1 | 93.2 | 97.8 | 36.7 | ||
| 3 | ✓ | 97.2 | 87.5 | 94.1 | 37.8 | ||
| 4 | ✓ | 95.7 | 93.9 | 97.3 | 37.7 | ||
| 5 | ✓ | ✓ | 98.0 | 92.9 | 97.4 | 37.0 | |
| 6 | ✓ | ✓ | 98.1 | 94.8 | 98.1 | 36.9 | |
| 7 | ✓ | ✓ | 97.6 | 92.7 | 96.6 | 38.0 | |
| 8 (Ours) | ✓ | ✓ | ✓ | 98.6 | 95.4 | 98.3 | 36.5 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Yan, X.; Tao, H.; Xiong, B.; Wang, H.; Luo, W.; Tian, P. A Visual Detection and Multi-Zone Personnel Safety Control Method for Firework Manufacturing Workshops. Electronics 2026, 15, 3547. https://doi.org/10.3390/electronics15163547
Yan X, Tao H, Xiong B, Wang H, Luo W, Tian P. A Visual Detection and Multi-Zone Personnel Safety Control Method for Firework Manufacturing Workshops. Electronics. 2026; 15(16):3547. https://doi.org/10.3390/electronics15163547
Chicago/Turabian StyleYan, Xiaoxi, Hongwei Tao, Biao Xiong, Hui Wang, Wenhao Luo, and Peiqiang Tian. 2026. "A Visual Detection and Multi-Zone Personnel Safety Control Method for Firework Manufacturing Workshops" Electronics 15, no. 16: 3547. https://doi.org/10.3390/electronics15163547
APA StyleYan, X., Tao, H., Xiong, B., Wang, H., Luo, W., & Tian, P. (2026). A Visual Detection and Multi-Zone Personnel Safety Control Method for Firework Manufacturing Workshops. Electronics, 15(16), 3547. https://doi.org/10.3390/electronics15163547

