Analisis Perbandingan Performa U-Net dan SegFormer untuk Segmentasi Semantik Cacat pada Batik Tulis Tekno
Raudha Nur Hidayatullah Susanto, Prof. Dr.Eng. Ir. Sunu Wibirama, S.T., M.Eng., IPM.
2026 | Skripsi | TEKNOLOGI INFORMASI
Batik Tulis Tekno merupakan produk batik dengan karakteristik visual yang kompleks sehingga proses identifikasi cacat secara manual berpotensi menghasilkan penilaian yang subjektif dan kurang konsisten. Penelitian ini bertujuan untuk menerapkan dan membandingkan model semantic segmentation U-Net dan SegFormer dalam mendeteksi tiga jenis cacat pada Batik Tulis Tekno, yaitu Garis Pecah (Crack), Warna Keluar Pola (Pothole), dan Warna Masuk Pola (Patch). Dataset yang digunakan terdiri atas 192 citra berukuran 640 × 640 piksel, yang dibagi menjadi 122 citra data latih, 35 citra data validasi, dan 35 citra data uji. Kedua model dilatih secara scratch tanpa menggunakan bobot pretrained, dengan fungsi loss berupa kombinasi Cross Entropy Loss dan Dice Loss. Data latih diperluas melalui 165 variasi augmentasi per citra, sedangkan data validasi dan data uji digunakan tanpa augmentasi. Evaluasi dilakukan pada tingkat citra (image-level) untuk mengukur kemampuan model dalam mendeteksi keberadaan masing-masing jenis cacat menggunakan Accuracy, Precision, Recall, dan F1-score, serta pada tingkat piksel (pixel-level) menggunakan IoU, mIoU, Dice, Precision, Recall, F1-score, dan Overall Accuracy. Hasil eksperimen menunjukkan bahwa U-Net memperoleh performa yang lebih baik secara keseluruhan dibandingkan SegFormer. Pada evaluasi image-level, U-Net memperoleh Macro F1-score sebesar 0,801332, sedangkan SegFormer memperoleh 0,675795. Pada evaluasi pixel-level, U-Net memperoleh mIoU sebesar 0,482713 dan Dice sebesar 0,606157, sedangkan SegFormer memperoleh mIoU sebesar 0,383702 dan Dice sebesar 0,477648. Meskipun U-Net unggul secara keseluruhan, SegFormer menunjukkan Macro Precision image-level yang lebih tinggi serta performa F1-score yang lebih baik pada kelas Pothole. Hasil penelitian menunjukkan bahwa U-Net lebih sesuai untuk melakukan segmentasi cacat Batik Tulis Tekno pada kondisi dataset dan konfigurasi eksperimen yang digunakan. Hasil segmentasi juga dapat dimanfaatkan sebagai dasar untuk analisis tambahan berupa estimasi proporsi luas area cacat dan tingkat keparahan, meskipun analisis tersebut masih bersifat eksploratif dan bukan tujuan utama penelitian.
Batik Tulis Tekno is a batik product with complex visual characteristics, making manual defect identification potentially subjective and inconsistent. This study aims to implement and compare two semantic segmentation models, U-Net and SegFormer, for detecting three types of defects in Batik Tulis Tekno, namely Crack, Pothole, and Patch. The dataset consists of 192 images with a resolution of 640 × 640 pixels, divided into 122 training images, 35 validation images, and 35 test images. Both models were trained from scratch without using pretrained weights, using a combination of Cross Entropy Loss and Dice Loss. The training data were expanded through 165 augmentation variations per image, while the validation and test data were used without augmentation. Evaluation was conducted at the image level to measure the ability of the models to detect the presence of each defect using Accuracy, Precision, Recall, and F1-score, and at the pixel level using IoU, mIoU, Dice, Precision, Recall, F1-score, and Overall Accuracy. The experimental results show that U-Net achieved better overall performance than SegFormer. At the image level, U-Net achieved a Macro F1-score of 0.801332, while SegFormer achieved 0.675795. At the pixel level, U-Net achieved an mIoU of 0.482713 and a Dice score of 0.606157, while SegFormer achieved an mIoU of 0.383702 and a Dice score of 0.477648. Although U-Net performed better overall, SegFormer achieved higher image-level Macro Precision and a higher F1-score for the Pothole class. These results indicate that U-Net is more suitable for defect segmentation in Batik Tulis Tekno under the dataset and experimental configuration used in this study. The segmentation results can also serve as a basis for further analysis of defect area proportion and severity, although such analysis remains exploratory and is not the primary objective of this study.
Kata Kunci : Batik Tulis Tekno, semantic segmentation, u-net, segformer, deteksi cacat