Моделі та засоби класифікації патернів елементів одягу з використанням машинного навчання
Date
Journal Title
Journal ISSN
Volume Title
Publisher
Видавництво Львівської політехніки
Lviv Politechnic Publishing House
Lviv Politechnic Publishing House
Abstract
Завдання класифікації патернів не втрачає актуальності у сферах трендів, стилю, моди, персоналізації, виробництва та дизайну. Висвітлено дослідження, спрямоване на проєктування та розроблення моделей і засобів класифікації патернів елементів одягу із використанням машинного навчання. Воно вирішує актуальне питання комп’ютерного зору, а саме підвищення ефективності класифікації патернів елементів одягу. Дослідження виконано з власним набором даних, що містить 600 зображень. Для здійснення класифікації визначено такі патерни: “у клітинку”, “у крапку”, “рослинність / квітковий”, “принт”, “суцільний”, “у смужку”. За допомогою мови програмування Python і фреймворків глибокого навчання Keras та TensorFlow розроблено згорткову нейронну мережу. Використано масштабований фреймворк Keras-Tuner для оптимізації гіперпараметрів розробленої мережі. Структура згорткової нейронної мережі містить вхідну частину, частину визначення характерних ознак у зображенні та частину для визначення типу патерну. Описано архітектуру використаної згорткової нейронної мережі. Застосовано набір інструментів CUDA, бібліотеку cuDNN та прошарок WSL для навчання згорткової нейронної мережі за допомогою графічного процесора, що дало змогу істотно пришвидшити навчання згорткової нейронної мережі. Для оцінювання розробленої згорткової нейронної мережі використано метрики, які охоплюють точність, прогностичну значущість позитивного результату та повноту. Вебзастосунок розроблено мовою програмування Python із фреймворком FastAPI. Вебзастосунок має описаний прикладний програмний інтерфейс для взаємодії зі згортковою нейронною мережею, використано також бібліотеки Pillow (PIL) для роботи із зображеннями та Rembg для видалення фону зображення. Користувацький інтерфейс розроблено мовою програмування JavaScript із використанням мови розмітки, каскадних таблиць стилів та фреймворком React. Інтерфейс користувача представлено як інтуїтивний інструмент для взаємодії із системою. Розроблене програмне забезпечення використовує модульний принцип, що дає змогу швидко модернізувати програмний засіб. У результаті застосування підходу перенесення навчання досягнуто точність тестування 93,33 %, а з використанням підходу тонкого налаштування отримано остаточну версію згорткової нейронної мережі для класифікації патернів елементів одягу із точністю тестування 95 %. Навчену нейронну мережу апробовано на нових зображеннях визначених типів патернів, наведено приклади для двох патернів.
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.
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.
Description
Citation
Теслюк В. М. Моделі та засоби класифікації патернів елементів одягу з використанням машинного навчання / В. М. Теслюк, С. С. Івасів // Український журнал інформаційних технологій. — Львів : Видавництво Львівської політехніки, 2024. — Том 6. — № 1. — С. 37–47.