Advance Sustainable Science. Engineering and Technology (ASSET) Vol. No. January 2024, pp. 02401020-01 02401020-09 ISSN: 2715-4211 DOI: https://doi. org/10. 26877/asset. Yogyakarta Batik Image Classification Based on Convolutional Neural Network Indah Dwi Susanti*. Sri Winarno. Junta Zeniarja Universitas Dian Nuswantoro. Semarang 50131. Indonesia *indahdwis117777@gmail. Abstract. This paper studies the efficiency of identifying motifs and patterns in Yogyakarta batik using the Convolutional Neural Network (CNN) algorithm. This research uses the AlexNet architecture on CNN to increase the accuracy of batik image classification. Apart from that, it also involves the use of Canny edge detection techniques and feature extraction using the Gray Level Co-occurrence Matrix (GLCM) to improve the feature extraction process in batik images. There are 6 folders representing 6 types of motifs containing - 20 to 25 data that have been prepared for the training session. Next, the data is processed with 20% of the data used for training and 80% for testing. The accuracy of this research using the SGDM optimizer reached The evaluation results provide insight into the extent to which edge emphasis can improve the model's ability to recognize and classify batik patterns. It also presents classification test results and evaluation metrics such as precision, recall, and F1 score. Keywords: Batik Yogyakarta. Classification. CNN Algorithm. SGDM Optimizer (Received 2023-12-30. Accepted 2024-01-12. Available Online by 2024-01-. Introduction Batik is a traditional Indonesian cloth painting art that has special characteristics. As a testament to Indonesia's rich heritage. Yogyakarta Batik not only showcases artistic beauty but also conveys profound cultural meanings, weaving a tapestry that reflects the nation's artistic depth and historical richness. Batik making involves using a canting or other tool to apply wax to the fabric. Batik has various types, motifs and meanings. Batik motifs can vary, from traditional motifs to modern motifs adapted to the Yogyakarta Batik is a type of batik that has a special history and characteristics. This batik is characterized by dominant earth colors in its pattern . There are many types of Yogyakarta Batik patterns, but generally there are 6 types that are the most famous. These are the Kawung Batik. Parang Batik. Satrio Manah Batik. Sekar Jagad Batik. Sido Mukti Batik, and Truntum Batik. Yogyakarta Batik has high artistic and cultural value. The motifs often depict elements of Javanese culture and history, such as wayang, gardens, and images inspired by the surrounding environment. Yogyakarta Batik is an important part of Javanese culture and has beauty and deep meaning in each motif. Edge detection in digital image processing is an important technique for finding edges or boundaries between objects and backgrounds in images . Some commonly used edge detection techniques include the first gradient operators, such as Sobel. Canny. Prewitt, and Roberts, which calculate changes in image intensity in the vertical and horizontal directions . The main goal of edge detection is to highlight significant changes in the image, enabling further analysis such as object segmentation and pattern recognition. This edgedetection technique has an important role in various applications, including computer vision, medical image processing, and object detection. The AlexNet architecture is one of the important milestones in the development of deep learning and Convolutional Neural Networks (CNN). Created by Alex Krizhevsky. AlexNet won the ImageNet Large Scale Visual Recognition Challenge (ILSVRC) competition in 2012, which was the starting point for the great popularity of CNNs in image processing. AlexNet also introduced the use of ReLU (Rectified Linear Uni. as an activation, which helps overcome the problem of model training deep . In addition. AlexNet uses a dropout technique to reduce overfitting, which at that time was a significant innovation in deep learning. The AlexNet architecture proves that deep learning models can achieve excellent levels of accuracy in image classification, inspiring further developments in the fields of image recognition and visualization. The success of AlexNet laid the foundation for many more sophisticated and complex CNN architectures used in applications such as object detection, segmentation, and medical image analysis. Research on image classification of Yogyakarta Batik Cloth with edge detection using the Canny method and measurements with Convolutional Neural Network (CNN) based on the AlexNet architecture is an important effort in identifying motifs and patterns on batik efficiently . By applying this technology, batik images can be processed with high accuracy, enabling better motif recognition and reducing errors in the classification process. CNN-AlexNet, with its powerful feature extraction capabilities. , plays a crucial role in improving the accuracy of batik image classification, supporting the preservation of Yogyakarta batik culture through sophisticated digital analysis. Identifying motifs and patterns in Yogyakarta batik is crucial for preserving and understanding Indonesia's cultural legacy. Research in this realm not only safeguards traditional craftsmanship but also fosters cultural appreciation, enabling applications in heritage conservation, educational programs, and even inspiring contemporary art and fashion that respectfully incorporates these timeless motifs into the global discourse of design and creativity. In the context of batik motifs, where details and textures are very important. CNN can automatically identify complex patterns and features that may be difficult to extract by traditional methods. Methods Figure 1 shows a flowchart diagram that explains the process of image classification using deep learning. The diagram consists of 12 boxes with arrows connecting them, representing the steps in the process. The diagram shows the different layers and steps involved in the process, including resizing the image, converting it to grayscale, augmenting the data, splitting the data into training and testing sets, defining the CNN layers, training the network, and finally evaluating the accuracy of the classified result using a confusion matrix. The input image is loaded into the system, and then it is preprocessed by resizing it and converting it to grayscale. The data is then augmented to increase the size of the dataset, and then it is split into training and testing sets. The CNN layers are defined, and the network is trained using the training set. Finally, the accuracy of the classified result is evaluated using a confusion matrix. The CNN algorithm is widely used in image recognition, object detection, and segmentation tasks Figure 1. Proposed Method The flowchart you sent outlines the steps involved in processing an image through a Convolutional Neural Network (CNN). Each layer in the CNN architecture has a specific role, as follows: Load Image: This is the initial step where an image is loaded into the system for processing. Resize: The image is resized to a specific dimension . x227x3 in this cas. to ensure consistency in input data size. Sobel Edge Detection: This process identifies edges within the image, helping in feature Data Augmentation: Enhancing the dataset by creating modified versions of images, increasing dataset size and diversity. Splitting Data: The dataset is divided into testing and training sets. Here, 20% is used for testing and 80% for training. Testing: Evaluating the modelAos performance using the test data set. Classified Result: The outcome after testing, indicating how well the model classified images. Confusion Matrix: A table used to evaluate performance of classification algorithm, showing actual vs predicted classifications. Training Network: Process of adjusting weights and biases using training data to minimize error and improve accuracy. Define CNN Layers: Establishing layers like convolutional, pooling etc. , that make up neural network architecture. Deep CNN Learning : Refers to training deep Convolutional Neural Networks with multiple Dataset Datasets in research play an important role to classify images. A dataset is a curated collection of digital images along with associated labels that define an image's class or category. Success in image classification using the CNN algorithm is highly dependent on the quality, diversity and size of the data set used for training. Therefore, the dataset taken is open source with a file with an image extension jp. as in the Figure 3. To perform pattern tracking. Edge detection is first performed on the dataset at the edges of the image. And to expand the variety of existing training data, the dataset is further processed by applying augmentation. Figure 2. Batik Dataset Image augmentation is a technique used to increase the amount of training data in machine learning tasks, especially in image processing tasks. The use of Augmentation in this research includes random horizontal reflections in the image with a 50% probability of occurrence, random rotation of the image in the range of -10 to 10 degrees, shifting the image randomly horizontally in the range of -10 to 10 pixels, and shifting the image randomly in the vertical direction in the range -10 to 10 pixels. After that, the Dataset is being processed to the classification stage with the first process of grouping data based on species type. There are 6 folders containing - 20 to 25 data that have been prepared for the training session. Next, the data is processed with 20% of the data used for training and 80% for Figure 3. Sobel Edge Detection The picture above illustrates the preprocessing process, which involves resizing the data to a size of Subsequently, in the application of Sobel Edge Detection, the data must undergo the grayscale process first, or in other words, it is converted into a gray image to facilitate and enhance the accuracy of Sobel Edge Detection. CNN Convolutional Neural Network (CNN) is a special type of neural network architecture used primarily for image processing and computer vision tasks. It is designed to automatically learn and extract features from images using convolutional layers, pooling layers, and fully connected layers. CNN is widely used in various applications such as image classification, object detection, and image segmentation. CNN has several advantages over traditional machine learning algorithms, including the ability to learn and extract features automatically, handle large datasets, and achieve high accuracy in image recognition tasks. When compared with the latest models such as Resnet or GoogLeNet. Alexnet is a model that is not more deeper outperformer. But the plus side of this model is cheap computing than other. We know that, the flowchart of the Convolutional Neural Network (CNN) process, which is a deep learning algorithm used for image processing and analysis. The flowchart is a vertical list of steps that starts with the input layer at the top and ends with the output layer at the bottom. The steps in the flowchart are connected by blue lines with circles at each end and are labeled with text in black font. The flowchart shows the different layers and steps involved in the process, including Conv1. Pool1. Conv2. Pool2. Conv3. Pool3. Conv4. Pool4. Conv5. Pool5. FC1. FC2, and Output. The input layer receives the image data, and the output layer produces the final classification result. The intermediate layers perform various operations such as convolution, pooling, and fully connected layers to extract features from the input image. Canny Edge Detection Testing some of edge detection algorithms on batik datasets is an essential step in evaluating the impact of this technique on image classification. In this process, the batik dataset is carefully prepared, covering various types and design variations to represent the diversity of batik. Figure 4. Comparation some of Edge Detection Algorithms The Canny algorithm is considered superior in edge detection due to its combination of comprehensive and effective approaches. First. Canny smoothes the image using the Gaussian operator to reduce noise. Then, gradient detection is performed to find significant intensity changes. The next step is to reduce the edges using the non-maximum suppression method, which produces thin and accurate edges. Finally. Canny uses hysteresis thresholding to identify and connect significant edges. This combination of steps provides advantages in handling noise, producing sharp edges, and providing good parameter control, making it the algorithm of choice for edge detection in a wide range of imaging conditions. The use of Canny edge detection in processing batik datasets is important because this technique can improve the feature extraction process in images. By highlighting edges and sharp changes in images, edge detection helps Convolutional Neural Network (CNN) algorithms to understand structures and patterns that may be difficult to identify without special emphasis. Edge detection images tend to focus more on features that have semantic meaning, such as design details on batik, which is an important criterion in image classification. Another advantage is the improved generalization power, ensuring that the model is more robust to lighting and contrast variations. By emphasizing the main characteristics in a batik image, this technique helps overcome the challenge of variability in batik designs and patterns that may vary. Confusion Matrix Confusion matrix is a performance evaluation tool commonly used in classification and pattern recognition. The confusion matrix provides a detailed picture of how well a model can differentiate between different classes. It is usually used in the context of classification tasks, where a model tries to predict the class of a sample. The confusion matrix consists of four main parts: True Positive (TP): Representation of the number of samples that actually belong to the positive class and were predicted correctly by the model. True Negative (TN): Representation of the number of samples that actually belong to the negative class and were predicted correctly by the model. False Positive (FP): Representation of the number of samples that are actually included in the negative class, but predicted as positive class by the model. False Negative (FN): Representation of the number of samples that are actually included in the positive class, but predicted as negative class by the model. The confusion matrix is usually presented in a tabular form like this: Result and Discussion In this research, the CNN model was developed using an architecture that includes several layers, such as convolutional, pooling, and fully connected layers. Yogyakarta batik image data was used to train the model, and the resulting model was validated and tested on test data. It is hoped that the results of this research will increase understanding in identifying and categorizing Yogyakarta batik based on visual features and develop an efficient and accurate learning system for various applications in the field of batik design and production. Table 1. Training Run Result Optimizer Adam SGDM RMSProp 1st Trainig 2nd Training 3rd Training Average In the training process, there are three optimizers used being Adam. SGDM (Stochastic Gradient Descent with Momentu. , and RMSProp (Root Mean Square Propagatio. It uses momentum from SGD and scaling from RMSProp, making it computationally efficient and requiring only a little memory. SGDM is one of the most popular optimization algorithms in deep learning and is used even more than SGD. In this research. SGDM optimizer is considered to work well even with small resources thus considered effective and can replace traditional stochastic gradient algorithm. Based on the three optimizers compared with a minimum of three training runs to find the best optimizer to use, it is concluded that we will use SDGM as the optimizer with 86. 66% percentage of the accuracy. In the context of CNN Batik image classification, the performance of three general optimizers in Neural Networks Model training, namely Adam. Stochastic Gradient Descent with Momentum (SGDM), and RMSPROP, has been reviewed. There are various factors that can affect the performance differences between the optimizers. The characteristics of the dataset can be a key factor, with specific patterns that may be more compatible with certain optimization methods. Additionally, the convergence of the model can be affected by the size of the batch, which can also play a role in performance differences. Critical factors that can affect the performance of the optimizers include learning rate parameters, model structure, and weight initialization. Ultimately, the difference in performance between the optimizers can be caused by a unique combination of these factors, and empirical experiments are often necessary to find the optimizers that best suit the image classification task in the CNN algorithm. Table 2. Sample Result of Classification of Batik Yogyakarta Image Name Real Name Folder Name Batik Kawung Batik Kawung Batik Parang Batik Parang Batik Satrio Manah Batik Satrio Manah Batik Sekar Jagad Batik Kawung Batik Kawung Batik Parang Batik Parang Batik Satrio Manah Batik Satrio Manah Batik Sekar Jagad True / False Batik Sekar Jagad Batik Sido Mukti Batik Sido Mukti Batik Truntum Batik Truntum Batik Sekar Jagad Batik Sido Mukti Batik Sido Mukti Batik Truntum Batik Truntum Based on the classification tests conducted 12 times, the results show that the model demonstrates 100% This finding is further supported by accuracy tests, which report accuracy levels ranging from 70% to 100%. This proves that the application of CNN uses the SGDM optimizer with 436 total datasets that are owned and divided into 6 classes. Table 3. Result of Confusion Matrix Test 1 Test 2 Test 3 Test 4 Test 5 Precision Recall F1-Score 0,80 The aim of researching and classifying Yogyakarta batik using the CNN algorithm and ADAM optimizer is to develop a model that can be efficient and accurate in identifying and categorizing Yogyakarta batik based on visual features, such as motifs, colors and designs. In this research. CNN is used because it has the ability to identify local features in image data by utilizing convolution, pooling, and fully connected The ADAM optimizer is used to produce a model that can converge quickly and stably, which is important for achieving optimal solutions within limited learning time. Conclution The research paper effectively summarizes the key findings and their implications, highlighting the successful implementation of the Convolutional Neural Network (CNN) algorithm and Canny edge detection techniques to achieve 100% accuracy in identifying motifs and patterns in Yogyakarta batik The study emphasizes the cultural significance of Yogyakarta batik and the importance of preserving Indonesia's cultural legacy through advanced image processing techniques. Future research could explore the application of other edge detection algorithms in conjunction with CNN to further enhance feature extraction in batik images. Additionally, investigating the use of larger and more diverse datasets could provide a more comprehensive understanding of Yogyakarta batik patterns and motifs, leading to improved classification accuracy. The research underscores the ethical considerations related to cultural representation and biases in the It is essential for future studies to ensure the respectful and accurate representation of Indonesia's cultural heritage in image classification research. Additionally, efforts should be made to address any potential biases in the dataset to ensure fair and unbiased classification of Yogyakarta batik patterns. References