Bozok Journal of Engineering and Architecture, cilt.4, sa.2, ss.1-12, 2025 (Hakemli Dergi)
MVTec Anomaly Detection veri setinin ahşap alt sınıfı üzerinde yüzey kusurlarının otomatik olarak sınıflandırılması amacıyla Google/ViT-Base-Patch16-224-in21k ve Microsoft/Swin-Tiny-Patch4-Window7-224 modellerinin performansları araştırılmıştır. Veri setine ait görüntüler 224×224 piksel boyutuna yeniden ölçeklendirilmiş, standart normalizasyon uygulanmış ve iki ayrı senaryo değerlendirilmiştir. İlk olarak veri artırma uygulanmadan, ikinci olarak veri artırma kullanılarak deneyler gerçekleştirilmiştir. Veri artırmasız durumda ViT modeli %95,45, Swin-Tiny modeli %93,94 doğruluk elde etmiştir. Veri artırma uygulandığında ViT modelinin doğruluğu %93,94, Swin-Tiny modelinin doğruluğu ise %95,45 olarak hesaplanmaktadır. Sonuçlar, her iki modelin de kusursuz, sıvı ve çizilme sınıflarında yüksek duyarlılık ve F1-puanı ürettiğini; buna karşın örnek sayısı düşük olan renk, birleşik ve delik sınıflarında sınıf dengesizliğine bağlı performans düşüşleri yaşandığını göstermektedir. Bu çalışma, Transformer modellerinin endüstriyel kalite kontrol süreçlerinde etkin bir alternatif olduğunu göstermekte; veri çeşitliliği ve sınıf dengeleme yöntemlerinin güçlendirilmesi durumunda modellerin doğruluklarının daha da artırılabileceğini göstermektedir.
The performances of the Google/ViT-Base-Patch16-224-in21k and Microsoft/Swin-Tiny-Patch4-Window7-224 models were investigated for the automatic classification of surface defects on the wood subclass of the MVTec Anomaly Detection dataset. The images of the dataset were rescaled to 224×224 pixels, standard normalisation was applied, and two separate scenarios were evaluated. The first experiment was conducted without data augmentation, and the second with data augmentation. In the no-data augmentation case, the ViT model achieved 95.45% accuracy, while the Swin-Tiny model achieved 93.94% accuracy. With data augmentation, the accuracy of the ViT model was calculated as 93.94%, and the Swin-Tiny model as 95.45%. The results show that both models produce high sensitivity and F1-scores for the defect-free, liquid, and scratch classes; however, performance decreases due to class imbalance in the colour, compound, and hole classes, which have low sample numbers. This study demonstrates that Transformer models are an effective alternative in industrial quality control processes, and demonstrates that the accuracy of the models can be further increased if data diversity and class balancing methods are strengthened.