Implementation of Swin Transformer for Web-Based Identification of Rhizome Shaped Spices Using Streamlit Framework

Main Article Content

Muhammad Arkan Nibrastama
Didik Kurniawan
Admi Syarif
Rico Andrian

Abstract

Indonesia is a country rich in natural resources, particularly in various types of spices. Among these, rhizome-shaped spices such as ginger, turmeric, galangal, and aromatic ginger often present classification challenges due to their similar visual appearances. This study aims to address this issue by developing a web-based identification system utilizing the Swin Transformer—an advanced Vision Transformer architecture known for its effectiveness in image classification tasks. The Swin Transformer model demonstrated superior performance, achieving an accuracy of 99.11%, precision of 98.24%, recall of 98.21%, and F1-score of 98.21%. These results significantly outperform the Xception convolutional neural network (CNN) model, which was previously considered state-of-the-art, with 95.00% accuracy, 90.14% precision, 90.00% recall, and 90.01% F1-score. To ensure practical usability, the final Swin Transformer model was deployed as a web application using the Streamlit framework, allowing users to classify rhizome spices through image uploads. These findings highlight the effectiveness of Swin Transformer for practical image-based spice classification.

Article Details

How to Cite
Nibrastama, M. A., Kurniawan, D., Syarif, A., & Andrian, R. (2025). Implementation of Swin Transformer for Web-Based Identification of Rhizome Shaped Spices Using Streamlit Framework. Jurnal Pepadun, 6(2), 154–164. https://doi.org/10.23960/pepadun.v6i2.276

References

E. Tanuwijaya and A. Roseanne, “Modifikasi Arsitektur VGG16 untuk Klasifikasi Citra Digital Rempah-Rempah Indonesia,” MATRIK J. Manajemen, Tek. Inform. dan Rekayasa Komput., vol. 21, no. 1, pp. 189–196, Nov. 2021, doi: 10.30812/matrik.v21i1.1492.

C. Nisa and F. Candra, “Klasifikasi Jenis Rempah-Rempah Menggunakan Algoritma Convolutional Neural Network,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 1, pp. 78–84, Dec. 2023, doi: 10.57152/malcom.v4i1.1018.

A. E. Putra, M. F. Naufal, and V. R. Prasetyo, “Klasifikasi Jenis Rempah Menggunakan Convolutional Neural Network dan Transfer Learning,” J. Edukasi dan Penelit. Inform., vol. 9, no. 1, p. 12, Apr. 2023, doi: 10.26418/jp.v9i1.58186.

A. Roihan, P. A. Sunarya, and A. S. Rafika, “Pemanfaatan Machine Learning dalam Berbagai Bidang: Review paper,” IJCIT (Indonesian J. Comput. Inf. Technol., vol. 5, no. 1, pp. 75–82, 2020, doi: 10.31294/ijcit.v5i1.7951.

S. Ilahiyah and A. Nilogiri, “Implementasi Deep Learning Pada Identifikasi Jenis Tumbuhan Berdasarkan Citra Daun Menggunakan Convolutional Neural Network _ Ilahiyah _ JUSTINDO (Jurnal Sistem dan Teknologi Informasi Indonesia),” JUSTINDO (Jurnal Sist. Teknol. Inf. Indones., vol. 3, no. 2, pp. 49–56, 2018.

S. Y. Riska and L. Farokhah, “Klasifikasi Bumbu Dapur Indonesia Menggunakan Metode K-Nearest Neighbors (K-NN),” SMATIKA J., vol. 11, no. 01, pp. 37–42, Jun. 2021, doi: 10.32664/smatika.v11i01.568.

J. O. Carnagie, A. R. Prabowo, I. Istanto, E. P. Budiana, I. K. Singgih, I. Yaningsih, and F. Mikšík, “Technical review of supervised machine learning studies and potential implementation to identify herbal plant dataset,” Open Eng., vol. 13, no. 1, Feb. 2023, doi: 10.1515/eng-2022-0385.

D. C. Khrisne and I. M. A. Suyadnya, “Indonesian Herbs and Spices Recognition using Smaller VGGNet-like Network,” in 2018 International Conference on Smart Green Technology in Electrical and Information Systems (ICSGTEIS), IEEE, Oct. 2018, pp. 221–224. doi: 10.1109/ICSGTEIS.2018.8709135.

A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby, “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale,” ICLR 2021 - 9th Int. Conf. Learn. Represent., Oct. 2020, [Online]. Available: http://arxiv.org/abs/2010.11929

Z. Liu, Y. Lin, Y. Cao, H. Hu, Y. Wei, Z. Zhang, S. Lin, and B. Guo, “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows,” 2021 IEEE/CVF Int. Conf. Comput. Vis., pp. 9992–10002, Mar. 2021, doi: 10.1109/ICCV48922.2021.00986.

O. Moutik, H. Sekkat, S. Tigani, A. Chehri, R. Saadane, T. A. Tchakoucht, and A. Paul, “Convolutional Neural Networks or Vision Transformers: Who Will Win the Race for Action Recognitions in Visual Data?,” Sensors, vol. 23, no. 2, p. 734, Jan. 2023, doi: 10.3390/s23020734.

Z. Song, S. Yang, and R. Zhang, “Does Preprocessing Help Training Over-parameterized Neural Networks?,” Adv. Neural Inf. Process. Syst., vol. 27, pp. 22890–22904, Oct. 2021, [Online]. Available: http://arxiv.org/abs/2110.04622

Z. Ye, Y. Yang, X. Li, D. Cao, and D. Ouyang, “An Integrated Transfer Learning and Multitask Learning Approach for Pharmacokinetic Parameter Prediction,” Mol. Pharm., vol. 16, no. 2, pp. 533–541, 2019, doi: 10.1021/acs.molpharmaceut.8b00816.

G. Morales, S. G. Huam, and J. Telles, Artificial Neural Networks and Machine Learning – ICANN 2018, vol. 11141, no. November. in Lecture Notes in Computer Science, vol. 11141. Cham: Springer International Publishing, 2018. doi: 10.1007/978-3-030-01424-7.

I. L. Kharisma, D. A. Septiani, A. Fergina, and Kamdan, “Penerapan Algoritma Decision Tree untuk Ulasan Aplikasi Vidio di Google Play,” J. Nas. Teknol. dan Sist. Inf., vol. 9, no. 2, pp. 218–226, Sep. 2023, doi: 10.25077/teknosi.v9i2.2023.218-226.

A. Arias-Duart, E. Mariotti, D. Garcia-Gasulla, and J. M. Alonso-Moral, “A Confusion Matrix for Evaluating Feature Attribution Methods,” in 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), IEEE, Jun. 2023, pp. 3709–3714. doi: 10.1109/CVPRW59228.2023.00380.

M. Bekkar, H. K. Djemaa, and T. A. Alitouche, “Evaluation Measures for Models Assessment over Imbalanced Data Sets,” J. Inf. Eng. Appl., vol. 3, no. 10, pp. 27–38, 2013, [Online]. Available: http://www.iiste.org/Journals/index.php/JIEA/article/view/7633

A. M. Carrington, D. G. Manuel, P. W. Fieguth, T. Ramsay, V. Osmani, B. Wernly, C. Bennett, S. Hawken, O. Magwood, Y. Sheikh, M. McInnes, and A. Holzinger, “Deep ROC Analysis and AUC as Balanced Average Accuracy, for Improved Classifier Selection, Audit and Explanation,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 45, no. 1, pp. 329–341, 2023, doi: 10.1109/TPAMI.2022.3145392.

Kanika, J. Singla, and Nikita, “Comparing ROC curve based thresholding methods in online transactions fraud detection system using deep learning,” Proc. - IEEE 2021 Int. Conf. Comput. Commun. Intell. Syst. ICCCIS 2021, pp. 119–124, 2021, doi: 10.1109/ICCCIS51004.2021.9397167.

D. Febiharsa, I. M. Sudana, and N. Hudallah, “Uji Fungsionalitas (Blackbox Testing) Sistem Informasi Lembaga Sertifikasi Profesi (SILSP) Batik dengan AppPerfect Web Test dan Uji Pengguna,” Joined J. Journal Informatics Educ., vol. 1, no. 2, p. 117, Dec. 2018, doi: 10.31331/joined.v1i2.752.