Previous Article in Journal
Air Quality Health Index and Discomfort Conditions in a Heatwave Episode During July 2024 in Rhodes Island
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Identifying Barong Tagalog Textile Using Convolutional Neural Network and Support Vector Machine with Structural Pattern Segmentation †

by
Jeff B. Totesora
,
Edward C. Torralba
and
Cyrel O. Manlises
*
School of Electrical, Electronics, and Computer Engineering, Mapua University, Manila 1002, Philippines
*
Author to whom correspondence should be addressed.
Presented at the 2024 IEEE 6th Eurasia Conference on IoT, Communication and Engineering, Yunlin, Taiwan, 15–17 November 2024.
Eng. Proc. 2025, 92(1), 2029; https://doi.org/10.3390/engproc2025092029 (registering DOI)
Published: 28 April 2025
(This article belongs to the Proceedings of 2024 IEEE 6th Eurasia Conference on IoT, Communication and Engineering)

Abstract

:
The Barong Tagalog is a formal attire traditionally worn by men for special occasions. Despite its cultural significance, distinguishing between the Cocoon silk, Jusi, and Piña-silk types of Philippine Barong Tagalog is challenging due to their similar colors. Although these textiles share similar hues, their patterns and textures differ significantly, leading to potential misidentification by individuals. To identify structural patterns in textile classification, machine learning was used. Especially convolutional neural networks (CNNs) and support vector machines (SVMs) were used. The system employed a Raspberry Pi (RPI) V4 as the microprocessor and an RPI Camera V2 for image capture. The system performance was validated involving 30 sample images per classification and an additional 30 unknown samples. The system correctly classified 64 out of 90 sample images with an accuracy of 71.1%. For evaluation, a confusion matrix was determined. By combining CNN V1 and SVM V2, the textile analysis using image processing was conducted precisely to identify Barong Tagalog textiles.

1. Introduction

The well-known national dress in the Philippines is the Barong Tagalog Textile. It is used on important occasions [1]. There are many types of Barong Tagalog Textiles, and each of them has different characteristics. The Barong Tagalog textiles are not easily distinguishable as it is not familiar to people. People who are involved in tailoring, family businesses, and the culture and tradition of Filipino Crafts are aware of Barong Tagalog Textile fabrics. In this study, we classify the different types of textiles of the Barong Tagalog Textile using image processing. For the identification of the fabric, style, pattern, design, and textile method were identified. The image was captured and analyzed using a neural network to recognize the fabric category.
Woven fabric patterns are differentiated as satin, twill, or plain by using a differential convolutional neural network (DCNN) [2]. The image processing method is used to transform the image into a digital format and extract information [3]. Once digitized, the image undergoes filtering, segmentation, and feature extraction, to isolate and enhance specific features [4]. The features are analyzed to extract information on patterns, shapes, or text [5]. Textile or fabric classification, defect detection, or pattern recognition are performed using the image processing method [6].
The physical aspects of Barong Tagalog textiles, specifically Piña-Silk, Jusi, and Cocoon silk, share similar characteristics in terms of color. While they often have similar colors, the patterns and fabric textures vary. These shared characteristics are used to identify the correct textile types. Different kinds of textiles are classified based on their differences. There are currently no studies on categorizing Barong Tagalog according to textiles and fabrics. Therefore, we used segmentation to discover unique traits of Jusi, Cocoon silk, and Piña-silk. Using the combination of segmentation, SVM, and CNN, different features of Barong Tagalog textiles were classified effectively.
We developed a system comprising the Raspberry Pi camera V2 to take JPG images of the Barong Tagalog textile. The system integrates CNN, SVM, and structural pattern segmentation. SVM was used for feature extraction, training, and testing, while CNN was utilized for the classification, processing, and segmentation of images. A confusion matrix was used to assess the accuracy of the system.
The fabric industry benefits from the result of this study as the developed system allows the fabric industry to produce high-quality fabrics and preserve cultural traditions. Individuals can use the system to identify and classify the types of Barong Tagalog textiles through the image process. A dataset was established in this study by gathering fabrics of Barong Tagalog textiles.

2. Methodology

A novel image-processing technique was developed to determine the weave of woven fabric. To maximize the system’s accuracy, we mixed support vector machines (SVMs) and CNNs [7]. Deep neural networks perform better than traditional methods such as SVM in classification or object detection, and SVM and deep learning enhance the system’s performance [8]. SVMs produce better results in detecting spot diseases on banana leaves [9], pineapple ripeness detection [10], and e-attendance checkers using facial recognition [11]. CNN is regarded as an ideal model for image processing owing to its high accuracy [12]. CNN is a deep learning method that excels at recognizing and categorizing objects in images because its multi-layer structure allows for easy feature extraction [13,14]. The captured images serve as input for image processing which is conducted to avoid irregularities and prevent poor-quality images. This process involves segmentation and structure pattern analysis [15,16]. The Raspberry Pi is mainly used as the central processing unit, being run on an operating system and software [17]. A camera module can be integrated with the Raspberry Pi to capture images or videos for various applications [18]. SD cards (Metro Manila, Philippines), which are non-volatile memory cards, are used to store the operating system, software, and data [19]. An LCD presents visual outputs on the graphical user interface or visual feedback [20] (Figure 1).
The Raspberry Pi 4 was used to process, test, and train the developed model in this study. The images of Barong Tagalog fabrics were captured using the RPI camera. The NoIR board V2 was equipped with an 8-megapixel Sony IMX219 sensor and a fixed-focus lens to capture high-definition videos and images. For training and testing, images were taken, and the PTRI’s dataset was used. The images were gathered from local stores. The collected 2500 images included 700 Cocoon silk, 700 Jusi, and 700 Piña-silk. 70% of the images were used for training and 30% for testing. Figure 2 illustrates the system’s operation framework.

System Flowchart

The system processes, filters, resizes, normalizes, and enhances Barong Tagalog images. After preprocessing, CNN was utilized for image segmentation and structure patterns. The processed images were used to train the model. SVM was used for classification and categorization. Finally, the system predicts a type of Barong Tagalog textile (Figure 3).
Figure 4 depicts the system’s configuration, where the prototype’s cabinet houses the Raspberry Pi, battery, and camera. The sample Barong textile was placed in the prototype’s drawer. Then, the camera captured images. The LCD was positioned at the top of the cabinet. The LCD and the camera were linked to the Raspberry Pi V4. The RPI camera captures images at a distance of at least 2 cm to ensure clear and focused pictures. Inside the drawer, there was lighting to provide adequate illumination.
The sample Barong Tagalog textile types used for classification are shown in Figure 5. The three types of Barong Tagalog were utilized to train the system model for accuracy. Each type is differently made in pattern, thread strands, and color. These distinct characteristics were crucial in enhancing the model’s performance.
Table 1 shows the data gathered. Cocoon silk, Jusi, and Piña-silk were included. 30 images were included in each textile category. A Raspberry Pi Camera V2 was used to take the images that were stored on an SD card.

3. Results and Discussion

Figure 6 displays the sample output of the system. The prediction showed an 86% accuracy in Jusi classification, matching the sample image loaded in the program. This shows that the program model can accurately assess and determine each classification’s features.
To compare the manual classification with the system classification generated by SVM-CNN, 30 images in each category were experimented with. Table 2 shows the confusion matrix of the system, which was used to check the accuracy of each fabric type and the performance of the model. For Cocoon silk, 19 were predicted correctly, while 11 were incorrect. For Jusi, all 30 classifications were predicted correctly. For Piña-silk, 25 were predicted correctly, and 5 were incorrect.
The confusion matrix was used to calculate the overall accuracy. Samples that were successfully sorted into correct categories are indicated by true positives (TP). True negatives (TNs) were those with a low accuracy but accurate classification. A sample that was mistakenly predicted correctly was a false positive (FP). False negatives (FN) were samples that were incorrectly classified as textiles but were not recognized as such.
Table 3 displays the results of the confusion matrix derived from 30 classifications. Out of 90 images, 64 were correctly predicted, while 26 were incorrect. There were 14 TP for Cocoon silk, 30 for Jusi, and 20 for Piña-Silk. Five true negatives (TN) were observed for Cocoon silk and Piña-Silk. Seven salse positives (FP) were determined for Cocoon silk and 1 for Piña-Silk. Finally, there were four false negatives (FN) for Cocoon silk and Piña-silk.
By dividing the total number of predictions by the number of TPs and multiplying the result by 100, the accuracy was calculated (1). The overall accuracy was 71.1% for the model.
A c c u r a c y = n = 1 3 A n n i = 1 j = 1 3 A i j

4. Conclusions and Recommendations

We developed a system for classifying Barong Tagalog textiles, specifically Jusi, Cocoon silk, and Pina-silk. CNN and SVM were employed for structural pattern recognition and segmentation. An RPI V4 was used as the microprocessor, and a Raspberry Pi Camera V2 was utilized for camera functions. The system successfully classified 64 out of 90 sample images, resulting in an overall accuracy of 71.1%. The system successfully classified Barong Tagalog textiles, specifically Jusi, Cocoon silk, and Piña-silk. The accuracy of the system and its model can be improved by utilizing CNN-SVM with a larger dataset of Barong Tagalog images. By incorporating a broader range of Barong Tagalog fabric types and more detailed features such as embroidery and specific components like the collar and cuffs, the accuracy can be improved. The entire garment can be classified rather than just the fabric by upgrading a camera module. Then, accuracy and yield can be improved significantly.

Author Contributions

Software development (programming), J.B.T.; research paper development (writing), J.B.T.; Hardware development (prototype creation), E.C.T.; research paper development (writing), E.C.T.; Research conceptualization (topic development), C.O.M.; paper editing (polishing and finalization), C.O.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

This study did not require ethical approval.

Informed Consent Statement

Not applicable.

Data Availability Statement

Barong Dataset.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Sorilla, F., IV. Barong Tagalog: The History of the Traditional Filipino Attire. Available online: https://www.tatlerasia.com/style/fashion/barong-tagalog-the-traditional-filipino-mens-attire (accessed on 28 October 2024).
  2. Hussain, M.A.I.; Khan, B.; Wang, Z.; Ding, S. Woven fabric pattern recognition and classification based on deep convolutional neural networks. Electronics 2020, 9, 1048. [Google Scholar] [CrossRef]
  3. Patil, S.S.; Gaikwad, V.T. Defect Detection in Fabric using Image Process Technique. Int. Res. J. Eng. Technol. 2008, 5, 904. [Google Scholar]
  4. Rani, N. Image Processing Techniques: A Review. J. Today’s Ideas—Tomorrow’s Technol. 2017, 5, 40–49. [Google Scholar] [CrossRef]
  5. Chowdhary, C.L.; Acharjya, D. Segmentation and feature extraction in Medical Imaging: A Systematic Review. Procedia Comput. Sci. 2020, 167, 26–36. [Google Scholar] [CrossRef]
  6. Ngan, H.Y.; Pang, G.K.; Yung, S.; Ng, M.K. Wavelet-based methods on patterned fabric defect detection. Pattern Recognit. 2005, 38, 559–576. [Google Scholar] [CrossRef]
  7. Fan, Z.; Mei, J.; Zhang, S.; Liu, M. Recognition of Woven Fabric based on Image Processing and Gabor Filters. In Proceedings of the 2017 IEEE 7th Annual International Conference on CYBER Technology in Automation, Control, and Intelligent Systems (CYBER), Honolulu, HI, USA, 31 July–4 August 2017. [Google Scholar]
  8. Liu, P.; Choo, K.-K.R.; Wang, L.; Huang, F. SVM or deep learning? A comparative study on remote sensing image classification. Soft Comput. 2017, 21, 7053–7065. [Google Scholar] [CrossRef]
  9. Tuazon, G.L.H.; Duran, H.M.; Villaverde, J.F. Portable Sigatoka Spot Disease Identifier on Banana Leaves Using Support Vector Machine. In Proceedings of the 2021 IEEE 13th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management (HNICEM), Manila, Philippines, 28–30 November 2021; pp. 1–6. [Google Scholar] [CrossRef]
  10. Aguilar, E.J.L.; Borromeo, G.K.P.; Villaverde, J.F. Determination of Pineapple Ripeness Using Support Vector Machine for Philippine Standards. In Proceedings of the 2021 7th International Conference on Control Science and Systems Engineering, ICCSSE 2021, Qingdao, China, 30 July–1 August 2021; pp. 283–287. [Google Scholar] [CrossRef]
  11. Arceo, A.J.C.; Borejon, R.Y.N.; Hortinela, M.C.R.; Ballado, A.H.; Paglinawan, A.C. Design of an e-attendance checker through facial recognition using histogram of oriented gradients with support vector machine. In Proceedings of the 2020 IEEE 8th International Conference on Smart City and Informatization, iSCI 2020, Guangzhou, China, 31 December 2020–1 January 2021; pp. 1–5. [Google Scholar] [CrossRef]
  12. Xin, R.; Zhang, J.; Shao, Y. Complex Network Classification with Convolutional Neural Network. Tsinghua Sci. Technol. 2020, 25, 447–457. [Google Scholar] [CrossRef]
  13. Sardogan, M.; Tuncer, A.; Ozen, Y. Plant Leaf Disease Detection and Classification Based on CNN with LVQ Algorithm. In Proceedings of the 2018 3rd International Conference on Computer Science and Engineering (UBMK), Sarajevo, Bosnia and Herzegovina, 20–23 September 2018; pp. 382–385. [Google Scholar] [CrossRef]
  14. Tenorio, A.; Desiderio, J.; Manlises, C. Classification of Rincon Romaine Lettuce Using convolutional neural networks (CNN). In Proceedings of the 2022 IEEE 14th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management (HNICEM), Boracay Island, Philippines, 1–4 December 2022; pp. 1–6. [Google Scholar] [CrossRef]
  15. Ibarra, N.C.; Rivera, M.P.; Manlises, C.O. Determination of Leaf Degradation Percentage for Banana leaves with Panama Disease Using Image Segmentation of Color Spaces and OpenCV. In Proceedings of the 2023 15th International Conference on Computer and Automation Engineering, ICCAE 2023, Sydney, Australia, 3–5 March 2023; pp. 269–275. [Google Scholar] [CrossRef]
  16. Legaspi, K.R.B.; Sison, N.W.S.; Villaverde, J.F. Detection and Classification of Whiteflies and Fruit Flies Using YOLO. In Proceedings of the 2021 13th International Conference on Computer and Automation Engineering, ICCAE 2021, Melbourne, Australia, 20–22 March 2021; pp. 1–4. [Google Scholar] [CrossRef]
  17. Balangue, R.D.; Padilla, C.D.M.; Linsangan, N.B.; Cruz, J.P.T.; Juanatas, R.A.; Juanatas, I.C. Ear Recognition for Ear Biometrics Using Integrated Image Processing Techniques via Raspberry Pi. In Proceedings of the 2022 IEEE 14th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management (HNICEM), Boracay Island, Philippines, 1–4 December 2022; pp. 1–6. [Google Scholar] [CrossRef]
  18. Desiderio, J.M.H.; Tenorio, A.J.F.; Manlises, C.O. Health Classification System of Romaine Lettuce Plants in Hydroponic Setup Using Convolutional Neural Networks (CNN). In Proceedings of the 4th IEEE International Conference on Artificial Intelligence in Engineering and Technology, IICAIET 2022, Kota Kinabalu, Malaysia, 13–15 September 2022; pp. 1–6. [Google Scholar] [CrossRef]
  19. Mateo, K.C.H.; Navarro, L.K.B.; Manlises, C.O. Identification of Macro-Nutrient Deficiency in Onion Leaves (Allium cepa L.) Using Convolutional Neural Network (CNN). In Proceedings of the 2022 5th International Seminar on Research of Information Technology and Intelligent Systems, ISRITI 2022, Yogyakarta, Indonesia, 8–9 December 2022; pp. 419–424. [Google Scholar] [CrossRef]
  20. Blonder, B.; Violle, C.; Bentley, L.P.; Enquist, B.J. Venation networks and the origin of the leaf economics spectrum. Ecol. Lett. 2011, 14, 91–100. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Hardware used in this study.
Figure 1. Hardware used in this study.
Engproc 92 02029 g001
Figure 2. Framework of this study.
Figure 2. Framework of this study.
Engproc 92 02029 g002
Figure 3. Operation flowchart.
Figure 3. Operation flowchart.
Engproc 92 02029 g003
Figure 4. Device setup.
Figure 4. Device setup.
Engproc 92 02029 g004
Figure 5. Types of Barong Tagalog.
Figure 5. Types of Barong Tagalog.
Engproc 92 02029 g005
Figure 6. Test result (Jusi).
Figure 6. Test result (Jusi).
Engproc 92 02029 g006
Table 1. Collected data.
Table 1. Collected data.
Barong Tagalog Fabric TypesNumber of Images
Cocoon30
Jusi30
Pina-Silk30
Table 2. Confusion matrix.
Table 2. Confusion matrix.
PREDICTED
CocoonJusiPina-Silk
ACTUALCocoon19110
Jusi0300
Pina-Silk5025
Table 3. Confusion matrix of predicted accuracy.
Table 3. Confusion matrix of predicted accuracy.
PREDICTEDTOTAL
TPTNFPFN
ACTUALCocoon1457430
Jusi3000030
Pina-Silk2051430
TOTAL64108890
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Totesora, J.B.; Torralba, E.C.; Manlises, C.O. Identifying Barong Tagalog Textile Using Convolutional Neural Network and Support Vector Machine with Structural Pattern Segmentation. Eng. Proc. 2025, 92, 2029. https://doi.org/10.3390/engproc2025092029

AMA Style

Totesora JB, Torralba EC, Manlises CO. Identifying Barong Tagalog Textile Using Convolutional Neural Network and Support Vector Machine with Structural Pattern Segmentation. Engineering Proceedings. 2025; 92(1):2029. https://doi.org/10.3390/engproc2025092029

Chicago/Turabian Style

Totesora, Jeff B., Edward C. Torralba, and Cyrel O. Manlises. 2025. "Identifying Barong Tagalog Textile Using Convolutional Neural Network and Support Vector Machine with Structural Pattern Segmentation" Engineering Proceedings 92, no. 1: 2029. https://doi.org/10.3390/engproc2025092029

APA Style

Totesora, J. B., Torralba, E. C., & Manlises, C. O. (2025). Identifying Barong Tagalog Textile Using Convolutional Neural Network and Support Vector Machine with Structural Pattern Segmentation. Engineering Proceedings, 92(1), 2029. https://doi.org/10.3390/engproc2025092029

Article Metrics

Back to TopTop