Journals / Bozok Journal of Engineering and Architecture / 2025 / Cilt: 4 Sayı: 2

Classification of Defect and Non-Defect Images in MVTec Wood Data with Vision Transformer (ViT)

Vision Transformer (ViT) ile MVTec Ahşap Verisinde Kusurlu ve Kusursuz Görüntülerin Sınıflandırılması

Kenan Kılıç(YOZGAT BOZOK ÜNİVERSİTESİ)0000-0003-1607-9545
Pages
1–12
Publication Date
2025-12-31
🏛️Bibliographic metadata and full text access for this article are provided via DergiPark.
DergiPark Record ↗
✨

AI Summary & Key Takeaways

AI Insight
⚡ TL;DR(Too Long; Didn't Read)

In order to further improve the performance, increasing the data diversity and hybrid model approaches are suggested..

📌 3 Key Takeaways

🎯
Objective & Hypothesis:Introduction and Objectives It is important to compare the performances of deep learning models for defect detection and classification tasks in industrial image analysis.
📊
Key Findings & Data:In this study, the performances of Google/ViT-Base-Patch16-224-in21k (Vision Transformer) and Microsoft/Swin-Tiny-Patch4-Window7-224 (Swin Transformer) models on wood surface defects were investigated.
💡
Conclusion & Impact:In order to further improve the performance, increasing the data diversity and hybrid model approaches are suggested..
🔬Design:Modeling & Simulation
📍Scope:Comprehensive Sample
⚙️Variables:Ağaçişleri Endüstrisi · Ahşap Kusurları · Bilgisayarlı Görü

Abstract

Introduction and Objectives It is important to compare the performances of deep learning models for defect detection and classification tasks in industrial image analysis. In this study, the performances of Google/ViT-Base-Patch16-224-in21k (Vision Transformer) and Microsoft/Swin-Tiny-Patch4-Window7-224 (Swin Transformer) models on wood surface defects were investigated. Methods The performances of both models were evaluated using the MVTec Wood Dataset, and standard image processing protocols were applied in the training and testing stages. Findings While the Google/ViT model showed the highest performance with 97% (0.97) accuracy, the Microsoft/Swin model provided 95% (0.95) accuracy. Both models achieved over 90% success, especially in crack and knot defects. Conclusions The study proved that Vision Transformer-based models are effective in industrial defect detection. In order to further improve the performance, increasing the data diversity and hybrid model approaches are suggested..

Özet

Giriş ve Hedefler Endüstriyel görüntü analizinde kusur tespiti ve sınıflandırma görevleri için derin öğrenme modellerinin performanslarının karşılaştırılması önem taşımaktadır. Bu çalışmada, Google/ViT-Base-Patch16-224-in21k (Vision Transformer) ve Microsoft/Swin-Tiny-Patch4-Window7-224 (Swin Transformer) modellerinin ahşap yüzey kusurlarındaki başarımları incelenmiştir. Yöntemler MVTec Ahşap Veri Seti kullanılarak her iki modelin performansı değerlendirilmiş, eğitim ve test aşamalarında standart görüntü işleme protokolleri uygulanmıştır. Bulgular Google/ViT modeli %9 doğruluk değeri ile en yüksek performansı gösterirken, Microsoft/Swin modeli %95 doğruluk sağlamaktadır. Her iki model de özellikle çatlak ve düğüm kusurlarında %90'ın üzerinde başarı elde etmiştir. Sonuçlar Çalışma, Vision Transformer tabanlı modellerin endüstriyel kusur tespitinde etkin olduğunu kanıtlamıştır. Performansın daha da artırılması için veri çeşitliliğinin artırılması ve hibrit model yaklaşımları önerilmektedir.

🔖

Cite This Article

Kılıç, K. (2025). Classification of Defect and Non-Defect Images in MVTec Wood Data with Vision Transformer (ViT). Bozok Journal of Engineering and Architecture, Cilt: 4 Sayı: 2, 1–12. https://doi.org/10.70700/bjea.1805120

📄 Full Text PDF Viewer

📄

PDF görüntüleyici hazırlanıyor...

References (20)

  1. R. Norlander, J. Grahn, A. Maki. “Wooden knot detection using convnet transfer learning”. Image Analysis: 19th Scandinavian Conference, SCIA 2015, Proceedings, Springer International Publishing, 263–274, 2015. DOI: 10.1007/978-3-319-19665-7_22
  2. W. Pölzleitner, G. Schwingshakl. “Real-time surface grading of profiled wooden boards”. Industrial Metrology, 2(3–4), 283–298, 1992. DOI: 10.1016/0921-5956(92)80008-H
  3. Z. F. Qiu. “A simple machine vision system for improving the edging and trimming operations performed in hardwood sawmills”. Ph.D. Dissertation, Virginia Tech, 1996.
  4. D. L. Schmoldt, P. Li, A. L. Abbott. “Machine vision using artificial neural networks with local 3D neighbourhoods”. Computers and Electronics in Agriculture, 16 (3), 255–271, 1997. DOI: 10.1016/S0168-1699(97)00002-1
  5. D. Qi,, P. Zhang, X. Jin, X. Zhang. “Study on wood image edge detection based on Hopfield neural network”. 2010 IEEE International Conference on Information and Automation, 1942–1946, 2010. DOI: 10.1109/ICINFA.2010.5512014
  6. X. Ji, H. Guo, M. Hu. “Features extraction and classification of wood defect based on HU invariant moment and wavelet moment and BP neural network”. Proceedings of the 12th International Symposium on Visual Information Communication and Interaction, 1–5, 2019. DOI: 10.1145/3356422.3356459
  7. H. Mu, M. Zhang, D. Qi, S. Guan, H. Ni. “Wood defects recognition based on fuzzy BP neural network”. International Journal of Smart Home, 9, 143–152, 2015. DOI: 10.14257/ijsh.2015.9.5.14
  8. J. C. Hermanson, A. C. Wiedenhoeft. “A brief review of machine vision in the context of automated wood identification systems”. IAWA Journal, 32(2), 233–250, 2011. DOI: 10.1163/22941932-90000054
  9. L. Wen, X. Li, L. Gao. “A transfer convolutional neural network for fault diagnosis based on ResNet-50”. Neural Computing and Applications, 32(10), 6111–6124, 2020. DOI: 10.1007/s00521-019-04097-w
  10. Y. LeCun, Y. Bengio, G. Hinton. “Deep learning”. Nature, 521(7553), 436–444, 2015. DOI: 10.1038/nature14539
  11. Z. Liu, Y. Lin, Y. Cao, H. Hu, Y. Wei, Z. Zhang, et al. “Swin Transformer: Hierarchical vision transformer using shifted windows”. Proceedings of the IEEE/CVF International Conference on Computer Vision, 10012–10022, 2021.
  12. I. Goodfellow, Y. Bengio, A. Courville. “Deep Learning”. MIT Press, Cambridge (MA), 2016. DOI:/10.4258/hir.2016.22.4.351
  13. P. Bergmann, M. Fauser, D. Sattlegger, C. Steger. “MVTec AD: A comprehensive real-world dataset for unsupervised anomaly detection”. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 9592–9600, 2019.
  14. A. Krizhevsky, I. Sutskever, G. E. Hinton “ImageNet classification with deep convolutional neural networks”. Advances in Neural Information Processing Systems, 25, 2012.
  15. A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, et al. “An image is worth 16×16 words: Transformers for image recognition at scale”. arXiv preprint, arXiv:2010.11929, 2020.
  16. A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A.N. Gomez, et al. “Attention is all you need”. arXiv preprint, arXiv:1706.03762, 2017.
  17. H. Touvron, M. Cord, M. Douze, F. Massa, A. Sablayrolles, H. Jégou. “Training data-efficient image transformers and distillation through attention”. International Conference on Machine Learning, 10347–10357, 2021.
  18. M.F. Yeh, C.C. Luo, Y.C. Liu. “Optimization of Gabor Convolutional Networks Using the Taguchi Method and Their Application in Wood Defect Detection”. Applied Sciences, 15(17), 9557, 2025. DOI: 10.3390/app15179557.
  19. D. J. Li, W.B. Xie, B.G. Wang, W.F. Zhong, H.M. Wang. “Data augmentation and layered deformable Mask R-CNN-based detection of wood defects”. IEEE Access, 9, 108162–108174, 2021. DOI: 10.1109/ACCESS.2021.3101247.
  20. W. Lu, J.F. Jing, Y. Q. Huang. “MRD-Net: An effective CNN-based segmentation network for surface defect detection”. IEEE Transactions on Instrumentation and Measurement, 71, 1–12, 2022. DOI: 10.1109/TIM.2022.3200361.