Batik Images Retrieval Using Pre-trained model and K-Nearest Neighbor

Agus Minarno - Universitas Muhammadiyah Malang, Malang, Indonesia
Muhammad Yusril Hasanuddin - Universitas Muhammadiyah Malang, Malang, Indonesia
Yufis Azhar - Universitas Muhammadiyah Malang, Malang, Indonesia

Citation Format:



Batik is an Indonesian cultural heritage that should be preserved. Over time, many batik motifs have sprung up, which can lead to mutual claims between craftsmen. Therefore, it is necessary to create a system to measure the similarity of a batik motif. This research is focused on making Content-Based Image Retrieval (CBIR) on batik images. The dataset used in this research is big data Batik images. The authors used transfer learning on several pre-trained models and used Convolutional Neural Network (CNN) Autoencoder from previous studies to extract features on all images in the database. The extracted features calculate the Euclidean distance between the query and all images in the database to retrieve images. The image closest to the query will be retrieved according to the number of r, namely 3, 5, 10, or 15. Before the image is retrieved, the retrieval system is used to re-ranked with K-Nearest Neighbor (KNN), which classifies the retrieved image. The results of this study prove that MobileNetV2 + KNN is the best model in terms of Image Retrieval Batik, followed by InceptionV3 and VGG19 as the second and third ranks. Moreover, CNN Autoencoder from previous research and InceptionResNetV2 are ranked fourth and fifth. In this study, it was also found that the use of KNN re-ranking can increase the precision value by 0.00272. For further research, deploying these models, especially for MobileNetV2 is an approach for seeing a major impact on batik craftsmanship for decreasing batik motif plagiarism.


Batik; content based image retrieval; autoencoder; KNN; CNN.

Full Text:



Director-General of UNESCO, “Indonesia Batik Certificate,†4. COM, 2009. (accessed Jan. 19, 2022).

A. E. Minarno, M. C. Mustaqim, Y. Azhar, W. A. Kusuma, and Y. Munarko, “Deep Convolutional Generative Adversarial Network Application in Batik Pattern Generator,†in 2021 9th International Conference on Information and Communication Technology, ICoICT 2021, 2021, pp. 54–59. doi: 10.1109/ICoICT52021.2021.9527514.

A. E. Minarno, M. C. Mustaqim, Y. Azhar, W. A. Kusuma, and Y. Munarko, “Deep Convolutional Generative Adversarial Network Application in Batik Pattern Generator,†2021 9th International Conference on Information and Communication Technology, ICoICT 2021, pp. 54–59, Aug. 2021, doi: 10.1109/ICOICT52021.2021.9527514.

A. E. Minarno, F. D. S. Sumadi, H. Wibowo, and Y. Munarko, “Classification of batik patterns using K-nearest neighbor and support vector machine,†Bulletin of Electrical Engineering and Informatics, vol. 9, no. 3, pp. 1260–1267, 2020, doi: 10.11591/eei.v9i3.1971.

P. Kaur, H. S. Pannu, and A. K. Malhi, “Comparative analysis on cross-modal information retrieval: A review,†Comput Sci Rev, vol. 39, p. 100336, 2021, doi: 10.1016/j.cosrev.2020.100336.

Y. Zhang, X. Wang, Z. Guo, and J. Li, “ImageSem at ImageCLEF 2018 caption task: Image retrieval and transfer learning,†CEUR Workshop Proc, vol. 2125, 2018.

M. Tzelepi and A. Tefas, “Deep convolutional learning for Content Based Image Retrieval,†Neurocomputing, vol. 275, pp. 2467–2478, 2018, doi: 10.1016/j.neucom.2017.11.022.

N. K. Rout, M. Atulkar, and M. K. Ahirwal, “A review on content-based image retrieval system: Present trends and future challenges,†Int J Comput Vis Robot, vol. 11, no. 5, pp. 461–485, 2021, doi: 10.1504/IJCVR.2021.117578.

M. S. Haji, M. H. Alkawaz, A. Rehman, and T. Saba, “Content-based image retrieval: A deep look at features prospectus,†Int J Comput Vis Robot, vol. 9, no. 1, pp. 14–38, 2019, doi: 10.1504/IJCVR.2019.098004.

J. Delua, “Supervised vs. Unsupervised Learning: What’s the Difference?,†IBM, 2021. (accessed Jan. 20, 2022).

A. E. Minarno, K. M. Ghufron, T. S. Sabrila, L. Husniah, and F. D. S. Sumadi, “CNN Based Autoencoder Application in Breast Cancer Image Retrieval,†in Proceedings - 2021 International Seminar on Intelligent Technology and Its Application: Intelligent Systems for the New Normal Era, ISITIA 2021, 2021, pp. 29–34. doi: 10.1109/ISITIA52817.2021.9502205.

F. Zhuang, Z. Qi, K. Duan, D. Xi, Y. Zhu, H. Zhu, H. Xiong, and Q. He, “A Comprehensive Survey on Transfer Learning,†Proceedings of the IEEE, vol. 109, no. 1, pp. 43–76, 2021, doi: 10.1109/JPROC.2020.3004555.

A. E. Minarno, I. S. Kantomo, F. D. S. Sumadi, H. A. Nugroho, and Z. Ibrahim, “Classification of Brain Tumors on MRI Images Using DenseNet and Support Vector Machine,†JOIV : International Journal on Informatics Visualization, vol. 6, no. 2, pp. 404–410, Jun. 2022, doi: 10.30630/JOIV.6.2.991.

A. E. Minarno, M. H. C. Mandiri, Y. Azhar, F. Bimantoro, H. A. Nugroho, and Z. Ibrahim, “Classification of Diabetic Retinopathy Disease Using Convolutional Neural Network,†JOIV : International Journal on Informatics Visualization, vol. 6, no. 1, pp. 12–18, Mar. 2022, doi: 10.30630/JOIV.6.1.857.

A. E. Minarno, B. Y. Sasongko, Y. Munarko, H. A. Nugroho, and Z. Ibrahim, “Convolutional Neural Network featuring VGG-16 Model for Glioma Classification,†JOIV : International Journal on Informatics Visualization, vol. 6, no. 3, pp. 660–666, Sep. 2022, doi: 10.30630/JOIV.6.3.1230.

A. E. Minarno, M. Rifal Alfarizy, A. Hendryawan, S. Syaifuddin, and Y. Munarko, “Pneumonia Classification using Gabor-Convolutional Neural Networks and Image Enhancement,†2021 9th International Conference on Information and Communication Technology, ICoICT 2021, pp. 180–185, Aug. 2021, doi: 10.1109/ICOICT52021.2021.9527427.

Y. Munarko and A. E. Minarno, “HII: Histogram inverted index for fast images retrieval,†International Journal of Electrical and Computer Engineering, vol. 8, no. 5, pp. 3140–3148, 2018, doi: 10.11591/ijece.v8i5.pp.3140-3148.

H. Prasetyo and B. A. Putra Akardihas, “Batik image retrieval using convolutional neural network,†Telkomnika (Telecommunication Computing Electronics and Control), vol. 17, no. 6, pp. 3010–3018, 2019, doi: 10.12928/TELKOMNIKA.v17i6.12701.

Y. Azhar, A. Eko Minarno, and Y. Munarko, “Re-Ranking Image Retrieval on Multi Texton Co-Occurrence Descriptor Using K-Nearest Neighbor,†Proceeding of the Electrical Engineering Computer Science and Informatics, vol. 5, no. 5, pp. 589–593, 2018, doi: 10.11591/eecsi.v5i5.1683.

X. Li, J. Yang, and J. Ma, “Recent developments of content-based image retrieval (CBIR),†Neurocomputing, vol. 452, pp. 675–689, 2021, doi: 10.1016/j.neucom.2020.07.139.

A. E. Minarno, Y. Azhar, F. D. Setiawan Sumadi, and Y. Munarko, “A Robust Batik Image Classification using Multi Texton Co-Occurrence Descriptor and Support Vector Machine,†2020 3rd International Conference on Intelligent Autonomous Systems, ICoIAS 2020, pp. 51–55, 2020, doi: 10.1109/ICoIAS49312.2020.9081833.

S. Maji and S. Bose, “CBIR Using Features Derived by Deep Learning,†ACM/IMS Transactions on Data Science, vol. 2, no. 3, pp. 1–24, 2021, doi: 10.1145/3470568.

F. A. Putra et al., “Classification of Batik Authenticity Using Convolutional Neural Network Algorithm with Transfer Learning Method,†2021. doi: 10.1109/ICIC54025.2021.9632937.

A. H. Rangkuti, V. H. Athala, N. F. Luthfi, S. V. Aditama, M. M. Ramadhan, and A. H. Aslamia, “Enhancement of traditional clothes pattern recognation using Convolutional Neural Network,†in 2021 IEEE International Conference on Computing, ICOCO 2021, 2021, pp. 224–229. doi: 10.1109/ICOCO53166.2021.9673549.

Z. Widyantoko, T. P. Widowati, Isnaini, and P. Trapsiladi, “Expert role in image classification using cnn for hard to identify object: Distinguishing batik and its imitation,†IAES International Journal of Artificial Intelligence, vol. 10, no. 1, pp. 93–100, 2021, doi: 10.11591/ijai.v10.i1.pp93-100.

M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L. C. Chen, “MobileNetV2: Inverted Residuals and Linear Bottlenecks,†Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 4510–4520, 2018, doi: 10.1109/CVPR.2018.00474.

D. M. S. Arsa and A. A. N. H. Susila, “VGG16 in Batik Classification based on Random Forest,†in Proceedings of 2019 International Conference on Information Management and Technology, ICIMTech 2019, 2019, pp. 295–299. doi: 10.1109/ICIMTech.2019.8843844.

A. Ahmed, “Pre-trained CNNs Models for Content based Image Retrieval,†International Journal of Advanced Computer Science and Applications, vol. 12, no. 7, pp. 200–206, 2021, doi: 10.14569/IJACSA.2021.0120723.

A. Y. Alfakih, Euclidean Distance Matrices and Their Applications in Rigidity Theory. 2018. doi: 10.1007/978-3-319-97846-8.

F. Bimantoro, A. A. Aziz, A. Y. Husodo, A. Musnansyah, A. E. Minarno, and A. Kurniawardhani, “Image Retrieval using Modified Multi Texton and Rotation Invariant Local Binary Pattern,†2020 International Conference on Advancement in Data Science, E-Learning and Information Systems, ICADEIS 2020, Oct. 2020, doi: 10.1109/ICADEIS49811.2020.9277462.

A. Latif et al., “Content-based image retrieval and feature extraction: A comprehensive review,†Math Probl Eng, vol. 2019, 2019, doi: 10.1155/2019/9658350.