ScienceDirect Available online at www.sciencedirect.com Procedia Computer Science 219 (2023) 724–735 1877-0509 © 2023 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the CENTERIS – International Conference on ENTERprise Information Systems / ProjMAN - International Conference on Project MANagement / HCist - International Conference on Health and Social Care Information Systems and Technologies 2022 10.1016/j.procs.2023.01.345 10.1016/j.procs.2023.01.345 1877-0509 Available online at www.sciencedirect.com ScienceDirect Procedia Computer Science 00 (2022) 000–000 www.elsevier.com/locate/procedia 1877-0509 © 2022 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the CENTERIS – International Conference on ENTERprise Information Systems / ProjMAN - International Conference on Project MANagement / HCist - International Conference on Health and Social Care Information Systems and Technologies 2022 CENTERIS – International Conference on ENTERprise Information Systems / ProjMAN – International Conference on Project MANagement / HCist – International Conference on Health and Social Care Information Systems and Technologies 2022 Footwear segmentation and recommendation supported by deep learning: an exploratory proposal João Oliveiraa, Rui Gomesb, Dibet Gonzaleza, Nuno Sousaa, Somayeh Shahrabadia, Miguel Guevarac, Maria José Ferreirad, Pedro Alvese, Emanuel Peresf, Luís Magalhãesg, Telmo Adãoa,g,* aCCG: Centre for Computer Graphics, Campus de Azurém, Edifício 14, 4800-058, Guimarães, Portugal. bMartins Sarmento High School, Alameda Prof. Abel Salazar, 4810-247, Guimarães, Portugal. cTechnology College, Polytechnic Institute of Setúbal, Campos do IPS, Estefanilha, 2914-761 Setúbal, Portugal. dPortuguese Footwear Technological Centre (CTCP), Rua de Fundões - Devesa Velha, 3700-121 S. João da Madeira, Portugal. eKyaia - Soluções Informáticas, Lda, Rua Abílio Lopes Das Neves, 593, 4805-214 - Guimarães. Portugal. fCITAB, University of Trás-os-Montes e Alto Douro, 5000-801 Vila Real, Portugal. gAlgoritmi Centre, University of Minho, Campus de Azurém, Av. da Universidade, 4800-058 Guimarães, Portugal. Abstract The management of an online footwear retail store - also known as marketplace - usually involves activities that directly or indirectly end up to interface with customers, wherein communication efficiency and effectiveness is crucially relevant. Critical factors concerning entities developing remote business in these areas or similar include: (i) production of appealing catalogues and (ii) digital tools to shorten the distance between customers and marketplaces. The former requires using specific third parties - often technically complex - to arrange and prepare photographic entries acquired in studio-like environments. This can delay the diffusion of products supply that may result in financial losses. The latter prevents the retailer of reaching critical mass at a higher potential. Considering such issues, this paper proposes a couple of modules for footwear marketplaces, powered by deep learning: one to segment shoes as a fully automatic background removal tool for easing and quickening catalogue creation activities in a backoffice perspective; and another to provide visual search services that allow a customer to submit photographs of footwear of interest to obtain recommendations of similar products directly retrieved from online retail databases, establishing another digital bridge * Corresponding author. E-mail address:
[email protected] 2 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 with potential buyers. Preliminary implementation and pilot tests point out Mask-RCNN as a promising approach for shoes segmentation. The same applies to ResNet101 and Xception, but for shoes recommendation, based on multi-label classification. © 2022 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the CENTERIS – International Conference on ENTERprise Information Systems / ProjMAN - International Conference on Project MANagement / HCist - International Conference on Health and Social Care Information Systems and Technologies 2022 Keywords: Footwear Marketplace; Digital Transformation; Deep Learning; Convolutional Neural Network; Segmentation; Multilabel Classification. 1. Introduction The management of an online footwear retail store (marketplace) usually involves activities that directly or indirectly interface the final client, wherein communication efficiency and effectiveness is a key-factor. Two major activities are in support of such management: on the one hand, the continuous updating of the online catalogues that can be consulted by the marketplace visitors; on the other hand, the establishment of tools of potential interest to be used by the customers that desire to rapidly obtain information in an increasingly more accurate and intuitive manner. The former involves time-consuming photograph treatment resorting to technically demanding tools to produce searchable inventory of male, female and children footwear, fitting several styles – including types, shapes, colours, formal/informal orientation – and commercialized by a wide universe of brands. The latter consists in earning competencies to dynamically assist the user in finding products within her/his profile of interests, following requirements that are no longer compliant with the traditional and dull query forms. Considering the aforementioned aspects, this work proposes an agnostic intelligent couple of modules, capable of being integrated with online stores’ platforms, based on deep learning (DL) strategies: • a fully automatic shoe background removal back-office tool for aiding in expeditious catalogue creation; • an image multi-classifier front-office tool, to enable footwear searching based on a digital picture acquired through, for example, a smartphone. With regard with the background removal module, DL segmentation algorithms, capable of predicting a fine-tuned mask to estimate the exact position of a shoe in a picture and, thus, be able of separating background from the element of interest, are employed. Also, a set of techniques for elaborating near-to reliable synthetic datasets are proposed, having in mind the scalability of the samples as well as conditions variability, to develop Convolutional Neural Network (CNN) models capable of dealing with a wide set of scenarios that, in spite of being learned from fabricated data, are capable of adjusting to solve segmentation challenges in authentic digital pictures of shoes for catalogue processing purposes. As for the multi-label classifier, the goal is to use DL to automatically profile digital shoes pictures and extract a set of labels that can be then submitted to a search engine at the marketplace side, which retrieves results that contextually match with the estimations made by the CNN model. In practice, this tool will interface more directly with the customer who can take a picture of a shoe within its range of interests, submit it to the marketplace platform that transparently uses the multi-label classifier CNN to extract profile tags. Then, it will use them to internally query business model database and finally, to retrieve similar results back to the submitter, at the distance of one or two clicks/taps. Both modules are being developed as black boxes that will be made available through REST endpoints for communication, ensuring two crucial aspects: (i) integration flexibility; and (ii) isolation of the communication details from the trained CNN models in use that can be upgraded anytime, without the need of temporarily shutting down the service for this kind of maintenance. Besides this introductory section, the rest of the paper is organized as follows: a first section will explore other works in related areas, with brief detail. After this, the following sections are centred on the conceptualization and implementations of this work: which methodologies were adopted, how did these concepts translate to the technical side and what results were achieved. 2 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 with potential buyers. Preliminary implementation and pilot tests point out Mask-RCNN as a promising approach for shoes segmentation. The same applies to ResNet101 and Xception, but for shoes recommendation, based on multi-label classification. © 2022 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the CENTERIS – International Conference on ENTERprise Information Systems / ProjMAN - International Conference on Project MANagement / HCist - International Conference on Health and Social Care Information Systems and Technologies 2022 Keywords: Footwear Marketplace; Digital Transformation; Deep Learning; Convolutional Neural Network; Segmentation; Multilabel Classification. 1. Introduction The management of an online footwear retail store (marketplace) usually involves activities that directly or indirectly interface the final client, wherein communication efficiency and effectiveness is a key-factor. Two major activities are in support of such management: on the one hand, the continuous updating of the online catalogues that can be consulted by the marketplace visitors; on the other hand, the establishment of tools of potential interest to be used by the customers that desire to rapidly obtain information in an increasingly more accurate and intuitive manner. The former involves time-consuming photograph treatment resorting to technically demanding tools to produce searchable inventory of male, female and children footwear, fitting several styles – including types, shapes, colours, formal/informal orientation – and commercialized by a wide universe of brands. The latter consists in earning competencies to dynamically assist the user in finding products within her/his profile of interests, following requirements that are no longer compliant with the traditional and dull query forms. Considering the aforementioned aspects, this work proposes an agnostic intelligent couple of modules, capable of being integrated with online stores’ platforms, based on deep learning (DL) strategies: • a fully automatic shoe background removal back-office tool for aiding in expeditious catalogue creation; • an image multi-classifier front-office tool, to enable footwear searching based on a digital picture acquired through, for example, a smartphone. With regard with the background removal module, DL segmentation algorithms, capable of predicting a fine-tuned mask to estimate the exact position of a shoe in a picture and, thus, be able of separating background from the element of interest, are employed. Also, a set of techniques for elaborating near-to reliable synthetic datasets are proposed, having in mind the scalability of the samples as well as conditions variability, to develop Convolutional Neural Network (CNN) models capable of dealing with a wide set of scenarios that, in spite of being learned from fabricated data, are capable of adjusting to solve segmentation challenges in authentic digital pictures of shoes for catalogue processing purposes. As for the multi-label classifier, the goal is to use DL to automatically profile digital shoes pictures and extract a set of labels that can be then submitted to a search engine at the marketplace side, which retrieves results that contextually match with the estimations made by the CNN model. In practice, this tool will interface more directly with the customer who can take a picture of a shoe within its range of interests, submit it to the marketplace platform that transparently uses the multi-label classifier CNN to extract profile tags. Then, it will use them to internally query business model database and finally, to retrieve similar results back to the submitter, at the distance of one or two clicks/taps. Both modules are being developed as black boxes that will be made available through REST endpoints for communication, ensuring two crucial aspects: (i) integration flexibility; and (ii) isolation of the communication details from the trained CNN models in use that can be upgraded anytime, without the need of temporarily shutting down the service for this kind of maintenance. Besides this introductory section, the rest of the paper is organized as follows: a first section will explore other works in related areas, with brief detail. After this, the following sections are centred on the conceptualization and implementations of this work: which methodologies were adopted, how did these concepts translate to the technical side and what results were achieved.
João Oliveira et al. / Procedia Computer Science 219 (2023) 724–735 725 Available online at www.sciencedirect.com ScienceDirect Procedia Computer Science 00 (2022) 000–000 www.elsevier.com/locate/procedia 1877-0509 © 2022 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the CENTERIS – International Conference on ENTERprise Information Systems / ProjMAN - International Conference on Project MANagement / HCist - International Conference on Health and Social Care Information Systems and Technologies 2022 CENTERIS – International Conference on ENTERprise Information Systems / ProjMAN – International Conference on Project MANagement / HCist – International Conference on Health and Social Care Information Systems and Technologies 2022 Footwear segmentation and recommendation supported by deep learning: an exploratory proposal João Oliveiraa, Rui Gomesb, Dibet Gonzaleza, Nuno Sousaa, Somayeh Shahrabadia, Miguel Guevarac, Maria José Ferreirad, Pedro Alvese, Emanuel Peresf, Luís Magalhãesg, Telmo Adãoa,g,* aCCG: Centre for Computer Graphics, Campus de Azurém, Edifício 14, 4800-058, Guimarães, Portugal. bMartins Sarmento High School, Alameda Prof. Abel Salazar, 4810-247, Guimarães, Portugal. cTechnology College, Polytechnic Institute of Setúbal, Campos do IPS, Estefanilha, 2914-761 Setúbal, Portugal. dPortuguese Footwear Technological Centre (CTCP), Rua de Fundões - Devesa Velha, 3700-121 S. João da Madeira, Portugal. eKyaia - Soluções Informáticas, Lda, Rua Abílio Lopes Das Neves, 593, 4805-214 - Guimarães. Portugal. fCITAB, University of Trás-os-Montes e Alto Douro, 5000-801 Vila Real, Portugal. gAlgoritmi Centre, University of Minho, Campus de Azurém, Av. da Universidade, 4800-058 Guimarães, Portugal. Abstract The management of an online footwear retail store - also known as marketplace - usually involves activities that directly or indirectly end up to interface with customers, wherein communication efficiency and effectiveness is crucially relevant. Critical factors concerning entities developing remote business in these areas or similar include: (i) production of appealing catalogues and (ii) digital tools to shorten the distance between customers and marketplaces. The former requires using specific third parties - often technically complex - to arrange and prepare photographic entries acquired in studio-like environments. This can delay the diffusion of products supply that may result in financial losses. The latter prevents the retailer of reaching critical mass at a higher potential. Considering such issues, this paper proposes a couple of modules for footwear marketplaces, powered by deep learning: one to segment shoes as a fully automatic background removal tool for easing and quickening catalogue creation activities in a backoffice perspective; and another to provide visual search services that allow a customer to submit photographs of footwear of interest to obtain recommendations of similar products directly retrieved from online retail databases, establishing another digital bridge * Corresponding author. E-mail address:
[email protected] 2 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 with potential buyers. Preliminary implementation and pilot tests point out Mask-RCNN as a promising approach for shoes segmentation. The same applies to ResNet101 and Xception, but for shoes recommendation, based on multi-label classification. © 2022 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the CENTERIS – International Conference on ENTERprise Information Systems / ProjMAN - International Conference on Project MANagement / HCist - International Conference on Health and Social Care Information Systems and Technologies 2022 Keywords: Footwear Marketplace; Digital Transformation; Deep Learning; Convolutional Neural Network; Segmentation; Multilabel Classification. 1. Introduction The management of an online footwear retail store (marketplace) usually involves activities that directly or indirectly interface the final client, wherein communication efficiency and effectiveness is a key-factor. Two major activities are in support of such management: on the one hand, the continuous updating of the online catalogues that can be consulted by the marketplace visitors; on the other hand, the establishment of tools of potential interest to be used by the customers that desire to rapidly obtain information in an increasingly more accurate and intuitive manner. The former involves time-consuming photograph treatment resorting to technically demanding tools to produce searchable inventory of male, female and children footwear, fitting several styles – including types, shapes, colours, formal/informal orientation – and commercialized by a wide universe of brands. The latter consists in earning competencies to dynamically assist the user in finding products within her/his profile of interests, following requirements that are no longer compliant with the traditional and dull query forms. Considering the aforementioned aspects, this work proposes an agnostic intelligent couple of modules, capable of being integrated with online stores’ platforms, based on deep learning (DL) strategies: • a fully automatic shoe background removal back-office tool for aiding in expeditious catalogue creation; • an image multi-classifier front-office tool, to enable footwear searching based on a digital picture acquired through, for example, a smartphone. With regard with the background removal module, DL segmentation algorithms, capable of predicting a fine-tuned mask to estimate the exact position of a shoe in a picture and, thus, be able of separating background from the element of interest, are employed. Also, a set of techniques for elaborating near-to reliable synthetic datasets are proposed, having in mind the scalability of the samples as well as conditions variability, to develop Convolutional Neural Network (CNN) models capable of dealing with a wide set of scenarios that, in spite of being learned from fabricated data, are capable of adjusting to solve segmentation challenges in authentic digital pictures of shoes for catalogue processing purposes. As for the multi-label classifier, the goal is to use DL to automatically profile digital shoes pictures and extract a set of labels that can be then submitted to a search engine at the marketplace side, which retrieves results that contextually match with the estimations made by the CNN model. In practice, this tool will interface more directly with the customer who can take a picture of a shoe within its range of interests, submit it to the marketplace platform that transparently uses the multi-label classifier CNN to extract profile tags. Then, it will use them to internally query business model database and finally, to retrieve similar results back to the submitter, at the distance of one or two clicks/taps. Both modules are being developed as black boxes that will be made available through REST endpoints for communication, ensuring two crucial aspects: (i) integration flexibility; and (ii) isolation of the communication details from the trained CNN models in use that can be upgraded anytime, without the need of temporarily shutting down the service for this kind of maintenance. Besides this introductory section, the rest of the paper is organized as follows: a first section will explore other works in related areas, with brief detail. After this, the following sections are centred on the conceptualization and implementations of this work: which methodologies were adopted, how did these concepts translate to the technical side and what results were achieved. 2 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 with potential buyers. Preliminary implementation and pilot tests point out Mask-RCNN as a promising approach for shoes segmentation. The same applies to ResNet101 and Xception, but for shoes recommendation, based on multi-label classification. © 2022 The Authors. Published by ELSEVIER B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the CENTERIS – International Conference on ENTERprise Information Systems / ProjMAN - International Conference on Project MANagement / HCist - International Conference on Health and Social Care Information Systems and Technologies 2022 Keywords: Footwear Marketplace; Digital Transformation; Deep Learning; Convolutional Neural Network; Segmentation; Multilabel Classification. 1. Introduction The management of an online footwear retail store (marketplace) usually involves activities that directly or indirectly interface the final client, wherein communication efficiency and effectiveness is a key-factor. Two major activities are in support of such management: on the one hand, the continuous updating of the online catalogues that can be consulted by the marketplace visitors; on the other hand, the establishment of tools of potential interest to be used by the customers that desire to rapidly obtain information in an increasingly more accurate and intuitive manner. The former involves time-consuming photograph treatment resorting to technically demanding tools to produce searchable inventory of male, female and children footwear, fitting several styles – including types, shapes, colours, formal/informal orientation – and commercialized by a wide universe of brands. The latter consists in earning competencies to dynamically assist the user in finding products within her/his profile of interests, following requirements that are no longer compliant with the traditional and dull query forms. Considering the aforementioned aspects, this work proposes an agnostic intelligent couple of modules, capable of being integrated with online stores’ platforms, based on deep learning (DL) strategies: • a fully automatic shoe background removal back-office tool for aiding in expeditious catalogue creation; • an image multi-classifier front-office tool, to enable footwear searching based on a digital picture acquired through, for example, a smartphone. With regard with the background removal module, DL segmentation algorithms, capable of predicting a fine-tuned mask to estimate the exact position of a shoe in a picture and, thus, be able of separating background from the element of interest, are employed. Also, a set of techniques for elaborating near-to reliable synthetic datasets are proposed, having in mind the scalability of the samples as well as conditions variability, to develop Convolutional Neural Network (CNN) models capable of dealing with a wide set of scenarios that, in spite of being learned from fabricated data, are capable of adjusting to solve segmentation challenges in authentic digital pictures of shoes for catalogue processing purposes. As for the multi-label classifier, the goal is to use DL to automatically profile digital shoes pictures and extract a set of labels that can be then submitted to a search engine at the marketplace side, which retrieves results that contextually match with the estimations made by the CNN model. In practice, this tool will interface more directly with the customer who can take a picture of a shoe within its range of interests, submit it to the marketplace platform that transparently uses the multi-label classifier CNN to extract profile tags. Then, it will use them to internally query business model database and finally, to retrieve similar results back to the submitter, at the distance of one or two clicks/taps. Both modules are being developed as black boxes that will be made available through REST endpoints for communication, ensuring two crucial aspects: (i) integration flexibility; and (ii) isolation of the communication details from the trained CNN models in use that can be upgraded anytime, without the need of temporarily shutting down the service for this kind of maintenance. Besides this introductory section, the rest of the paper is organized as follows: a first section will explore other works in related areas, with brief detail. After this, the following sections are centred on the conceptualization and implementations of this work: which methodologies were adopted, how did these concepts translate to the technical side and what results were achieved. © 2023 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0) Peer-review under responsibility of the scientific committee of the CENTERIS – International Conference on ENTERprise Information Systems / ProjMAN - International Conference on Project MANagement / HCist - International Conference on Health and Social Care Information Systems and Technologies 2022
726 João Oliveira et al. / Procedia Computer Science 219 (2023) 724–735 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 3 2. Related Work The research made into the subject of DL was revealed to be specific enough to make it notably difficult to find works on this specific area. Though the existence of diverse implementation proposals of DL applied for several stages of general fashion life-cycle, a considerable part of the works dedicated to footwear focuses on gait analysis [21][22] and even forensic database building [20]. Notwithstanding, the following sections will compile some of the DL-based approaches that can be applied to the creation and manufacturing of footwear. 1.1. Deep Learning for Footwear Production and Distribution Considering the above-mentioned relative lack of dedicated DL applications to footwear manufacturing, a closer analysis on the manufacturing of footwear’ various components will entail a richer and more focused set of results. Jung [1] investigated the possibilities of using machine learning (ML) to perform quality predictions on the Injection Molding industry, used for certain types of footwear. Eight ML algorithms were compared in three groups: math regression-based, tree-based and auto-encoder-based. It was concluded that ML models are majorly useful for quality predictions, presenting the auto-encoder model as it outperforms with regard with accuracy and F1-score. Kaspar [2] proposes a ML solution for the automatic inferring of knitting instructions for industrial knitting machines (used for the manufacturing of shoes, among other things) using just photographic images of the desired patterns. As for retail and distribution, an important step is the online catalogues organization, a task that may prove particularly challenging when tackled manually. When comparing CNNs and Gradient-Boosted Trees, Das et al. [3] investigated applications in product (namely shoes) taxonomy classification, concluding that the former achieved more accurate results than the latter in two of the three tested datasets. 1.2. Deep Learning for Shoes Segmentation Cheng, W., et al [4] proposed a survey gathering a set of works revolving computer vision applied to fashion detection. Various photo-graphical datasets were evaluated from which two were selected (DeepFashion-C [18] and Fashion Landmark Dataset [19]), to test four CNNs. Each one could segment the various items present in the provided images, including the footwear. Within the same work, clothing analysis datasets were compared with the usage of an additional layer that categorizes them according to labels such as “dress” or “pants”, which requires a higher judgment level based on clothing-related semantics. The “Look Into Person” dataset (LIP) is highlighted as the most comprehensive one with over 50,000 labelled images with 19 semantic labels captured within a variety of factors, such as the background complexity and points of view. Regarding CNN models for this purpose, the literature revision highlights a few such as the Nested Adversarial Network, which contains three networks similar to Generative Adversarial Networks (GANs) that learn together on a point-by-point training as well as a Pair Grouping Network (PGN) that is capable of handling multi-person human parsing in an image in a single pass, allowing semantic part segmentation for each person-instance identifying, among others, their right and left shoes. A semantic locality-aware deformable network was proposed by Ji, W. et al [5], which uses data provided by the various structures associated to clothing images, such as rigidity - differing according to the fabric of the article at stake. This approach is shown to improve the learning process by providing more precise associations even with smaller sample sizes. Inácio, A and Lopes, H. [6] proposed a clothing segmentation structure, Efficient Pyramidal Network (EPNYNET), na EfficientNet-based model, with an architecture derived from Pyramidal Resource Networks. The images are initially pre-processed, cropping out the area correspondent to the person as well as the background around them. Next, a new crop is applied through the EPYNET structure, which returns a probability map resulting from two additional post-processing operations to obtain the final segmentation mask. UTFPR-SBD3 dataset is also introduced, consisting of 4,500 manually annotated images for 18 object classes, including footwear. This dataset is openly available for third-party usage. Mask-based Neural Networks was also explored by Yu Liu, et al [8], who combined colour recognition and border detection algorithms along with Deep Neural Networks for a segmentation approach which, after testing, proved that Deep-Neural Network classification is in fact, an effective methodology. 4 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 1.3. Deep Learning for Fashion (Footwear included) Recommendation Within the current era of e-commerce, manufacturers and resellers seek innovative ways to approach their target audience and customers, by tracing their tastes/needs profiles that aim to deliver unique and personalized purchase experiences. Aligned with this topic, a series of research works are presented as follows. A probabilistic model is proposed in [9] - having its factorization conducted via CNN -, which uses the shape of the item to deduce recommendations. Tests made to the model resorted to a dataset constituted by Amazon search results for “footwear” and “jewellery” and concluded that the usage of the shape properties of the items help to improve the precision of clothing article recommendation systems. In an effort to modernize the retail industry, a system was created to categorize a dataset of 13000 men footwear articles through shape (silhouette), colour (through the comparison of L*a*b colour conversion scores) and texture (through histogram quantization with Local Binary Patterns). The resulting algorithm managed to successfully recommend footwear with 90% accuracy regarding shape, 84.03% regarding colour and 85.97% regarding textures. However, the authors highlight the relative limitation resulting from the training dataset (composed of catalogue images), which could compromise accuracy with input images with low quality or weak illumination [10]. In the already mentioned survey of Cheng, W. et al [4], beyond the most basic fashion segmentation synthesis, reported works also aim at item recommendation applied to fashion e-commerce (and, by association, footwear). One of the problems posed is the current state of product advertising and cataloguing is, in large part, based on embellished photographs captured in ideal, studio conditions. In the interest of customer satisfaction, a prototype was developed to find a clothing article from an image, which makes use of a three-front approach: two DL methods and a third one focused on learning the differences between street and store environments [11]. After several additional advances on this specific area, not only has it been made possible the identification of clothing articles through provided images, but also to associate textual search parameters manipulating the retrieval of articles similar to the ones used for querying. AY Betul, Z Koyun [12] created an image recommendation system for e-commerce through the usage of a GAN to evaluate an image and return a set of other similar ones. In comparison to similar-purposed models, this one is reported as superior in both speed and precision when used with the UT-Zappos50k [16, 17] dataset (consisting in several catalogue images of footwear). This way, the proposed model might be ideal for a footwear classificationspecific implementation. On the consumer’s side, AS Sheikh et al. [13] developed Size and Fit Network (Sfnet): a DL system that helps on the recommendation of clothing and footwear. This method combines content-based with collaboration-based modelling techniques to learn from both direct inputs and latent user representations. Khosla, N. e Venjataraman, V. [15] explore three different CNNs for footwear identification and classification: ViggyNet Small, ViggyNet Large and VGGNet. With an overall precision of 75.6%, VGGNet proved to be superior to the other two. However, the authors noted that is the low quality of labelling and organization present on the used dataset UT-Zappos50K - the most used footwear image dataset for DL but also one whose overall lack of visual variety revealed problematic for other studies as well [14] -, which created the need to gather a dedicated dataset. In this paper, modern Artificial Intelligence techniques will be explored with twofold goals: (i) to perform shoe segmentation to enable a more expeditious and intuitive catalogue production at the back-office side; and (ii) to provide customers with visual searching tools for footwear recommendation, in a front-office perspective. Both goals will be materialized in modules that based on the use of REST services can promote integration at the marketplace side. The necessity for the development of such modules was identified through contact with a Portuguese marketplace company - Overcube (https://pt.overcube.com/) – with whom several interactions have been occurring to define a set of related requirements and, thereby, develop a suitable but yet flexible solution. Eventually, these needs ended up for being common to a wide set of entities lying upon the same business model. The following sections will address some of the outcomes resulting from this study. 3. Proposal of footwear modules for segmentation and recommendation Considering the aforementioned needs associated with footwear marketplaces, a module that makes available an automation process for removing background from digital photographs of shoes to dynamize catalogue production is proposed in this section. Moreover, a second module to provide recommendations based on a digital photograph as
João Oliveira et al. / Procedia Computer Science 219 (2023) 724–735 727 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 3 2. Related Work The research made into the subject of DL was revealed to be specific enough to make it notably difficult to find works on this specific area. Though the existence of diverse implementation proposals of DL applied for several stages of general fashion life-cycle, a considerable part of the works dedicated to footwear focuses on gait analysis [21][22] and even forensic database building [20]. Notwithstanding, the following sections will compile some of the DL-based approaches that can be applied to the creation and manufacturing of footwear. 1.1. Deep Learning for Footwear Production and Distribution Considering the above-mentioned relative lack of dedicated DL applications to footwear manufacturing, a closer analysis on the manufacturing of footwear’ various components will entail a richer and more focused set of results. Jung [1] investigated the possibilities of using machine learning (ML) to perform quality predictions on the Injection Molding industry, used for certain types of footwear. Eight ML algorithms were compared in three groups: math regression-based, tree-based and auto-encoder-based. It was concluded that ML models are majorly useful for quality predictions, presenting the auto-encoder model as it outperforms with regard with accuracy and F1-score. Kaspar [2] proposes a ML solution for the automatic inferring of knitting instructions for industrial knitting machines (used for the manufacturing of shoes, among other things) using just photographic images of the desired patterns. As for retail and distribution, an important step is the online catalogues organization, a task that may prove particularly challenging when tackled manually. When comparing CNNs and Gradient-Boosted Trees, Das et al. [3] investigated applications in product (namely shoes) taxonomy classification, concluding that the former achieved more accurate results than the latter in two of the three tested datasets. 1.2. Deep Learning for Shoes Segmentation Cheng, W., et al [4] proposed a survey gathering a set of works revolving computer vision applied to fashion detection. Various photo-graphical datasets were evaluated from which two were selected (DeepFashion-C [18] and Fashion Landmark Dataset [19]), to test four CNNs. Each one could segment the various items present in the provided images, including the footwear. Within the same work, clothing analysis datasets were compared with the usage of an additional layer that categorizes them according to labels such as “dress” or “pants”, which requires a higher judgment level based on clothing-related semantics. The “Look Into Person” dataset (LIP) is highlighted as the most comprehensive one with over 50,000 labelled images with 19 semantic labels captured within a variety of factors, such as the background complexity and points of view. Regarding CNN models for this purpose, the literature revision highlights a few such as the Nested Adversarial Network, which contains three networks similar to Generative Adversarial Networks (GANs) that learn together on a point-by-point training as well as a Pair Grouping Network (PGN) that is capable of handling multi-person human parsing in an image in a single pass, allowing semantic part segmentation for each person-instance identifying, among others, their right and left shoes. A semantic locality-aware deformable network was proposed by Ji, W. et al [5], which uses data provided by the various structures associated to clothing images, such as rigidity - differing according to the fabric of the article at stake. This approach is shown to improve the learning process by providing more precise associations even with smaller sample sizes. Inácio, A and Lopes, H. [6] proposed a clothing segmentation structure, Efficient Pyramidal Network (EPNYNET), na EfficientNet-based model, with an architecture derived from Pyramidal Resource Networks. The images are initially pre-processed, cropping out the area correspondent to the person as well as the background around them. Next, a new crop is applied through the EPYNET structure, which returns a probability map resulting from two additional post-processing operations to obtain the final segmentation mask. UTFPR-SBD3 dataset is also introduced, consisting of 4,500 manually annotated images for 18 object classes, including footwear. This dataset is openly available for third-party usage. Mask-based Neural Networks was also explored by Yu Liu, et al [8], who combined colour recognition and border detection algorithms along with Deep Neural Networks for a segmentation approach which, after testing, proved that Deep-Neural Network classification is in fact, an effective methodology. 4 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 1.3. Deep Learning for Fashion (Footwear included) Recommendation Within the current era of e-commerce, manufacturers and resellers seek innovative ways to approach their target audience and customers, by tracing their tastes/needs profiles that aim to deliver unique and personalized purchase experiences. Aligned with this topic, a series of research works are presented as follows. A probabilistic model is proposed in [9] - having its factorization conducted via CNN -, which uses the shape of the item to deduce recommendations. Tests made to the model resorted to a dataset constituted by Amazon search results for “footwear” and “jewellery” and concluded that the usage of the shape properties of the items help to improve the precision of clothing article recommendation systems. In an effort to modernize the retail industry, a system was created to categorize a dataset of 13000 men footwear articles through shape (silhouette), colour (through the comparison of L*a*b colour conversion scores) and texture (through histogram quantization with Local Binary Patterns). The resulting algorithm managed to successfully recommend footwear with 90% accuracy regarding shape, 84.03% regarding colour and 85.97% regarding textures. However, the authors highlight the relative limitation resulting from the training dataset (composed of catalogue images), which could compromise accuracy with input images with low quality or weak illumination [10]. In the already mentioned survey of Cheng, W. et al [4], beyond the most basic fashion segmentation synthesis, reported works also aim at item recommendation applied to fashion e-commerce (and, by association, footwear). One of the problems posed is the current state of product advertising and cataloguing is, in large part, based on embellished photographs captured in ideal, studio conditions. In the interest of customer satisfaction, a prototype was developed to find a clothing article from an image, which makes use of a three-front approach: two DL methods and a third one focused on learning the differences between street and store environments [11]. After several additional advances on this specific area, not only has it been made possible the identification of clothing articles through provided images, but also to associate textual search parameters manipulating the retrieval of articles similar to the ones used for querying. AY Betul, Z Koyun [12] created an image recommendation system for e-commerce through the usage of a GAN to evaluate an image and return a set of other similar ones. In comparison to similar-purposed models, this one is reported as superior in both speed and precision when used with the UT-Zappos50k [16, 17] dataset (consisting in several catalogue images of footwear). This way, the proposed model might be ideal for a footwear classificationspecific implementation. On the consumer’s side, AS Sheikh et al. [13] developed Size and Fit Network (Sfnet): a DL system that helps on the recommendation of clothing and footwear. This method combines content-based with collaboration-based modelling techniques to learn from both direct inputs and latent user representations. Khosla, N. e Venjataraman, V. [15] explore three different CNNs for footwear identification and classification: ViggyNet Small, ViggyNet Large and VGGNet. With an overall precision of 75.6%, VGGNet proved to be superior to the other two. However, the authors noted that is the low quality of labelling and organization present on the used dataset UT-Zappos50K - the most used footwear image dataset for DL but also one whose overall lack of visual variety revealed problematic for other studies as well [14] -, which created the need to gather a dedicated dataset. In this paper, modern Artificial Intelligence techniques will be explored with twofold goals: (i) to perform shoe segmentation to enable a more expeditious and intuitive catalogue production at the back-office side; and (ii) to provide customers with visual searching tools for footwear recommendation, in a front-office perspective. Both goals will be materialized in modules that based on the use of REST services can promote integration at the marketplace side. The necessity for the development of such modules was identified through contact with a Portuguese marketplace company - Overcube (https://pt.overcube.com/) – with whom several interactions have been occurring to define a set of related requirements and, thereby, develop a suitable but yet flexible solution. Eventually, these needs ended up for being common to a wide set of entities lying upon the same business model. The following sections will address some of the outcomes resulting from this study. 3. Proposal of footwear modules for segmentation and recommendation Considering the aforementioned needs associated with footwear marketplaces, a module that makes available an automation process for removing background from digital photographs of shoes to dynamize catalogue production is proposed in this section. Moreover, a second module to provide recommendations based on a digital photograph as
728 João Oliveira et al. / Procedia Computer Science 219 (2023) 724–735 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 5 input is also presented. The DL intelligence inside these models was built out of a few datasets that will also be described. 3.1DL-based segmentation module for background removal The purpose of the proposed segmentation-based module is mainly to ease the cataloguing making process, but also to support the recommendation module (addressed in the next subsection), by processing input images to separate the element of interest - i.e., shoe - from background - i.e., everything else. Fig. 1 depicts the general composition and associated processes of this module. Two main stages can be highlighted: the learning stage and the productions stage. The former focus on the establishment of an effective segmentation model for finding shoes in images, with a respective mask prediction, based on the annotation of raw data to build a shoe-aware dataset that is then used to train a CNN capable of delimiting footwear. In the latter, the very same model interfaces a REST layer to provide shoe segmentation as-a-service, to be used by catalogue managers and, also, as a subprocess of the recommendation module (see the next subsection). Fig. 1 – Segmentation module with two main stages: a learning stage, wherein a set of raw data is used to label the element of interest (shoe) to form up a dataset that is then throw to a segmentation architecture that generates an inference model. The prediction stage makes use of a REST layer to enable the communication between the catalogue manager and the model specialized in background removal. 3.2 DL-based recommendation module To be able to provide recommendations to customers based on shoes snapshots taken by themselves – using, for example, a smartphone – a module supported by a multi-label classification approach powered by DL is proposed. A more complete overview of the structure of it is provided in Fig. 2, in which three main components can be observed: • application layer (AL) – consists of a web-based front-office app that interfaces with the user as the main consumer of the service; • computational learning and inference layer (CLIL) – integrates the intelligence of the module, with a multiclassification CNN previously trained with a set of characteristics used to profile a shoe (e.g., type, style, gender, predominant colour, etc.) and, thereby, capable of extracting such context labels from (new) submitted photographs; • footwear marketplace information system (FMIS) – regards to the company’s technological infrastructure, which, in a first stage contributed with data to build a CNN for estimating footwear profile labels that, in turn, can be used to query the business database, aiming to retrieve results contextually relevant. Essentially, when a user crosses with a shoe within its range of interests and desires to know if there are more similar footwear available in the marketplace, a photo can be taken and submitted, via AL, for tag extraction through the CLIL’s multi-classification CNN pre-trained with relevant data, which, in turn, uses these estimations to query the
João Oliveira et al. / Procedia Computer Science 219 (2023) 724–735 729 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 5 input is also presented. The DL intelligence inside these models was built out of a few datasets that will also be described. 3.1DL-based segmentation module for background removal The purpose of the proposed segmentation-based module is mainly to ease the cataloguing making process, but also to support the recommendation module (addressed in the next subsection), by processing input images to separate the element of interest - i.e., shoe - from background - i.e., everything else. Fig. 1 depicts the general composition and associated processes of this module. Two main stages can be highlighted: the learning stage and the productions stage. The former focus on the establishment of an effective segmentation model for finding shoes in images, with a respective mask prediction, based on the annotation of raw data to build a shoe-aware dataset that is then used to train a CNN capable of delimiting footwear. In the latter, the very same model interfaces a REST layer to provide shoe segmentation as-a-service, to be used by catalogue managers and, also, as a subprocess of the recommendation module (see the next subsection). Fig. 1 – Segmentation module with two main stages: a learning stage, wherein a set of raw data is used to label the element of interest (shoe) to form up a dataset that is then throw to a segmentation architecture that generates an inference model. The prediction stage makes use of a REST layer to enable the communication between the catalogue manager and the model specialized in background removal. 3.2 DL-based recommendation module To be able to provide recommendations to customers based on shoes snapshots taken by themselves – using, for example, a smartphone – a module supported by a multi-label classification approach powered by DL is proposed. A more complete overview of the structure of it is provided in Fig. 2, in which three main components can be observed: • application layer (AL) – consists of a web-based front-office app that interfaces with the user as the main consumer of the service; • computational learning and inference layer (CLIL) – integrates the intelligence of the module, with a multiclassification CNN previously trained with a set of characteristics used to profile a shoe (e.g., type, style, gender, predominant colour, etc.) and, thereby, capable of extracting such context labels from (new) submitted photographs; • footwear marketplace information system (FMIS) – regards to the company’s technological infrastructure, which, in a first stage contributed with data to build a CNN for estimating footwear profile labels that, in turn, can be used to query the business database, aiming to retrieve results contextually relevant. Essentially, when a user crosses with a shoe within its range of interests and desires to know if there are more similar footwear available in the marketplace, a photo can be taken and submitted, via AL, for tag extraction through the CLIL’s multi-classification CNN pre-trained with relevant data, which, in turn, uses these estimations to query the 6 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 FMIS’s database with the purpose of retrieving similar elements matching the search criteria. The results are finally returned to the user’s AL, sorted by relevance. Fig. 2 – Recommendation module with three main components: (i) application layer (AL), to be used by the customer to submit photos of shoes, aiming to perform a visual-based search for footwear suggestions; (ii) computational learning and inference layer (CLIL) – containing a multiclassification CNN model previously trained with the marketplace’s footwear data and related characteristics –, to extract context labels from the submitted photos; and (iii) footwear marketplace information system (FMIS), wherein the business database lies in and receives queries about footwear characteristics estimations from the multi-label inference module, which are then retrieved to the customer platform in the form of shoes suggestions based on the requested search. 3.3 Data used for DL models feeding For producing effective classification and segmentation models, the quality of the data supporting the knowledge base from which they are built from, is crucial. In this subsection, the raw data and datasets resorted to train the CNNs for both the above-mentioned modules will be briefly presented. 3.3.1 Overcube catalogue (raw data) Initially, a set of shoes images from Overcube online catalogues was considered for building a structured dataset, with the due authorization of the owners. Such images were acquired in a studio environment consisting of clean backgrounds to facilitate the manual extraction and treatment of the graphical components corresponding to shoes, for further catalogue production. Fig. 3-a presents a set of exemplifying pictures of shoes, retrieved from the Overcube’s marketplace catalogue, which has large thousands of images that have been incorporated over time. It is possible to observe the uniform background and the multiplicity of perspectives (side, oblique, front, top, close-range views, etc.) that typically characterize the catalogues. 3.3.2 UT-Zappos50k dataset The UT-Zappos50k dataset is described as “a large shoe dataset consisting of 50025 catalogue images collected from Zappos.com”. There are four major categories - shoes, sandals, slippers, and boots -, followed by functional types and individual brands. The shoes are placed in a white background, at the centre of the image, with a consistent orientation for convenient analysis. Fig. 3-b shows a few examples.
730 João Oliveira et al. / Procedia Computer Science 219 (2023) 724–735 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 7 a) b) Fig. 3 – Footwear imagery data: a) examples from Overcube’s catalogue photographs; b) examples from UT-Zappos50k dataset. Both catalogue and dataset include several types of footwear, such as shoes, sandals, slippers, and boots. 3.3.3 Data annotation and dataset construction strategies Both Overcube’s raw data and UT-Zappos50k dataset were somehow processed and adjusted to the needs of the challenges ahead, i.e., to create knowledge pools for supporting DL training. Procedures will be described as follows. a) Fine-grained annotation for segmentation models With the aim of training DL segmentation models, a part of the available photographs from the imagery sets already described (Overcube catalog and UT-Zappos50k) was used to build toward a structured dataset. Annotation procedures were the following: a) manual black and white segmentation masks annotations; b) manual polygon-based annotations; and c) automatic polygon-based annotations. The creation of mask annotations was manually made at an initial stage, resorting to image editing software to set up black and white images. The white part corresponds to the background and the black blob matches the shoe, considering the required precision. Not less consuming, was the manual polygon marking, that was done using a tool specific for annotations (see the implementation section ahead). In this case, there was the need to precisely delineate the shoe by picking points in the edge of it. Lastly, to drastically shorten the annotation times, the process evolved to an automatic strategy, by taking advantage of the uniformity of the backgrounds that characterize both Overcube’s catalogues and UT-Zappos50k dataset. Fig. 4 depicts the data flow diagram describing this automatic approach, applied more conservatively to Overcube’s catalogue-based imagery and more extensively to UT-Zappos50k collection. Contrast issues, induced by some shoe images, in which the colours of the element of interest approximate to the background, led to punctual failures in the polygon extraction automated process. Those specific cases require manual processing. Still regarding the dataset creation for segmentation, a data augmentation technique was developed, by generating several transformations – including repositioning and horizontal/vertical flips – to induce hypothetical shoe variations, which are lastly placed upon diverse backgrounds crawled from web search engines. As designed, this data augmentation process aims to synthetically and rapidly increase the number of available samples, widening simultaneously the conditions in which shoes may appear, and considering challenging backgrounds to push the DL training further in what regards to shoe segmentation goal. In this preliminary approach, the number of images used was lesser than the available on the original datasets, as shown in Table 1, for the sake of quickness in the obtention of results. Table 1. Final subsets used for DL training, built from Overcube’s and UT-Zappos50k collections. Dataset #images for training #images for validation #images for testing Overcube’s augmented dataset 773 21 21 UT-Zappos50k subset w/ augmentation 1040 640 400 8 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 Fig. 4 – Data flow diagram for the automatic polygon-based annotations. It starts to load a folder with images of shoes and process the list of files sequentially, by applying common image processing operations (adaptive threshold, holes filling, contours extraction, etc.). For each image, a delineation polygon of the shoe is determined and added to a volatile annotation list that, in the end, is saved to a file, in a proper format. b) Multi-label annotations for recommendations The challenge associated to recommendations lies in the need of yielding list of tags to characterize shoes in each prediction. Thereby, a custom dataset provided by Overcube, resulting from a database exporting operation, was considered. It consists in a file with more than 55000 entries, each one including footwear image links and several tags associated to shoes characteristics. A trimming operation to remove some redundant information, namely tags and other columns irrelevant for the desired classification purpose took place. Entries containing expired/inaccessible links to images were removed as well. 7672 entries remained after sanitizing the dataset, which was stored in a commaseparated value format to more easily handle multi-classification training. For complementary purposes, partial information regarding shoes characterization from UT-Zappos50k dataset was also included. Table 2 presents the composition of the final dataset, considering a couple of classifying tags: footwear category (shoes, sandals, slippers, and boots) and type of heel (high, flat, etc.). Table 2. Final subsets used for DL training, built from Overcube’s and UT-Zappos50k collections. Dataset #images for training #images for validation #images for testing Overcube’s + UT-Zappos50k 24060 6014 20 3.3.4 Deep Learning strategies Considering the need for predicting masks to perform a fine-grade segmentation of footwear, modern DL approaches for estimating blobs for shoe region detection were considered. Equipped with layers that allow to discriminate objects of interest from background, these CNNs are ideal for the posed challenge. With regard with the extraction of characteristics that will allow to profile shoes, multi-label classification approaches are required to perform multiple output, differently from multi-class classification, which involves single-label problems specialized in categorizing instances into one class, out of a set with 2 or more designations. Among the available CNN architectures to achieve segmentation and multi-label classification, a few of them were selected for implementation, whose details can be found in the following section. 4. Segmentation and recommendation models implementation This section will detail the preliminary work made toward a first implementation of the CNN models that will integrate both segmentation and recommendation modules, which were developed, trained, and applied for inference using a computer equipped with a GTX 1080 GPU, i7-6700K CPU and 32GB of RAM. Python within Conda environment were adopted as programming tools. Tensorflow2.5 and FastAI [26] were the libraries used for
João Oliveira et al. / Procedia Computer Science 219 (2023) 724–735 731 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 7 a) b) Fig. 3 – Footwear imagery data: a) examples from Overcube’s catalogue photographs; b) examples from UT-Zappos50k dataset. Both catalogue and dataset include several types of footwear, such as shoes, sandals, slippers, and boots. 3.3.3 Data annotation and dataset construction strategies Both Overcube’s raw data and UT-Zappos50k dataset were somehow processed and adjusted to the needs of the challenges ahead, i.e., to create knowledge pools for supporting DL training. Procedures will be described as follows. a) Fine-grained annotation for segmentation models With the aim of training DL segmentation models, a part of the available photographs from the imagery sets already described (Overcube catalog and UT-Zappos50k) was used to build toward a structured dataset. Annotation procedures were the following: a) manual black and white segmentation masks annotations; b) manual polygon-based annotations; and c) automatic polygon-based annotations. The creation of mask annotations was manually made at an initial stage, resorting to image editing software to set up black and white images. The white part corresponds to the background and the black blob matches the shoe, considering the required precision. Not less consuming, was the manual polygon marking, that was done using a tool specific for annotations (see the implementation section ahead). In this case, there was the need to precisely delineate the shoe by picking points in the edge of it. Lastly, to drastically shorten the annotation times, the process evolved to an automatic strategy, by taking advantage of the uniformity of the backgrounds that characterize both Overcube’s catalogues and UT-Zappos50k dataset. Fig. 4 depicts the data flow diagram describing this automatic approach, applied more conservatively to Overcube’s catalogue-based imagery and more extensively to UT-Zappos50k collection. Contrast issues, induced by some shoe images, in which the colours of the element of interest approximate to the background, led to punctual failures in the polygon extraction automated process. Those specific cases require manual processing. Still regarding the dataset creation for segmentation, a data augmentation technique was developed, by generating several transformations – including repositioning and horizontal/vertical flips – to induce hypothetical shoe variations, which are lastly placed upon diverse backgrounds crawled from web search engines. As designed, this data augmentation process aims to synthetically and rapidly increase the number of available samples, widening simultaneously the conditions in which shoes may appear, and considering challenging backgrounds to push the DL training further in what regards to shoe segmentation goal. In this preliminary approach, the number of images used was lesser than the available on the original datasets, as shown in Table 1, for the sake of quickness in the obtention of results. Table 1. Final subsets used for DL training, built from Overcube’s and UT-Zappos50k collections. Dataset #images for training #images for validation #images for testing Overcube’s augmented dataset 773 21 21 UT-Zappos50k subset w/ augmentation 1040 640 400 8 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 Fig. 4 – Data flow diagram for the automatic polygon-based annotations. It starts to load a folder with images of shoes and process the list of files sequentially, by applying common image processing operations (adaptive threshold, holes filling, contours extraction, etc.). For each image, a delineation polygon of the shoe is determined and added to a volatile annotation list that, in the end, is saved to a file, in a proper format. b) Multi-label annotations for recommendations The challenge associated to recommendations lies in the need of yielding list of tags to characterize shoes in each prediction. Thereby, a custom dataset provided by Overcube, resulting from a database exporting operation, was considered. It consists in a file with more than 55000 entries, each one including footwear image links and several tags associated to shoes characteristics. A trimming operation to remove some redundant information, namely tags and other columns irrelevant for the desired classification purpose took place. Entries containing expired/inaccessible links to images were removed as well. 7672 entries remained after sanitizing the dataset, which was stored in a commaseparated value format to more easily handle multi-classification training. For complementary purposes, partial information regarding shoes characterization from UT-Zappos50k dataset was also included. Table 2 presents the composition of the final dataset, considering a couple of classifying tags: footwear category (shoes, sandals, slippers, and boots) and type of heel (high, flat, etc.). Table 2. Final subsets used for DL training, built from Overcube’s and UT-Zappos50k collections. Dataset #images for training #images for validation #images for testing Overcube’s + UT-Zappos50k 24060 6014 20 3.3.4 Deep Learning strategies Considering the need for predicting masks to perform a fine-grade segmentation of footwear, modern DL approaches for estimating blobs for shoe region detection were considered. Equipped with layers that allow to discriminate objects of interest from background, these CNNs are ideal for the posed challenge. With regard with the extraction of characteristics that will allow to profile shoes, multi-label classification approaches are required to perform multiple output, differently from multi-class classification, which involves single-label problems specialized in categorizing instances into one class, out of a set with 2 or more designations. Among the available CNN architectures to achieve segmentation and multi-label classification, a few of them were selected for implementation, whose details can be found in the following section. 4. Segmentation and recommendation models implementation This section will detail the preliminary work made toward a first implementation of the CNN models that will integrate both segmentation and recommendation modules, which were developed, trained, and applied for inference using a computer equipped with a GTX 1080 GPU, i7-6700K CPU and 32GB of RAM. Python within Conda environment were adopted as programming tools. Tensorflow2.5 and FastAI [26] were the libraries used for
732 João Oliveira et al. / Procedia Computer Science 219 (2023) 724–735 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 9 performing DL. The following subsections will point out the tools used for dataset manipulation, as well as selected CNN architectures for this preliminary approach to endow the proposed modules with DL. 4.1 Tools for data annotation and dataset implementation To comply with the annotation strategies defined previously - having in mind a compatibility criterion with the training of modern DL-based segmentation architectures -, different tools were used, according with the labelling format. Paint.NET, a free, open-source image editing software, was initially considered due to its intuitive interface with region selection/clustering (magic wand), histogram manipulation and colour transformation tools, which would in theory allow to reach the goal of masking footwear (black blob upon white background) with relative ease. However, besides the apparent lack of support for specific bulk operations aiming an increased degree of automation, many of the images composing the datasets hided colour nuances imperceptible to the eye that make it impracticable the application of an universal brightness/contrast-based separation algorithm, therefore leading to the manual operationalization of shoe segmentation - i.e., pixel clustering with handmade threshold adjustments and visual confirmation. On the other hand, for the manual polygon annotations strategy, VIA [30, 31] annotator was employed. It has a graphical interface and offers several functionalities such as loading image folders and previously started VIA projects, labelling regions of interest both with geometric shapes (rectangles, circles, polygons) and descriptive tags, as well as to export a structured json files – following VGG labelling format – compatible with many of the currently available DL training implementations. As for the automatic polygon annotations strategy, it was implemented using Tensorflow2.5 and Keras tools for data augmentation (ImageDataGenerator class) that allow to code and batch several operations to generate variability such as rotations, shifts, flips, brightness/contrast manipulation, zoom, etc. Resorting to OpenCV, operations for extracting the shoe region – also considering VIA annotator compatible format – and combine it randomly with one of the 100 backgrounds available in a local folder for this purpose could also be achieved, providing the possibility for quickly increasing the dataset with substantial variability of (synthesized) conditions. 4.2 Deep Learning approaches Considering the previously mentioned assumptions and selected DL approaches, there was a motivation to address the segmentation module in first place, as that one will also aid the recommendation module to perform more focused tags extraction, free from the noise induced by backgrounds. 4.2.1 Implementation of DL models for segmentation Originally oriented for biomedical image segmentation, UNet [25], which has been proven useful for other area as well, was selected as one of the candidates to integrate the segmentation model. A baseline implementation without significant configuration was employed. Since its structure was only prepared to work with square images by default, a post-loading transformation to the images of the used datasets had to be made to guarantee crop-based conversion to squared dimensions without cutting out any important parts of shoe region. Corresponding black-and-white segmentation masks underwent to the same transformations to ensure the coherency of the ground-truth that otherwise would critically penalize the CNN training. Another considered approach was the Mask RCNN configured with ResNet101 [29] and supported by COCO dataset transfer learning. Additional configurations include: 1000 training epochs, 520 steps per epoch, 280 validation steps, 1 image per GPU, 40 maximum ground truth instances, 40 detections, and 70% of minimum confidence for detection. Also, an early stopping callback was configured to force the model end the training sooner in case of learning stagnation after 50 epochs straight. 4.2.2 Implementation of DL models for recommendation The main framework explored for this implementation was pa TensorCore-based library that provides simplified DL methods and classes to train and perform predictions with a variety of preconfigured models and respective backbones. The first implementations consisted of ResNet variations - ResNet101 and ResNet50 – combined with 10 João Oliveira et al. / Procedia Computer Science 00 (2019) 000–000 commonly used optimizers, including stochastic gradient descendent (SGD) and Adam [32]. FastAI’s ImageDataLoader class was used and configured to perform adjustments in parameters such variations in the learning rate drop and optimizer replacements. Default callbacks were also used for the epochs: one to save only the best model (whenever an improvement occurs), and another to aid in the visual tracking of both validation and loss values throughout the training sessions. A multi-label-oriented version of the accuracy metric was used to track improvements. The second major implementation, still using FastAI allowed to employ Xception [27] architecture along with a default Nadam optimizer, to which an accuracy metric for multi-labelling was, once again, considered for performance measurement purposes. Also, ImageDataLoader class was extended to work with a random training/validation splitter, to prevent single-occurrence labels and to ensure the presence of, at least, one element of each class while rebalancing the subsets. 5. Preliminary DL tests and results This section will be dedicated to the presentation of preliminary tests made with the implemented models and respective results. 5.1 Segmentation module assessment UNet tests consisted in assessing this model with Ovecube’s mask-based dataset. After 50 epochs of training, validation loss decrease bellow 0.1, which was encouraging, but once the model's predictions were actually put to the test, results were less satisfactory then firstly expected, with a considerable number of false negatives. Still, from an overall perspective, the model performed reasonably. Fig. 5 provides a visually quite acceptable mask prediction. In contrast, the tests made with Mask RCNN trained over UT-Zappos50k dataset showed a significant improvement of results, in agreement with the promising training metrics data. Fig. 6 depicts the estimation masks made over testing (unseen) data. Table 3 sums up the comparison between UNet trained upon Overcube’s augmented dataset and Mask RCNN weighted with UT-Zappos50k dataset learning. Mean Average Precision, F1-Score, Precision and Recall provide an insight regarding the performance of both models. a) b) Fig. 5 – Example prediction made with UNet approach. Left image represents the input, while the right one is the prediction returned by the model inference (white correspondents to shoe prediction). Fig. 6 – Example of prediction made with the Mask RCNN approach. The predicted shoe region is highlighted in red. Table 3. Image segmentation results comparing UNet and Mask-RCNN. Configuration mIoU F1-Score Precision Recall Modified UNet + Overcube’s augmented Dataset 0.70856 0.8118 0.86126 0.76772 Mask RCNN + UT-Zappos50k Dataset 0.92854 0.96298 0.98476 0.94214