Sistemasi: Jurnal Sistem Informasi ISSN:2302-8149
Volume 13, Nomor 5, 2024: 2082-2089 e-ISSN:2540-9719
Revealing the Relationship of Batik Motifs Using
Convolutional Neural Network
1
Abdul Mahatir Najar*, 2Maulidyani Abu, 3Rina Ratianingsih, 4Agus Indra Jaya
1,2,3,4
Program Sutdi Matematika, FMIPA, Universitas Tadulako
1,2,3,4
Jl. Soekarno Hatta No.KM. 9, Palu, 94148, Indonesia
*e-mail: abdulmahatir@untad.ac.id
(received: 14 August 2024, revised: 5 September 2024, accepted: 6 September 2024)
Abstract
This study explores the use of Convolutional Neural Networks (CNN) to identify and classify regional
batik motifs, a significant aspect of Indonesian cultural heritage. The CNN model was optimized with
Adam optimizer and used to extract distinctive features from the batik patterns. Subsequently, a
hierarchical clustering method was employed to construct a relationship tree depicting the link
between batik motifs based on their region. The research findings demonstrate that the CNN model
effectively classifies batik motifs with an accuracy of up to 88%. The study provides insights into the
intricate connections between regional batik designs and contributes to the preservation and
understanding of Indonesia's cultural heritage.
Keywords: batik motifs, convolutional neural network, feature extraction, hierarchical clustering,
regional relationship
1 Introduction
The arts and culture of Indonesia are renowned for their widespread presence throughout the
country. This is a result of the diverse circumstance, conditions, and environment that each region
experiences, which results in the development of unique arts and cultures. One of Indonesia's
renowned artistic creations is batik, a traditional pattern on cloth that is intricately drawn using
ancient techniques.The term "batik" is said to have originated from the word "ambatik," which refers
to a fabric adorned with little dots. The suffix 'tik' denotes a little dot, droplet, or point, or the act of
creating dots. Batik may also have its origins in the Javanese term 'tritik', which refers to a dyeing
technique where patterns are created on fabrics by tying and sewing specific places before dyeing,
similar to tie-dyeing. Following UNESCO's declaration of batik as the cultural heritage of Indonesia
in Abu Dhabi on October 2nd, 2009, the Indonesian people's sense of pride has risen significantly.
Finally, there was explosive growth in the batik sector, which achieved unprecedented progress in the
history of batik in Indonesia [1], [2].
The exploration of diverse batik patterns has spurred the development of advanced techniques for
identifying and categorizing them. In recent years, artificial intelligence has been increasingly applied
to the classification of batik motifs through computational methods, offering more precise and
efficient analysis. A notable approach to batik pattern recognition involves the use of the Scale
Invariant Feature Transform (SIFT) as a feature extraction method. This method is particularly useful
in addressing the challenging issues posed by the highly symmetrical and repetitive properties
inherent in many batik designs [3]. These characteristics make traditional pattern recognition methods
less effective, highlighting the need for sophisticated machine learning techniques. Numerous studies
have demonstrated the efficacy of machine learning in recognizing and classifying batik patterns. For
instance, one study compared the performance of the Naive Bayes method and K-Nearest Neighbors
(KNN) algorithm, revealing insights into their respective strengths and limitations in batik
classification [4]. Another significant contribution to the field involved the implementation of
feedforward neural networks (FNN) and algorithms such as treeval and treevit for classification tasks.
These approaches achieved accuracy levels of approximately 55% and 65%, respectively, in correctly
identifying different types of batik patterns [5]. Furthermore, the integration of the Scale Invariant
Feature Transform (SIFT) with a Support Vector Machine (SVM) classifier has been particularly
successful, achieving an impressive accuracy rate of 95% when categorizing batik patterns into four
http://sistemasi.ftik.unisi.ac.id
2082
Sistemasi: Jurnal Sistem Informasi ISSN:2302-8149
Volume 13, Nomor 5, 2024: 2082-2089 e-ISSN:2540-9719
distinct categories. This high level of accuracy underscores the potential of combining robust feature
extraction techniques with powerful machine learning algorithms [6].
2 Literature Review
The application of Convolutional Neural Networks (CNN) has seen widespread adoption across
various domains, particularly in the realm of deep learning, where their ability to analyze and classify
complex visual data has proven invaluable. CNN has become a cornerstone in the development of
sophisticated models for image recognition and pattern classification. In the context of batik design
recognition, CNN has been employed to address the challenges posed by the intricate and diverse
nature of batik motifs [7], [8], [9]. One notable study utilized CNN to accurately identify batik designs
from photographs. The dataset for this study was carefully curated, featuring batik motifs from three
culturally significant regions of Indonesia: Lasem, Solo, and Yogyakarta. These regions are renowned
for their rich batik heritage, each contributing unique stylistic elements to the broader batik tradition.
The dataset encompassed 13 distinct classes of batik motifs, representing a wide array of patterns and
designs. Despite the advanced capabilities of CNN, the experimental results from this study revealed
that the model's performance was inadequate for reliably detecting the majority of batik motifs within
the dataset. This outcome highlights the inherent complexity of batik pattern recognition, where even
state-of-the-art deep learning models can struggle to achieve high levels of accuracy [10].
In a separate study, CNN was employed to categorize motifs from Lombok Songket, Sasambo
batik [11], and West Java batik [12]. These studies demonstrated the versatility of CNN in handling
various types of traditional Indonesian textiles. The model developed for the Lombok Songket and
Sasambo batik motifs achieved an impressive accuracy of 93.66%, while the model for West Java
batik motifs attained an accuracy of 90%. These results underscore the effectiveness of CNN in
capturing the unique visual characteristics of different batik styles, even when dealing with highly
intricate and culturally significant patterns.
Further enhancing the performance of CNN in batik design recognition, another study
investigated the impact of training CNN models with enhanced data. The findings revealed that a
1.2% gain in performance could be achieved when the models were trained with augmented datasets
[13]. Data augmentation, which involves techniques such as rotation, scaling, and flipping of images,
helps to artificially increase the diversity of the training data, thereby improving the model's ability to
generalize to new, unseen data. Additionally, hyperparameter tuning, an optimization process that
adjusts the parameters governing the learning process, was identified as another effective strategy for
increasing the accuracy of CNN models in batik pattern recognition. These methods, when applied
judiciously, can significantly boost the performance of CNN models, making them more reliable for
practical applications [14].
CNN is highly proficient at extracting visual features due to their architecture's multitude of vital
characteristics. Convolutional layers are crucial for capturing spatial hierarchy by employing localized
filters to detect patterns such as edges and textures. These patterns are used in successive layers to
create more complex features. Pooling layers improve feature extraction by lowering the size of
feature maps while retaining significant features, hence introducing a level of translation invariance.
Furthermore, activation functions incorporate non-linear elements that enable the network to
comprehend complex patterns and relationships within the visual data. The convergence of these
characteristics makes CNNs a powerful tool for extracting important features from images, which is
crucial for various computer vision tasks [15]. In addition to these methods, we explored the use of
Convolutional Neural Networks (CNN) to extract intricate batik patterns. CNNs are particularly well-
suited for this task due to their ability to automatically learn hierarchical features from raw image
data. Following the pattern extraction, a hierarchical clustering method was employed to construct a
tree that visually represents the relationships between different batik motifs based on their area of
origin. This approach not only enhances the accuracy of batik pattern recognition, but also provides
valuable insights into the cultural and geographical connections among various batik designs
3 Research Method
The data and methodologies that we utilized in this research are going to be explained in this
section.
2.1. Dataset
http://sistemasi.ftik.unisi.ac.id
2083
Sistemasi: Jurnal Sistem Informasi ISSN:2302-8149
Volume 13, Nomor 5, 2024: 2082-2089 e-ISSN:2540-9719
We used 83 images which were collected manually from some sources.
Table 1. batik motifs and their areas of origin
No Batik Motif Number Place of Origin
1 Bomba 12 Central Sulawesi
2 Buah Pala 6 Maluku
3 Cengkeh Pala 10 Maluku
4 Lontara 23 South Sulawesi
5 Pattimura 10 Maluku
6 Siwalima 8 Maluku
7 Valiri 14 Central Sulawesi
Scikit-learn was used in this investigation to divide the dataset into eighty percent training data and
twenty percent test data. The random seed was set at forty-two. For the goal of ensuring
reproducibility, the setting of a random seed in machine learning is accomplished through the use of
the random_state function.
2.2. Proposed Method
This study involved the development of a Convolutional Neural Network (CNN) model for the
classification of batik motifs. The model was optimized using the Adam optimizer. Subsequently, we
utilized the model to extract the distinctive batik motifs characteristic. Next, we compute the distance
of each batik motif based on the retrieved features. At the very end of the process, we built a
relationship tree which is based on each batik motif feature distances.
Figure 1. Proposed method
2.2.1 CNN Model
A CNN is a more advanced form of artificial neural networks (ANN) that is mostly utilized for
extracting features from datasets arranged in a grid-like matrix format. For instance, in visual datasets
such as photographs or movies, data patterns have a significant impact. The architecture comprises
several layers, including the input layer, Convolutional layer, Pooling layer, and completely
connected layers [16].
Figure 2. Architecture of CNN
Based on this concept, we developed CNN model that consists of a pre-trained DenseNet121 as a
feature extractor, followed by global average pooling to reduce spatial dimensions, a dense layer for
learning higher-level representations, dropout for regularization, and a final dense layer for
classification. Details of the model can be seen at table 2.
Tabel 2. Architecture of CNN model
http://sistemasi.ftik.unisi.ac.id
2084
Sistemasi: Jurnal Sistem Informasi ISSN:2302-8149
Volume 13, Nomor 5, 2024: 2082-2089 e-ISSN:2540-9719
layer (type) Output Shape
densenet121(functional) (None, 4, 4, 1024)
global_average_pooling2d (None, 1024)
dense (Dense) (None, 512)
dropout(Dropout) (None, 512)
dense_1(Dense) (None, 7)
a. densenet121 (Functional):
This is a pre-trained DenseNet121 model used as a feature extractor. DenseNet121 is a deep
CNN model known for its dense connections between layers, which help improve gradient flow and
reduce the number of parameters. The output shape (None, 4, 4, 1024) indicates that it outputs a 4x4
feature map with 1024 channels. The "None" indicates the batch size is flexible.
b. global_average_pooling2d:
This layer performs global average pooling on the previous layer's output, converting the 4x4
spatial dimensions to a single value per feature map, resulting in a 1D tensor with 1024 features. This
reduces the spatial dimension and helps prevent overfitting.
c. dense (Dense):
This is a fully connected (dense) layer with 512 units. It takes the 1024 features from the
previous layer and applies a linear transformation followed by a non-linear activation function (not
specified in the table but typically ReLU).
d. dropout (Dropout):
This layer is a dropout layer with no parameters. Dropout is a regularization technique where a
fraction of input units is set to 0 at each update during training to prevent overfitting. The output
shape remains (None, 512) as dropout does not change the dimensions.
e. dense_1 (Dense):
This is the final fully connected layer with 7 units, corresponding to the number of output
classes. It applies a linear transformation to the 512 features from the previous layer, likely followed
by a softmax activation function to output probabilities for each class.
2.2.2 Feature Extraction Using CNN Model
As previously demonstrated, the dense layer is the final layer preceding the output layer in the design
of a convolutional neural network (CNN). Hence, we may assert that a thick layer is the component
employed to categorize incoming data into a specific class. In this study, we utilize the dense output
from a trained Convolutional Neural Network (CNN) model as a feature extractor.
2.2.3. Accuracy
We evaluate the model with formula
𝑁
1
𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = ∑ 1(𝑦̂𝑖 = 𝑦𝑖 )
𝑁
𝑖=1
Where:
N is the total number of predictions.
1(⋅) is the indicator function, which returns 1 if the condition inside is true, and 0 otherwise.
𝑦̂𝑖 is predicted value from the model while 𝑦𝑖 is the actual value.
2.2.4 Relationship Tree
Once the features matrix is created, we compute the euclidean distance between each batik motif
and the others using a distance formula.
𝑑 = √(𝑥2 − 𝑥1 )2 + (𝑦2 − y1 )2
Afterwards, we constructed a hierarchical structure of batik motifs based on their distance from each
other.
http://sistemasi.ftik.unisi.ac.id
2085
Sistemasi: Jurnal Sistem Informasi ISSN:2302-8149
Volume 13, Nomor 5, 2024: 2082-2089 e-ISSN:2540-9719
4 Results and Analysis
In this study we utilized several approaches with regard to the accuracy of their results. Among
these strategies is the utilization of a CNN both on its own and in conjunction with a variety of image
preprocessing techniques. The results are shown in Table 3.
Table 3. Accuracy of model developed
No Method Accuracy
1 CNN 88%
2 CNN + Canny 70%
3 CNN + Laplacian 65%
4 CNN + Sobel 71%
5 CNN + Unsharp Masking 82%
The accuracy of a model is a quantitative assessment of its ability to accurately classify data. The
data in this table is represented as a percentage. A larger percentage signifies superior performance.
The findings indicate that a CNN in isolation attained the best level of accuracy, reaching 88%. The
accuracy of the combination approach, using edge detection techniques such as Canny, Laplacian, and
Sobel, was lower than that of the standalone CNN. Nevertheless, the utilization of unsharp masking in
conjunction with the CNN resulted in an enhanced accuracy rate of 82%.
The diminished precision observed when integrating CNN with specific preprocessing
approaches, such as Canny, Laplacian, and Sobel, can be attributed to the inherent characteristics of
these methods. The Canny edge detection technique draws attention to the edges of the image, which
may result in the loss of some of the texture and fine information that the CNN relies on for accurate
classification. In a manner that is analogous, Laplacian edge detection draws attention to regions that
exhibit sudden changes in intensity. This can lead to the removal of significant visual features and
textures, which ultimately leads to a decrease in the performance of the CNN. The Sobel operator,
which is utilized for edge detection by computing the gradient of image intensity, results in a
reduction in the fine features of the picture, which therefore has a negative impact on the accuracy of
the CNN's classification.
On the other hand, when CNN and Unsharp Masking are combined, there is a reduction in
accuracy that is less severe, reaching a level of 82%. Unsharp Masking is a technique that ensures the
general texture of an image is maintained while simultaneously enhancing the clarity and definition of
edges and small details. CNN is able to produce more accurate predictions as a result of this, which
increases the exposure of important elements. Methods such as Unsharp Masking, which increase
vital qualities without causing a significant loss of information, can be useful, despite the fact that
edge detection procedures may have a severe impact on the performance of CNNs by removing
essential image details and textures.
http://sistemasi.ftik.unisi.ac.id
2086
Sistemasi: Jurnal Sistem Informasi ISSN:2302-8149
Volume 13, Nomor 5, 2024: 2082-2089 e-ISSN:2540-9719
Figure 3. Relationship tree of batik based on it’s motif
Figure 3 presents a tree diagram that visualizes the process of hierarchical clustering,
highlighting how different batik motifs are related to one another based on their similarities. The
diagram essentially maps out the clustering of various motifs, showing how closely or distantly they
are associated. Starting with the motifs Lontara and Valiri, the diagram indicates that these two motifs
share the closest relationship, as evidenced by their connection at the shortest distance on the tree.
This means that Lontara and Valiri are very similar to each other, possibly sharing common design
elements or stylistic features. The next significant cluster involves the motifs Buah Pala and Cengkeh
Pala. These two motifs are grouped closely together, indicating a strong link between them, similar to
the relationship observed between Lontara and Valiri. The short distance value in their connection
suggests that Buah Pala and Cengkeh Pala share a high degree of similarity.
As the clustering process continues, the motifs Lontara and Valiri, which have already been
clustered together, are then merged with the motif Siwalima. This merger forms a larger cluster,
signifying that while Siwalima is somewhat similar to Lontara and Valiri, it is not as closely related as
Lontara and Valiri are to each other. However, the moderate level of similarity allows for their
grouping into a larger cluster. A similar process occurs with the motifs Buah Pala and Cengkeh Pala,
which form their own distinct cluster. This cluster shares certain similarities with other motifs that are
subsequently clustered together, indicating that Buah Pala and Cengkeh Pala have unique
characteristics that set them apart, yet they still have some commonalities with other motifs. The motif
Bomba, however, joins the cluster that includes Siwalima, Lontara, and Valiri at a higher distance
value. This suggests that Bomba is more distantly related to these motifs, indicating that it shares
fewer similarities with them compared to how Lontara, Valiri, and Siwalima are related to each other.
Finally, the motif Pattimura has the most distant association with the cluster that includes Buah
Pala and Cengkeh Pala. Despite this distant relationship, the larger cluster that includes Bomba,
Siwalima, Lontara, and Valiri eventually connects with the cluster containing Pattimura, Buah Pala,
and Cengkeh Pala. This connection, although occurring at a higher distance value, shows that even
motifs with less direct similarity can still be linked through the hierarchical clustering process,
revealing the broader network of relationships among the motifs.
5 Conclusion
This research successfully demonstrated the capability of Convolutional Neural Networks (CNN)
in identifying and classifying regional batik motifs, achieving an accuracy of up to 88%. The study
revealed significant relationships between various batik patterns, highlighting both close and distant
connections in the hierarchical structure of these motifs. The findings align with the expectations set
http://sistemasi.ftik.unisi.ac.id
2087
Sistemasi: Jurnal Sistem Informasi ISSN:2302-8149
Volume 13, Nomor 5, 2024: 2082-2089 e-ISSN:2540-9719
out in the introduction, confirming the effectiveness of CNNs in cultural pattern recognition. Future
research could expand on these results by exploring other machine learning techniques or by applying
this methodology to a broader dataset, further enhancing the understanding and preservation of
cultural heritage
Acknowledgement
This research was supported by faculty of Mathematics and natural science, Tadulako University
Reference
[1] E. Steelyana, “Batik, A Beautiful Cultural Heritage that Preserve Culture and Supporteconomic
Development in Indonesia,” Binus Bus. Rev., vol. 3, no. 1, p. 116, May 2012, doi:
10.21512/bbr.v3i1.1288.
[2] L. S. Triandika, “The Uniqueness of Culture: Acculturation between Religion and Local Culture
on Indonesian Sumenep Batik Motifs,” Fikri J. Kaji. Agama Sos. Dan Budaya, vol. 8, no. 1, pp.
41–53, May 2023, doi: 10.25217/jf.v8i1.3180.
[3] I. Nurhaida, A. Noviyanto, R. Manurung, and A. M. Arymurthy, “Automatic Indonesian’s Batik
Pattern Recognition Using SIFT Approach,” Procedia Comput. Sci., vol. 59, pp. 567–576, 2015,
doi: 10.1016/j.procs.2015.07.547.
[4] A. A. Aldino, A. A. Mawy, and D. Darwis, “Comparison of k-nearest neighbor and Naïve Bayes
algorithm for identification of Lampung Batik siger and Sembagi motifs,” presented at the
International Conference On Engineering And Computer Science (ICECS) 2022: The Use of
Innovative Technology in Accelerating Problems Sustainable Development, Bandar Lampung
City, Indonesia, 2024, p. 030004. doi: 10.1063/5.0207292.
[5] A. H. Rangkuti, Z. E. Rasjid, and D. J. Santoso, “Batik Image Classification Using Treeval and
Treefit as Decision Tree Function in Optimizing Content Based Batik Image Retrieval,”
Procedia Comput. Sci., vol. 59, pp. 577–583, 2015, doi: 10.1016/j.procs.2015.07.551.
[6] M. A. Rasyidi and T. Bariyah, “Batik pattern recognition using convolutional neural network,”
Bull. Electr. Eng. Inform., vol. 9, no. 4, pp. 1430–1437, Aug. 2020, doi: 10.11591/eei.v9i4.2385.
[7] I. N. Switrayana, S. Hadi, and N. Sulistianingsih, “A Robust Gender Recognition System using
Convolutional Neural Network on Indonesian Speaker,” SISTEMASI, vol. 13, no. 3, p. 1008,
May 2024, doi: 10.32520/stmsi.v13i3.3698.
[8] F. N. Cahya, N. Hardi, D. Riana, and S. Hadiyanti, “Klasifikasi Penyakit Mata Menggunakan
Convolutional Neural Network (CNN),” SISTEMASI, vol. 10, no. 3, p. 618, Sep. 2021, doi:
10.32520/stmsi.v10i3.1248.
[9] M. Masparudin, I. Fitri, and S. Sumijan, “Development of Apple Fruit Classification System
using Convolutional Neural Network (CNN) MobileNet Architecture on Android Platform,”
SISTEMASI, vol. 13, no. 1, p. 230, Jan. 2024, doi: 10.32520/stmsi.v13i1.3533.
[10] J. Tristanto, J. Hendryli, and D. Erny Herwindiati, “Classification of Batik Motifs Using
Convolutional Neural Networks,” SSRN Electron. J., 2018, doi: 10.2139/ssrn.3258935.
[11] S. Ariessaputra, V. H. Vidiasari, S. M. A. Sasongko, B. Darmawan, and S. Nababan,
“Classification of Lombok Songket and Sasambo Batik Motifs Using the Convolution Neural
Network (CNN) Algorithm,” JOIV Int. J. Inform. Vis., vol. 8, no. 1, p. 38, Mar. 2024, doi:
10.62527/joiv.8.1.1386.
[12] F. Y. Tember and I. Najiyah, “Classification of West Java Batik Motifs Using Convolutional
http://sistemasi.ftik.unisi.ac.id
2088
Sistemasi: Jurnal Sistem Informasi ISSN:2302-8149
Volume 13, Nomor 5, 2024: 2082-2089 e-ISSN:2540-9719
Neural Network,” SISTEMASI, vol. 12, no. 2, p. 282, May 2023, doi:
10.32520/stmsi.v12i2.2259.
[13] D. G. T. Meranggi, N. Yudistira, and Y. A. Sari, “Batik Classification Using Convolutional
Neural Network with Data Improvements,” JOIV Int. J. Inform. Vis., vol. 6, no. 1, p. 6, Mar.
2022, doi: 10.30630/joiv.6.1.716.
[14] S. Auliaddina and T. Arifin, “Use of Augmentation Data and Hyperparameter Tuning in Batik
Type Classification using the CNN Model,” SISTEMASI, vol. 13, no. 1, p. 114, Jan. 2024, doi:
10.32520/stmsi.v13i1.3395.
[15] C. Szegedy et al., “Going deeper with convolutions,” in 2015 IEEE Conference on Computer
Vision and Pattern Recognition (CVPR), Boston, MA, USA: IEEE, Jun. 2015, pp. 1–9. doi:
10.1109/CVPR.2015.7298594.
[16] T. Guo, J. Dong, H. Li, and Y. Gao, “Simple convolutional neural network on image
classification,” in 2017 IEEE 2nd International Conference on Big Data Analysis (ICBDA)(,
Beijing, China: IEEE, Mar. 2017, pp. 721–724. doi: 10.1109/ICBDA.2017.8078730.
http://sistemasi.ftik.unisi.ac.id
2089