Models and means of clothing elements patterns classification using machine learning

2024;
: 37-47
https://doi.org/https://doi.org/10.23939/ujit2024.01.037
Received: April 22, 2024
Accepted: April 30, 2024

Цитування за ДСТУ: Теслюк В. М., Івасів С. С. Моделі та засоби класифікації патернів елементів одягу з використанням машинного навчання. Український журнал інформаційних технологій. 2024, т. 6, № 1. С. 37–47.
Citation APA: Teslyuk, V. M., & Ivasiv, S. S. (2024). Models and means of clothing elements patterns classification using machine learning. Ukrainian Journal of Information Technology, 6(1), 37–47. https://doi.org/10.23939/ujit2024.01.037

1
Lviv Polytechnic National University, Lviv, Ukraine
2
Lviv Polytechnic National University, Lviv, Ukraine

The task of pattern classification remains relevant in the fields of trends, style, fashion, personalization, manufacturing, and design. Research aimed at the design and development of models and means of classification of patterns of clothing elements using machine learning is highlighted. The study addresses a pertinent issue in computer vision, namely: increasing the efficiency of classification of patterns of clothing elements. The research was conducted with a proprietary dataset comprising 600 images. The following patterns are defined for classification: “checkered”, “dotted”, “vegetation/floral”, “print”, “solid”, “striped”. A convolutional neural network was developed using the Python programming language and deep learning frameworks Keras and TensorFlow. The scalable Keras-Tuner framework was used to optimize the hyperparameters of the developed network. The structure of the convolutional neural network includes an input layer, a feature extraction part, and a pattern type determination part. The architecture of the applied convolutional neural network is described. The CUDA Toolkit, the cuDNN library and the WSL layer are applied to train a convolutional neural network using a GPU, significantly speeding up the training process. Metrics including accuracy, precision, and recall were used to evaluate the developed convolutional neural network. The web application is developed in the Python programming language with the FastAPI framework. The web application has a described API for interacting with a convolutional neural network, and uses the Pillow (PIL) libraries for working with images and Rembg for image background removal. The user interface is developed in the JavaScript programming language with HTML, CSS and the React framework. The user interface is presented as an intuitive tool for interacting with the system. The developed software uses the modular principle, which allows for rapid modernization of the software. As a result of applying transfer learning, a testing accuracy of 93.33% was achieved, and with fine-tuning, the final version of the convolutional neural network for the classification of patterns of clothing elements with a test accuracy of 95% was obtained. The trained neural network was tested on new images of the specified types of patterns, examples for two patterns are given.

1. Zakaryan, V. (2022, June 17). AI Clothing Detection: Use Cases for Fashion and E-commerce. Retrieved from: https://postindustria.com/ai-clothing-detection-use-cases-for-fashion-and-e-commerce/

2. Wang, H. (2018, July 30). Rule-free sewing pattern adjustment with precision and efficiency. ACM Transactions on Graphics, 37, 1–13. https://doi.org/10.1145/3197517.3201320

3. Liu, L., Xu, X., Lin, Z., Liang, J., & Yan, S. (2023, December). Towards Garment Sewing Pattern Reconstruction from a Single Image. ACM Transactions on Graphics, 42(6), Article 200, 15 pages. https://doi.org/10.1145/3618319

4. Shen, Y., Liang, J., & Lin, M. (2020). GAN-Based Garment Generation Using Sewing Pattern Images. https://doi.org/10.1007/978-3-030-58523-5_14

5. Mehta, K., & Panda, S. P. (2022). Sentiment Analysis on E-Commerce Apparels using Convolutional Neural Network. International Journal of Computing, 21(2), 234-241. https://doi.org/10.47839/ijc.21.2.2592

6. El-Nahas, M. M. A. (2021). The Impact of Augmented Reality on Fashion and Textile Design Education. International Design Journal, 11(6), Article 3. https://doi.org/10.21608/idj.2021.204886

7. Jadhav, O., Patil, A., Sam, J., & Kiruthika, M. (2021). Virtual Dressing using Augmented Reality. ITM Web of Conferences, 40, 03028. https://doi.org/10.1051/itmconf/20214003028

8. Hussain, M. A. I., Khan, B., Wang, Z., & Ding, S. (2020). Woven Fabric Pattern Recognition and Classification Based on Deep Convolutional Neural Networks. Electronics, 9, 1048. https://doi.org/10.3390/electronics9061048

9. Birjuk, A. (2023, September 25). Unseen and unheard: The power of anti-surveillance clothing. Retrieved from: https://medium.com/@alinabirjuk/unseen-and-unheard-the-power-of-anti-surveillance-clothing-156570fefb0 e

10. Rajasekhar, K. E. (2020, August 21). Convolutional Neural Network. Retrieved from: https://developersbreach.com/convolution-neural-network-deep-learning/

11. JetBtains (n.d.). PyCharm – The Python IDE for Professional Developers. Retrieved from: https://www.jetbrains.com/pycharm/

12. Jupyter (n.d.). The Jupyter Notebook is a web-based interactive computing platform. Retrieved from: https://jupyter.org/

13. TensorFlow (n.d.). Create production-grade machine learning models with TensorFlow. Retrieved from: https://www.tensorflow.org/

14. Keras (n.d.). Keras – deep learning API. Retrieved from: https://keras.io

15. Nvidia (n.d.). CUDA Toolkit. Retrieved from: https://developer.nvidia.com/cuda-toolkit

16. Nvidia (n.d.). CUDA Deep Neural Network library. Retrieved from: https://developer.nvidia.com/cudnn

17. Loewen, C., Wojciakowski, M., & others. (2023, August 28). Windows Subsystem for Linux. Retrieved from: https://learn.microsoft.com/en-gb/windows/wsl/install

18. Sebastián Ramírez (n.d.). FastAPI framework, high performance, easy to learn, fast to code, ready for production. Retrieved from: https://fastapi.tiangolo.com/

19. Gatis, D. (2020). Rembg – a tool to remove images background. Retrieved from: 20.  Hunter, J. D. (2007). Matplotlib: A 2D graphics environment. Computing in Science & Engineering, 9(3), 90‑95. https://doi.org/10.1109/MCSE.2007.55

21.  Teslyuk, V. M., & Ivasiv, S. S. (2023). System for recognizing clothing items and their colors in an image. Ukrainian Journal of Information Technology, 5(2), 25‑32. https://doi.org/10.23939/ujit2023.02.025

22.  Stearns, L., Findlater, L., & Froehlich, J. E. (2018). Applying Transfer Learning to Recognize Clothing Patterns Using a Finger-Mounted Camera. In Proceedings of the 20th International ACM SIGACCESS Conference on Computers and Accessibility (ASSETS '18) (pp. 349‑351). Association for Computing Machinery. https://doi.org/10.1145/3234695.3241015

23.  Dey, E., Tawhid, M. N. A., & Shoyaib, M. (2015). An Automated System for Garment Texture Design Class Identification. Computers, 4, 265-282. https://doi.org/10.3390/computers4030265

24.  Chen, H., Gallagher, A., & Girod, B. (2012). Describing Clothing by Semantic Attributes. In 2012 IEEE Conference on Computer Vision and Pattern Recognition (pp. 609-623). https://doi.org/10.1007/978-3-642-33712-3_44

25.  Manfredi, M., Grana, C., Calderara, S., & et al. (2014). A complete system for garment segmentation and color classification. Machine Vision and Applications, 25, 955‑969. https://doi.org/10.1007/s00138-013-0580-3

26.  Islam, S. S., Dey, E. K., Tawhid, M. N. A., & Hossain, B. M. M. (2017). A CNN Based Approach for Garments Texture Design Classification. Advances in Technology Innovation, 2(4), 119‑125. Retrieved from: https://ojs.imeti.org/index.php/AITI/article/view/366

27.  Datagen (n.d.). Understanding VGG16: Concepts, Architecture, and Performance. Retrieved from: https://datagen.tech/guides/computer-vision/vgg16/

28.  Dr. Info Sec. (2021, March 6). VGG-19 Convolutional Neural Network. Retrieved from: https://blog.techcraft.org/vgg-19-convolutional-neural-network/

29.  Narein, A. T. (2021). Inception V3 Model Architecture. Retrieved from: https://iq.opengenus.org/inception-v3-model-architecture/#google_vignette

30.  Chollet, F. (2017). Xception: Deep Learning with Depthwise Separable Convolutions. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (pp. 1800-1807). Honolulu, HI, USA. https://doi.org/10.1109/CVPR.2017.195

31.  Datagen (n.d.). ResNet-50: The Basics and a Quick Tutorial. Retrieved from: https://datagen.tech/guides/computer-vision/resnet-50/

32.  O'Malley, T., Bursztein, E., Long, J., Chollet, F., Jin, H., Invernizzi, L., & others. (2019). KerasTuner. Retrieved from: https://github.com/keras-team/keras-tuner