YOLOv12 Model Optimization for Monitoring Occupational Health and Safety in Hospital Archive Rooms

Doni Jepisah, Haryani Octaria, Muhamadiah Muhamadiah, Yuda Irawan

Abstract


The application of artificial intelligence technology in occupational safety monitoring systems within healthcare facilities has become an urgent necessity, particularly to support compliance with Occupational Safety and Health (OSH) standards in hospitals. This study aims to develop an automated detection model based on YOLOv12 to identify visual OSH elements in hospital archive rooms, such as APAR, evacuation signs, windows, and Personal Protective Equipment (PPE) including masks, gloves, and shoes. The initial dataset consisted of 2,866 documented images, which were expanded through augmentation to 6,886 images to increase data diversity and prevent overfitting. The YOLOv12 model was trained over 100 epochs using SGD as the optimization technique. The dataset was divided into three subsets training, validation, and testing in a proportional manner. Model evaluation employed metrics such as precision, recall, mAP@0.5, and mAP@0.5–0.95, supported by visualizations including the confusion matrix, F1-confidence curve, and precision-recall curve. One of the key advantages of YOLOv12 lies in its architectural efficiency and enhanced generalization capability, enabled by the integration of R-ELAN, Area Attention Mechanism, and FlashAttention. These components allow for broader receptive field processing with reduced computational complexity. Furthermore, the removal of positional encoding and adjustment of the MLP ratio make the model lighter and faster without compromising accuracy. Compared to previous versions (YOLOv8–YOLOv11), YOLOv12 demonstrates more stable and accurate performance in detecting complex OSH objects in indoor environments. The system was also implemented in a real-time user interface using Streamlit, automatically displaying personnel PPE completeness and room safety compliance status. In conclusion, the optimized YOLOv12 model has proven effective for real-time visual detection in OSH contexts. Future studies are recommended to incorporate data balancing approaches, spatial segmentation, and IoT sensor integration to expand the system’s coverage and resilience across diverse workplace conditions.


Keywords


YOLOv12; Occupational Safety; Hospital Work Safety; Computer Vision; Deep Learning

Full Text:

PDF

References


H. A. Ekrami, B. F. Dehaghi, S. Ghanbari, N. J. Haghighifard, and M. J. Mohammadi, “Health risk assessment and occupational safety at hospitals in Southwest of Iran,” Clin. Epidemiol. Glob. Heal., vol. 26, p. 101515, 2024, doi: https://doi.org/10.1016/j.cegh.2024.101515.

F. Kartika and S. L. R. Nasution, “Assessing the implementation of occupational safety and health management system in the hospital,” J. Prima Med. Sains, vol. 6, no. 2, pp. 244–250, 2024, doi: 10.34012/jpms.v6i2.6364.

Z. Jiao, P. Hu, H. Xu, and Q. Wang, “Machine Learning and Deep Learning in Chemical Health and Safety: A Systematic Review of Techniques and Applications,” ACS Chem. Heal. Saf., vol. 27, no. 6, pp. 316–334, Nov. 2020, doi: 10.1021/acs.chas.0c00075.

R. P. A and R. Rahmadewi, “DETEKSI OBJEK BERBASIS YOLOV8 UNTUK MENDUKUNG KESELAMATAN KERJA DI LOKASI KONSTRUKSI,” JATI(Jurnal Mhs. Tek. Inform., vol. 9, no. 2, pp. 3188–3195, 2025.

M. Nain, S. Sharma, and S. Chaurasia, “Safety and Compliance Management System Using Computer Vision and Deep Learning,” IOP Conf. Ser. Mater. Sci. Eng., vol. 1099, no. 1, p. 12013, Mar. 2021, doi: 10.1088/1757-899X/1099/1/012013.

T. Zhou, Y. Niu, H. Lu, C. Peng, Y. Guo, and H. Zhou, “Vision transformer: To discover the ‘four secrets’ of image patches,” Inf. Fusion, vol. 105, p. 102248, 2024, doi: https://doi.org/10.1016/j.inffus.2024.102248.

Y. Li, Z. Hu, Y. Zhang, J. Liu, W. Tu, and H. Yu, “DDEYOLOv9: Network for Detecting and Counting Abnormal Fish Behaviors in Complex Water Environments,” Fishes, vol. 9, no. 6, pp. 1–21, 2024, doi: 10.3390/fishes9060242.

M. H. Lui et al., “An Adaptive YOLO11 Framework for the Localisation, Tracking, and Imaging of Small Aerial Targets Using a Pan–Tilt–Zoom Camera Network,” Eng, vol. 5, no. 4, pp. 3488–3516, 2024, doi: 10.3390/eng5040182.

A. Elesawy, E. Mohammed Abdelkader, and H. Osman, “A Detailed Comparative Analysis of You Only Look Once-Based Architectures for the Detection of Personal Protective Equipment on Construction Sites,” Eng, vol. 5, no. 1, pp. 347–366, 2024, doi: 10.3390/eng5010019.

J.-H. Lo, L.-K. Lin, and C.-C. Hung, “Real-Time Personal Protective Equipment Compliance Detection Based on Deep Learning Algorithm,” Sustainability, vol. 15, no. 1, 2023, doi: 10.3390/su15010391.

M. I. B. Ahmed et al., “Personal Protective Equipment Detection: A Deep-Learning-Based Sustainable Approach,” Sustainability, vol. 15, no. 18, 2023, doi: 10.3390/su151813990.

M. I. Al-Khiami and M. M. Elhadad, “Enhancing Construction Site Safety Using Ai: the Development of a Custom Yolov8 Model for Ppe Compliance Detection,” Proc. Eur. Conf. Comput. Constr., vol. 2024, pp. 577–584, 2024, doi: 10.35490/EC3.2024.307.

J. Chen, P. Shi, M. Xu, Y. Xin, X. Fan, and J. Zhang, “WCANet: An Efficient and Lightweight Weight Coordinated Adaptive Detection Network for UAV Inspection of Transmission Line Accessories,” Drones, vol. 9, no. 4, 2025, doi: 10.3390/drones9040318.

J. Song, D. Kim, E. Jeong, and J. Park, “Determination of Optimal Dataset Characteristics for Improving YOLO Performance in Agricultural Object Detection,” Agriculture, vol. 15, no. 7, 2025, doi: 10.3390/agriculture15070731.

A. Ghahremani, S. D. Adams, M. Norton, S. Y. Khoo, and A. Z. Kouzani, “Detecting Defects in Solar Panels Using the YOLO v10 and v11 Algorithms,” Electron., vol. 14, no. 2, 2025, doi: 10.3390/electronics14020344.

A. Febriani, R. Wahyuni, Y. Irawan, and R. Melyanti, “Improved Hybrid Machine and Deep Learning Model for Optimization of Smart Egg Incubator,” J. Appl. Data Sci., vol. 5, no. 3, pp. 1052–1068, 2024.

Y. Lee and H. Kim, “Comparative Analysis of YOLO Series ( from V1 to V11 ) and Their Application in Computer Vision,” J. Semicond. Disp. Technol., vol. 23, no. 4, pp. 190–198, 2024.

M. Y. Turali, A. T. Koc, and S. S. Kozat, “Optimal stochastic gradient descent algorithm for filtering,” Digit. Signal Process., vol. 155, p. 104731, 2024, doi: https://doi.org/10.1016/j.dsp.2024.104731.

S. V Kozyrev, I. A. Lopatin, and A. N. Pechen, “Control of Overfitting with Physics,” Entropy, vol. 26, no. 12, 2024, doi: 10.3390/e26121090.

Y. Tian, Y. Zhang, and H. Zhang, “Recent Advances in Stochastic Gradient Descent in Deep Learning,” Mathematics, vol. 11, no. 3, pp. 1–23, 2023, doi: 10.3390/math11030682.

R. Buga et al., “Streamlit Application and Deep Learning Model for Brain Metastasis Monitoring After Gamma Knife Treatment,” Biomedicines, vol. 13, no. 2, 2025, doi: 10.3390/biomedicines13020423.

C. Catargiu, N. Cleju, and I. B. Ciocoiu, “A Comparative Performance Evaluation of YOLO-Type Detectors on a New Open Fire and Smoke Dataset,” Sensors, vol. 24, no. 17, 2024, doi: 10.3390/s24175597.

E. Hassan and H. Ghadiri, “Advancing brain tumor classification: A robust framework using EfficientNetV2 transfer learning and statistical analysis,” Comput. Biol. Med., vol. 185, p. 109542, 2025, doi: https://doi.org/10.1016/j.compbiomed.2024.109542.

D. Rastogi, P. Johri, and V. Tiwari, “Augmentation based detection model for brain tumor using VGG 19,” Int. J. Comput. Digit. Syst., vol. 13, no. 1, pp. 1227–1237, 2023, doi: 10.12785/ijcds/1301100.

Ultralytics, “YOLO12: Attention-Centric Object Detection,” Ultralytics, 2025. https://docs.ultralytics.com/models/yolo12/

Y. Kumar et al., “Enhancing parasitic organism detection in microscopy images through deep learning and fine-tuned optimizer,” Sci. Rep., vol. 14, no. 1, p. 5753, 2024, doi: 10.1038/s41598-024-56323-8.

D. Setiawan, R. N. Putri, I. Fitri, A. N. Hidayanto, Y. Irawan, and N. Hohashi, “Improved Deep Learning Model for Prediction of Dermatitis in Infants,” J. Appl. Data Sci., vol. 6, no. 2, pp. 871–884, 2025, doi: 10.47738/jads.v6i2.542.

A. Ali, W. Ou, and S. Kanwal, “DCTNets: Deep crowd transfer networks for an approximate crowd counting,” Cogn. Robot., vol. 2, no. April, pp. 96–111, 2022, doi: 10.1016/j.cogr.2022.03.004.

F. S. Nahm, “Receiver operating characteristic curve: overview and practical use for clinicians,” kja, vol. 75, no. 1, pp. 25–36, Jan. 2022, doi: 10.4097/kja.21209.

A. Lubis, Y. Irawan, Junadhi, and S. Defit, “Leveraging K-Nearest Neighbors with SMOTE and Boosting Techniques for Data Imbalance and Accuracy Improvement,” J. Appl. Data Sci., vol. 5, no. 4, pp. 1625–1638, 2024, doi: 10.47738/jads.v5i4.343.




DOI: https://doi.org/10.47738/jads.v6i4.936

Refbacks

  • There are currently no refbacks.



Barcode

Journal of Applied Data Sciences

ISSN:2723-6471 (Online)
Publisher:Bright Publisher
Website:http://bright-journal.org/JADS
Email:taqwa@amikompurwokerto.ac.id (principal contact)
  support@bright-journal.org (technical issues)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0