Computer vision pipeline implementation: Acne lesion segmentation with SwinUnet and multi-class classification with swin transformer

  • Syarif Romadloni Universitas Negeri Semarang
  • Asri Kurnia Ramadhani Universitas Negeri Semarang
  • Fafian Ihsan Saputra Universitas Negeri Semarang
  • Humam Nasywa Fawazi Universitas Negeri Semarang
  • Muhammad 'Ainun Naja Universitas Negeri Semarang
  • Budi Sunarko Universitas Negeri Semarang
Keywords: Acne Segmentation, Swin Transformer, Multi-Class Classification, Sharpness-Aware Minimization, Computer Vision

Abstract

Acne is a common dermatological problem and often requires accurate lesion identification to support the diagnosis and appropriate treatment. Advances in deep learning and computer vision technologies offer opportunities to develop automated systems capable of detecting and classifying acne lesions more objectively and efficiently. This study aims to develop a two-stage computer vision pipeline for automatic acne lesion detection and classification by integrating the Swin-UNet model for semantic segmentation and the Swin Transformer for multi-class classification. The approach used is a Transformer-based cascaded pipeline architecture, where the segmentation results are used as a guide for Regions of Interest (ROIs) in the classification stage so that the classification process focuses on relevant lesion areas. To address class imbalance and improve model generalization, a combination of Weighted Random Sampling, Mixup data augmentation, and Sharpness-Aware Minimization (SAM) algorithms are applied. The evaluation process is carried out using a dataset strictly separated into training, validation, and testing data. Experimental results showed that the segmentation model achieved a Dice coefficient of 0.9885 and an Intersection over Union (IoU) of 0.9788. Meanwhile, the classification model achieved an accuracy of 96.24% with an F1-score of 0.9629. These findings demonstrate that the proposed system is effective in identifying and classifying acne lesions with precision. Therefore, this approach has the potential to serve as the basis for developing a more accurate and reliable deep learning-based dermatology diagnostic support system.

Published
2026-07-31
How to Cite
Romadloni, S., Ramadhani, A. K., Saputra, F. I., Fawazi, H. N., Naja, M. ’Ainun, & Sunarko, B. (2026). Computer vision pipeline implementation: Acne lesion segmentation with SwinUnet and multi-class classification with swin transformer. TEKNOSAINS : Jurnal Sains, Teknologi Dan Informatika, 13(2), 390-399. https://doi.org/10.37373/tekno.v13i2.2114