System for recognizing clothing items and their colors in an image
Authors:   Lviv Polytechnic National University, Lviv, Ukraine, Teslyuk V. M. , Ivasiv S. S. ,   Lviv Polytechnic National University, Lviv, Ukraine
Published: February 2024

The paper introduces a system for recognizing clothing items and their colors, developed using the Java programming language in the form of a web application, employing the Model-View-Controller (MVC) architecture. For development and project assembly convenience, the Gradle automatic build system was utilized. The system operates based on artificial neural network principles on the Clarifai platform, thoroughly examining the process of object detection in images and the system's real-world performance. InceptionV2 serves as the base model for image processing, incorporating the FPN technique to analyze images at different scales, resizing images up to 512 pixels, and training using stochastic gradient descent with hard negative mining. The system employs a median cut algorithm to determine the dominant color of clothing items. Determining the dominant color of each clothing item is done separately, with a focus on achieving 100 % recognition accuracy. An approach to determining the nearest color name based on the dominant color is implemented. This approach is based on calculating the Euclidean distance between two points in a three-dimensional space, iterating through 140 colors with RGB color model names to find the nearest color name. However, there are certain limitations in finding the nearest color name that result in a reduced accuracy of 60 %. The impact of various factors, such as lighting and image quality, is thoroughly examined in the context of their influence on the system's performance. The user interface is designed as an intuitive tool for interacting with the system, allowing users to check recognized clothing items and identified colors. Additionally, recommendations on basic color combinations that users can employ to enhance their clothing style are provided. The work includes an example of the system's application on a real image, visually demonstrating the results and describing the quality of clothing item and color recognition. One of the key features of the presented system is its flexibility and scalability. Recognition quality can be further improved through additional model training on larger datasets. The paper also addresses data processing and result analysis optimization. The novelty of the research results lies in the development of a comprehensive clothing item and color recognition system using artificial neural networks and the implementation of an approach to finding the nearest color with name. Completeness of the system refers to the entire image processing cycle within a single system, including clothing item location determination, clothing item classification, dominant color determination, and finding the nearest color with name for visual display to the user, along with providing basic color combinations for color correction or reassurance of color combinations' correctness. The practical significance of the research results lies in the development of the application's structure and algorithms, the software implementation of the system, which changes the approach to selecting and verifying color combinations. This approach provides users with clear color names, allowing them to create their own accurate color combinations for clothing sets or effectively search for clothing items online based on received colors. The system can also be used as a "data labeling" tool for preparing materials used in training machine learning models or neural networks. Future prospects include integration with other systems, expanding the image database to improve accuracy, and utilizing additional data sources to enhance the system's functionality.