Abstract: Model based approaches that are currently being used for Fashion Attribute Extraction (FAE) have the disadvantage that they are trained on static ontology, hence making them incapable of accommodating changes in the fashion industry, due to absence of an incremental dataset for training. Embodiments disclosed herein provide a method and system for incremental learning based fashion attribute extraction. The system generates prompts to train a data model as an incremental learning, causing learning of an evolving ontology with respect to fashion attributes, while retaining information in the pre-existed database. The data model thus generated is used for fashion attribute extraction.
Description:FORM 2
THE PATENTS ACT, 1970
(39 of 1970)
&
THE PATENT RULES, 2003
COMPLETE SPECIFICATION
(See Section 10 and Rule 13)
Title of invention:
METHOD AND SYSTEM FOR INCREMENTAL LEARNING BASED FASHION ATTRIBUTE EXTRACTION
Applicant:
Tata Consultancy Services Limited
A company Incorporated in India under the Companies Act, 1956
Having address:
Nirmal Building, 9th Floor,
Nariman Point, Mumbai 400021,
Maharashtra, India
The following specification particularly describes the invention and the manner in which it is to be performed.
TECHNICAL FIELD
The disclosure herein generally relates to fashion attribute extraction, and, more particularly, to method and system for incremental learning based fashion attribute extraction.
BACKGROUND
The fashion industry is an ever-changing landscape with new style and apparel frequently introduced by retailers. Fashion Attribute Extraction (FAE) is a vital task in fashion retail for critical downstream tasks such as product recommendation, fashion image retrieval, and image generation. Fashion articles can be organized into an ontological structure with respect to their product categories and corresponding attribute types and values. A new fashion trend can result in an expansion of the fashion ontology, thus, models trained for FAE need to be frequently updated in order keep up with newer fashion trends.
A general ontology for a fashion dataset can be viewed as a three-layered hierarchical relationship graph between product categories, attribute types, and values. A product can be considered a parent node with multiple attributes as children; each attribute is a sub-graph with corresponding children attribute values. Ontology evolution can occur due to the addition of a node at any of the three levels. Ontology evolution over three incremental steps maybe considered as an example. In a first step, addition of a sub-graph of an attribute type under the Shirt product category maybe observed. In a second step, addition of a parent product category node Dress sharing the same attribute types as an existing product can be observed. In a last increment, addition of a child attribute value Full Sleeves for an existing attribute type Sleeve Length can be observed.
Model based approaches that are currently being used for FAE have the disadvantage that they are trained on static ontology, hence making them incapable of accommodating changes in the fashion industry, due to absence of an incremental dataset for training.
SUMMARY
Embodiments of the present disclosure present technological improvements as solutions to one or more of the above-mentioned technical problems recognized by the inventors in conventional systems. For example, in one embodiment, a processor implemented method is provided. The method includes: receiving, via one or more hardware processors, a) an incremental dataset comprising (i) a plurality of images of a plurality of products, (ii) one or more attributes for each of the plurality of products, and (iii) an attribute value for each of the one or more attributes, wherein the incremental dataset is obtained by adding an evolving ontology to a pre-existed database and b) a first generative visual language model trained on the pre-existed database, wherein the first generative visual language model comprises a visual encoder, a first linear layer, and a Large Language Model (LLM), as input; generating, via the one or more hardware processors, a plurality of questions for each of the one or more attributes of each of the plurality of products, wherein an answer to each of the plurality of questions is associated attribute value; generating, via the one or more hardware processors, a Visual Question Answering (VQA) dataset comprising a plurality of triplets (I, Q, A), wherein in each of the plurality of triplets, I represents image of each of the plurality of products, Q represents each of the plurality of questions associated with each attribute among the one or more attributes of a product among the plurality of products, in the image I, and A represents answer to each of the plurality of questions; initializing, via the one or more hardware processors, a second generative visual language model with the VQA dataset, wherein the second generative visual language model comprises the visual encoder, a second linear layer and the LLM; extracting, via the one or more hardware processors, a plurality of image features by passing each image I in the VQA dataset through the visual encoder; generating, via the one or more hardware processors, a first visual token and a second visual token by passing the extracted plurality of image features through the first linear layer and the second linear layer; and generating, via the one or more hardware processors, a first prompt and a second prompt by prepending the first visual token and the second visual token respectively to the associated question Q in the VQA dataset.
In an embodiment, the method includes: passing the first prompt to the LLM of the first generative visual language model and the second prompt to the second generative visual language model to obtain a first answer and a second answer; computing a) a Kullback–Leibler (KL) divergence loss between the first answer and the second answer, and b) a language modeling loss between the second answer obtained from the LLM and an associated answer in the VQA dataset; and training the second generative visual language model to jointly optimize the KL divergence loss and the language modelling loss.
In an embodiment of the method, training the second generative visual language model to optimize the KL divergence loss and the language modelling loss causes learning of the evolving ontology while retaining information in the pre-existed database.
In another embodiment, a system is provided. The system includes one or more hardware processors, a communication interface, and a memory storing a plurality of instructions. The plurality of instructions when executed, cause the one or more hardware processors to: receive a) an incremental dataset comprising (i) a plurality of images of a plurality of products, (ii) one or more attributes for each of the plurality of products, and (iii) an attribute value for each of the one or more attributes, wherein the incremental dataset is obtained by adding an evolving ontology to a pre-existed database and b) a first generative visual language model trained on the pre-existed database, wherein the first generative visual language model comprises a visual encoder, a first linear layer, and a Large Language Model (LLM), as input; generate a plurality of questions for each of the one or more attributes of each of the plurality of products, wherein an answer to each of the plurality of questions is associated attribute value; generate a Visual Question Answering (VQA) dataset comprising a plurality of triplets (I, Q, A), wherein in each of the plurality of triplets, I represents image of each of the plurality of products, Q represents each of the plurality of questions, associated with each attribute among the one or more attributes of a product among the plurality of products, in the image I, and A represents answer to each of the plurality of questions; initialize a second generative visual language model with the VQA dataset, wherein the second generative visual language model comprises the visual encoder, a second linear layer and the LLM; extract a plurality of image features by passing each image I in the VQA dataset through the visual encoder; generate a first visual token and a second visual token by passing the extracted plurality of image features through the first linear layer and the second linear layer; and generate a first prompt and a second prompt by prepending the first visual token and the second visual token respectively to the associated question Q in the VQA dataset.
In an embodiment of the system, the one or more hardware processors are configured to: pass the first prompt to the LLM of the first generative visual language model and the second prompt to the second generative visual language model to obtain a first answer and a second answer; compute a) a Kullback–Leibler (KL) divergence loss between the first answer and the second answer, and b) a language modeling loss between the second answer obtained from the LLM and an associated answer in the VQA dataset; and train the second generative visual language model to jointly optimize the KL divergence loss and the language modelling loss.
In an embodiment of the system, training the second generative visual language model to optimize the KL divergence loss and the language modelling loss causes learning of the evolving ontology while retaining information in the pre-existed database.
In yet another aspect, a non-transitory computer readable medium is provided. The non-transitory computer readable medium includes a plurality of instructions, which when executed, cause one or more hardware processors to: receive a) an incremental dataset comprising (i) a plurality of images of a plurality of products, (ii) one or more attributes for each of the plurality of products, and (iii) an attribute value for each of the one or more attributes, wherein the incremental dataset is obtained by adding an evolving ontology to a pre-existed database and b) a first generative visual language model trained on the pre-existed database, wherein the first generative visual language model comprises a visual encoder, a first linear layer, and a Large Language Model (LLM), as input; generate a plurality of questions for each of the one or more attributes of each of the plurality of products, wherein an answer to each of the plurality of questions is associated attribute value; generate a Visual Question Answering (VQA) dataset comprising a plurality of triplets (I, Q, A), wherein in each of the plurality of triplets, I represents image of each of the plurality of products, Q represents each of the plurality of questions associated with each attribute among the one or more attributes of a product among the plurality of products, in the image I, and A represents answer to each of the plurality of questions; initialize a second generative visual language model with the VQA dataset, wherein the second generative visual language model comprises the visual encoder, a second linear layer and the LLM; extract a plurality of image features by passing each image I in the VQA dataset through the visual encoder; generate a first visual token and a second visual token by passing the extracted plurality of image features through the first linear layer and the second linear layer; and generate a first prompt and a second prompt by prepending the first visual token and the second visual token respectively to the associated question Q in the VQA dataset.
In an embodiment of the non-transitory computer readable medium, the plurality of instructions cause the one or more hardware processors to: pass the first prompt to the LLM of the first generative visual language model and the second prompt to the second generative visual language model to obtain a first answer and a second answer; compute a) a Kullback–Leibler (KL) divergence loss between the first answer and the second answer, and b) a language modeling loss between the second answer obtained from the LLM and an associated answer in the VQA dataset; and train the second generative visual language model to jointly optimize the KL divergence loss and the language modelling loss.
In an embodiment of the non-transitory computer readable medium, training the second generative visual language model to optimize the KL divergence loss and the language modelling loss causes learning of the evolving ontology while retaining information in the pre-existed database.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
BRIEF DESCRIPTION OF THE DRAWINGS
The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate exemplary embodiments and, together with the description, serve to explain the disclosed principles:
FIG. 1 illustrates an exemplary system for fashion attribute extraction, according to some embodiments of the present disclosure.
FIGS. 2A and 2B (collectively referred to as FIG. 2) is a flow diagram depicting steps involved in the process of generating prompts for the fashion attribute extraction being performed by the system of FIG. 1, according to some embodiments of the present disclosure.
FIG. 3 is a flow diagram depicting steps involved in the process of training a second generative visual language model for the fashion attribute extraction, by the system of FIG. 1, according to some embodiments of the present disclosure.
FIGS. 4A and 4B are examples depicting the evolving ontology and incremental training respectively, for the feature attribute extraction being performed by the system of FIG. 1, according to some embodiments of the present disclosure.
DETAILED DESCRIPTION OF EMBODIMENTS
Exemplary embodiments are described with reference to the accompanying drawings. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. Wherever convenient, the same reference numbers are used throughout the drawings to refer to the same or like parts. While examples and features of disclosed principles are described herein, modifications, adaptations, and other implementations are possible without departing from the scope of the disclosed embodiments.
Model based approaches that are currently being used for Feature Attribute Extraction (FAE) have the disadvantage that they are trained on static ontology, hence making them incapable of accommodating changes in the fashion industry, due to absence of an incremental dataset for training.
In order to address these challenges, method and system disclosed herein provide an incremental learning based FAE.
Referring now to the drawings, and more particularly to FIG. 1 through FIG. 4B, where similar reference characters denote corresponding features consistently throughout the figures, there are shown preferred embodiments and these embodiments are described in the context of the following exemplary system and/or method.
FIG. 1 illustrates an exemplary system for fashion attribute extraction, according to some embodiments of the present disclosure. The system 100 includes or is otherwise in communication with hardware processors 102, at least one memory such as a memory 104, an I/O interface 112. The hardware processors 102, memory 104, and the Input /Output (I/O) interface 112 may be coupled by a system bus such as a system bus 108 or a similar mechanism. In an embodiment, the hardware processors 102 can be one or more hardware processors.
The I/O interface 112 may include a variety of software and hardware interfaces, for example, a web interface, a graphical user interface, and the like. The I/O interface 112 may include a variety of software and hardware interfaces, for example, interfaces for peripheral device(s), such as a keyboard, a mouse, an external memory, a printer and the like. Further, the I/O interface 112 may enable the system 100 to communicate with other devices, such as web servers, and external databases.
The I/O interface 112 can facilitate multiple communications within a wide variety of networks and protocol types, including wired networks, for example, local area network (LAN), cable, etc., and wireless networks, such as Wireless LAN (WLAN), cellular, or satellite. For the purpose, the I/O interface 112 may include one or more ports for connecting several computing systems with one another or to another server computer. The I/O interface 112 may include one or more ports for connecting several devices to one another or to another server.
The one or more hardware processors 102 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, node machines, logic circuitries, and/or any devices that manipulate signals based on operational instructions. Among other capabilities, the one or more hardware processors 102 is configured to fetch and execute computer-readable instructions stored in the memory 104.
The memory 104 may include any computer-readable medium known in the art including, for example, volatile memory, such as static random-access memory (SRAM) and dynamic random-access memory (DRAM), and/or non-volatile memory, such as read only memory (ROM), erasable programmable ROM, flash memories, hard disks, optical disks, and magnetic tapes. In an embodiment, the memory 104 includes a plurality of modules 106.
The plurality of modules 106 include programs or coded instructions that supplement applications or functions performed by the system 100 for executing different steps involved in the process of the Fashion Attribute Extraction (FAE) being performed by the system of FIG. 1. The plurality of modules 106, amongst other things, can include routines, programs, objects, components, and data structures, which performs particular tasks or implement particular abstract data types. The plurality of modules 106 may also be used as, signal processor(s), node machine(s), logic circuitries, and/or any other device or component that manipulates signals based on operational instructions. Further, the plurality of modules 106 can be used by hardware, by computer-readable instructions executed by the one or more hardware processors 102, or by a combination thereof. The plurality of modules 106 can include various sub-modules (not shown). The plurality of modules 106 may include computer-readable instructions that supplement applications or functions performed by the system 100 for the Fashion Attribute Extraction (FAE).
The data repository (or repository) 110 may include a plurality of abstracted piece of code for refinement and data that is processed, received, or generated as a result of the execution of the plurality of modules in the module(s) 106.
Although the data repository 110 is shown internal to the system 100, it will be noted that, in alternate embodiments, the data repository 110 can also be implemented external to the system 100, where the data repository 110 may be stored within a database (repository 110) communicatively coupled to the system 100. The data contained within such external database may be periodically updated. For example, new data may be added into the database (not shown in FIG. 1) and/or existing data may be modified and/or non-useful data may be deleted from the database. In one example, the data may be stored in an external system, such as a Lightweight Directory Access Protocol (LDAP) directory and a Relational Database Management System (RDBMS). Functions of the components of the system 100 are now explained with reference to the flow diagrams in FIG. 2 and FIG. 3, and the example diagrams in FIGS. 4A and 4B.
FIGS. 2A and 2B (collectively referred to as FIG. 2) is a flow diagram depicting steps involved in the process of generating prompts for the fashion attribute extraction being performed by the system of FIG. 1, according to some embodiments of the present disclosure. In an embodiment, the system 100 comprises one or more data storage devices or the memory 104 operatively coupled to the processor(s) 102 and is configured to store instructions for execution of steps of the method 200 by the processor(s) or one or more hardware processors 102. The steps of the method 200 of the present disclosure will now be explained with reference to the components or blocks of the system 100 as depicted in FIG. 1 and the steps of flow diagram as depicted in FIGS. 2, and 3. Although process steps, method steps, techniques or the like may be described in a sequential order, such processes, methods, and techniques may be configured to work in alternate orders. In other words, any sequence or order of steps that may be described does not necessarily indicate a requirement that the steps to be performed in that order. The steps of processes described herein may be performed in any order practical. Further, some steps may be performed simultaneously.
At step 202 of method 200, the system 100 receives as input, via the one or more hardware processors 102, a) an incremental dataset comprising (i) a plurality of images of a plurality of products, (ii) one or more attributes for each of the plurality of products, and (iii) an attribute value for each of the one or more attributes. The incremental dataset is obtained by adding an evolving ontology to a pre-existed database. The system 100 also receives as input, a first generative visual language model trained on the pre-existed database. The first generative visual language model includes a visual encoder, a first linear layer, and a Large Language Model (LLM). This architecture is depicted in FIG. 4B. In the fashion industry, the products maybe shirts, t-shirts, shorts, pants, and so on. If we take shirt as an example, the shirt may have attributes such as but not limited to color, and sleeve length. For the attribute color, the attribute values maybe red, blue, green and so on. Similarly, the attribute sleeve length can have attribute values ‘full sleeve’, “half-sleeve” and so on. Consider that these attributes and the attribute values are part of the pre-existed database. As the fashion trends keep on changing around the world, attributes other than the ones already captured in the pre-existed database may evolve. For example, consider a relatively new sleeve type ‘cup sleeve’. This is an example of evolving ontology. Introduction of new products to the markets, related attributes, and attribute values, causes existing ontology to evolve, which, unless factored-in, may affect efficiency and accuracy with which FAE is being performed.
A dynamically evolving ontology is represented as:
O^t= {?PC?^t??AT?^t??AV?^t } --- (1)
where ?PC?^t,?AT?^t,?AV?^t are the Product Categories, Attribute Types, and Attribute Values respectively, which are part of the ontology at the t^th incremental step. Hierarchy exists between the PC,AT,AV, where ATs are the children of PCs and AVs are the children of ATs. At a ?t+1?^th incremental step, O^t= {?PC?^t??AT?^t??AV?^t }, where {O^(t+1) }-{O^t } are the updated product categories, Attributes and their values at incremental step ?? + 1. If the product categories are not updated at incremental step t+1 then {?PC?^(t+1) }= {?PC?^t }. The same is true for AT and AV. A continual learning setting is considered, where the training set D_t^train used to train the model M^t at incremental step t, is not available at the incremental step t+1. Thus, D_train^tn D_train^(t+1) = ?. At the incremental step t+1, the task is to label image I with values ?AV?^(t+1) ?? O?^(t+1), which are children of all ?AT?^(+1)applicable for the ?PC?^(t+1) the image belongs to. Additionally, the model M^(t+1) trained at incremental step t+1, should yield minimal performance drop for images I?D_test^t labelled with ontology ? O?^t, demonstrating minimal catastrophic forgetting, where D_test^t is the test set at incremental step t.
Examples of different types of changes the evolving ontology may accommodate are given in Table. 1. Examples of the evolving ontology are depicted in FIG. 4A. Blocks with the dotted pattern indicate new data (new addition to existing database), and the blocks without the pattern represent pre-existed database. FIG. 4A depicts a Type 2 change and a Type 3 change, where. As in Table. 1 and in FIG. 4A, the Type 2 change represents old product with new attribute type, and the Type 3 change represents new product with existing attributes. Different other types of changes (Type 1, Type 4, Type 5) are not depicted in figures, but are defined in Table. 1.
Type of Change Description
Type 1 ?????? ?????? ?????? PC,AT,and AV
Old product with a new attribute value
Type 2 ?????? ?????? ?????? PC,AT,and AV
Old product with a new attribute type
Type 3 ?????? ?????? ?????? PC,AT,and AV
New product with existing attributes
Type 4 ?????? ?????? ?????? PC,AT,and AV
New product new attribute values
Type 5 ?????? ?????? ?????? PC,AT,and AV
New product with new attributes
Table. 1
Further, at step 204 of the method 200, the system 100 generates, via the one or more hardware processors 102, a plurality of questions for each of the one or more attributes of each of the plurality of products, wherein answer to each of the plurality of questions is the associated attribute value. For example, the question maybe “what is sleeve length” of a shirt in a given image. The system 100 may use a suitable Visual Question Answering (VQA) approach for generating the plurality of questions. Each of a plurality of labels for the image consists of attribute types (AT) and corresponding attribute values (AV) in the image. For an image, using each pair of AT and AV, the system 100 formulates the VQA dataset. The questions pertains to that attribute type, while, the answers are the ground truth answers of attribute values.
Further, at step 206 of the method 200 the system 100 generates, via the one or more hardware processors 102, a Visual Question Answering (VQA) dataset comprising a plurality of triplets (I, Q, A), wherein in each of the plurality of triplets, I represents image of each of the plurality of products, Q represents each of the plurality of questions, associated with each attribute among the one or more attributes of the product in the image I, and A represents answer to each of the plurality of questions. For example, one triplet may contain image of the shirt, question ‘what is sleeve length’, and associated answer ‘half sleeve’.
Further, at step 208 of the method 200, the system 100 initializes, via the one or more hardware processors 102, a second generative visual language model with the VQA dataset. The second generative visual language model includes the visual encoder, a second linear layer and the LLM.
Further, at step 210 of the method 200, the system 100 extracts, via the one or more hardware processors 102, a plurality of image features by passing each image I in the VQA dataset through the visual encoder. These image features that are obtained after passing the image through the visual encoder are representative of the presence of various attributes in a fashion article in the image.
Further, at step 212 of the method 200, the system 100 generates, via the one or more hardware processors 102, a first visual token T1I and a second visual tokenT2I by passing the extracted plurality of image features through the first linear layer and the second linear layer, respectively. Here the first visual token captures the information that has been learnt previously, and the second visual token captures information that is needed to be learnt in order to gain new information.
Further, at step 214 of the method 200, the system 100 generates, via the one or more hardware processors 102, a first prompt and a second prompt by prepending the first visual token and the second visual token respectively to the associated question Q in the VQA dataset. For example, textual prompt for jth instance in the VQA dataset having N attributes, the ith prompt ???? for the ????h attribute is created as follows: ‘What is the ?????? of this ???? ?? ?’. These textual prompts of the associated questions Q are first passed through a tokenizer and these prompt tokens are then appended with the visual tokens.
The first prompt is then passed to the LLM of the first generative visual language model to obtain a first answer A1, and the second prompt is passed to the second generative visual language model to obtain a second answer A2. Further, the system 100 computes a) a Kullback–Leibler (KL) divergence loss between the first answer and the second answer, and b) a language modeling loss between the second answer obtained from the LLM and an associated answer in the VQA dataset. The second generative visual language model is then trained to jointly optimize the KL divergence loss and the language modelling loss. Training the second generative visual language model to optimize the KL divergence loss and the language modelling (LM) loss causes learning of the evolving ontology while retaining information in the pre-existed database. The answers from the first and second generative visual language models are a set of N sequential tokens representing the attribute value. As the LLM is trained using next token prediction, it learns to predict the next token given the set of previous tokens. Mathematically, the LM loss for the tokens of answer A2 is represented as follows:
-¦(E@(I,Q,A)?D)[?_i?N¦logp(A_i^2 |(I,Q,A_(<1)^2 )) ] --- (1)
In (1), for each (I,Q,A) triplet, log-likelihood of a current token A_i^2 is maximized given (I,Q)and all the previous tokens (A21... A2i-1).
The KL-Divergence loss between the answers A^1 and A^2 is mathematically represented as follows:
-¦(E@(I,Q,A)?D)[logp(A^1 ) logp(A^1 )/logp(A^2 ) ] --- (2)
The KL-Divergence essentially measures the deviation between distributions of A^1 and A^2 and is used to optimize and reduce drift caused in model parameters while learning new information.
Experimental Data:
Implementation Details
Static FAE: . For both generative and discriminative models FashionCLIP ViT-Base/32 model was used due to its higher fashion domain knowledge compared to the traditional CLIP model. Additionally, for the ED and EDF frameworks, OPT-125m model was used as the LLM. The hyperparameters that yielded best results after an extensive grid search are described below. For the discriminative setting a learning rate of 1e^(-6) was used for the FashionCLIP model, while a learning rate of 1e^(-4) was used for the MLP head for the MLC model. For the generative models, a learning rate of 1e^(-6) was used for FashionCLIP and OPT-125m, while a learning rate of 1e^(-4) was used for the linear transformation layer. 4 visual tokens were used to represent the visual embedding from the FashionCLIP model. Further, training was conducted with a batch size of 32 and an Adam optimizer for all the models.
Incremental FAE: The hyperparameters used in the static setting were used for training all the models in the incremental setting. Additionally, 20, 1e^(-3) , and 1e^(-3) were used as the knowledge distillation coefficient ? for Mod-X, ZSCL, and LWF (MLC), respectively. For ED/(EDF+KD), ? was searched among {5e^(-4), 1e^(-3), 5e^(-3), 5e^(-2) }, and 1e^(-3) was identified as the best setting.
Evaluation Strategy
Static FAE: Some previous studies benchmarked methods on the DeepFashion dataset using Recall@3 and Recall@5 metrics with the retrieval set as the entire list of attribute values. However, these studies measured recall per attribute value and reported average recall over the top 50 attribute values having the highest recall. In the experiments conducted, average over all the attribute values was considered since it offered a better insight into model performance. Since, ED and EDF are generative style models, perplexity was used to derive the recall metric. For a test image I, let T_M be the multimodal input tokens passed as input to the LLM. The likelihood that the LLM generates a caption C conditioned on T_M is given by PLLM (C¦T_M ). Further, the perplexity of generating this caption is given by e^(-PLLM (C¦T_M ) ). In order to fetch the top predictions for a test image, the perplexity was calculated over a retrieval set consisting of all the attribute values and top-k values having the least perplexity were fetched, where ?? is 1, 3, or 5 to report mean average precision (mAP), R@3 and R@5, respectively.
Finetuning DeepFashion FashionAI
Models Parameters (Approx.) R@3 (?) R@5 (?) Acc (?) mAP (?)
Discriminative Models
FashionCLIP (FT)
MLC 100M 85M 21.55 27.5 64.5 47.09
15.80 19.24 47.24 46.62
Generative Models
ED 200M 48.83 56.28 72.9 57.08
EDF 200k 41.99 49.07 68.9 52.15
Table 1: Results on DeepFashion and FashionAI on static FAE task
Incremental FAE: For benchmarking models in the incremental FAE setting, two metrics were considered: In-Domain Learning (ID) and Backward Transfer (BT). In order to generate these metrics, at every incremental step the model performance was evaluated on test sets of current and all the previous increments. This leads to creation of a lower triangular matrix ??. The average of off-diagonal elements of ?? is reported as BT, while the average of diagonal elements is reported as ID. Thus, the metric ID is a measure to assess models capacity to learn new information at every incremental step, while, BT is used to observe amount of CF. The matrix ?? for the incremental DeepFashion dataset was constructed using the ??@3 metric, while ?????? was used for FashionAI dataset.
Static FAE Results:
Table 1 shows benchmarking results on the static FAE task on original DeepFashion and FashionAI datasets. It was observed that the ED model outperforms discriminative models by a large margin. On the DeepFashion dataset, it can be seen that the ED model offers around twice the recall compared to the discriminative models. While on the FashionAI dataset, the ED offered around 13% higher mAP than the discriminative models. Further, the EDF model was found to be outperforming the discriminative models on both datasets. Compared to ED, the EDF model performed marginally lower, which can be attributed to the fact that only a linear transformation layer is trained as opposed to training all the parameters of ED. Overall, it was observed that the generative models outperform the discriminative style of models with the difference margin increasing significantly on the more complex DeepFashion dataset.
DeepFashion (R@3 (?)) FashionAI (mAP (?))
Models ID BT ID BT
ED + KD 49.16 23.13 78.93 18.23
EDF + KD 33.55 28.56 67.46 31.80
ZSCL [56] 13.93 9.39 59.31 37.91
MLC (LWF) [17] 3.11 7.57 42.40 7.03
Mod-X [32] 15.46 9.87 67.84 33.84
Table 2: Incremental FAE results on DeepFashion and FashionAI. ID: In-Domain Learning, BT: Backward Transfer
Incremental FAE Results:
In Table 2, various incremental learning methods are compared, on synthesized incremental datasets. On the incremental DeepFashion dataset, it was observed that the generative models with the redesigned knowledge distillation loss outperforms other methods by a large margin. On the ID metric, the ED + KD model performed best in class, showing around three times higher learning of new information. Further, even on the
BT metric, ED + KD model was found to be showcasing around two times higher resilience to CF. Between the generative models, since the ED + KD model is fully finetuned at every incremental step, it has a higher ID than the EDF + KD model. However, on the BT metric, which informs on forgetting previously learnt information, it was observed that the EDF + KD model offered higher resilience against CF. This is primarily due to the frozen foundational models. Evidently, retaining past information while finetuning the entire model is difficult even with knowledge distillation. However, on the ED +KD model, since the foundational models were always frozen and only the linear transformation layer is updated at every incremental step, the availability of general features is kept intact, thus reducing forgetting to a large extent. Specifically for the MLC(LWF) model on the incremental DeepFashion dataset, it was observed that the model stopped learning new information from the second incremental step onwards. A matrix ?? for MLC(LWF) had high values for D_test^1 across all incremental steps and low values for D_test^2, D_test^3, and D_test^4. Hence, MLC(LWF) was not considered for subsequent analysis.
On the incremental FashionAI dataset, it was observed that while the ????+???? outperforms other methods on the ID metric, the gap is not as high as in the DeepFashion case. Further, ZSCL was found to be offering the best performance on the BT metric. However, EDF + KD was only marginally lower BT by around 15%. Importantly, ZSCL has an additional replay of a reference dataset to reduce forgetting; this could be a reason for the higher performance. Overall, all the methods performed comparably on the FashionAI dataset and did not show a significant deviation between the performance of generative and discriminative models. A contributing factor could be relatively simple ontology of the FashionAI dataset. Thus, it could be seen that generative models outperformed discriminative models by a large margin on relatively complex underlying ontology in the incremental setting.
The written description describes the subject matter herein to enable any person skilled in the art to make and use the embodiments. The scope of the subject matter embodiments is defined by the claims and may include other modifications that occur to those skilled in the art. Such other modifications are intended to be within the scope of the claims if they have similar elements that do not differ from the literal language of the claims or if they include equivalent elements with insubstantial differences from the literal language of the claims.
The embodiments of present disclosure herein address unresolved problem of Fashion Attribute Extraction (FAE) for an evolving ontology. The embodiment, thus provides a mechanism of generating prompts to train data model accommodating evolving ontology with respect to fashion attributes. Moreover, the embodiments herein further provide mechanism for training a data model using the generated prompts to perform the FAE accommodating evolving ontology by means of incremental learning.
It is to be understood that the scope of the protection is extended to such a program and in addition to a computer-readable means having a message therein; such computer-readable storage means contain program-code means for implementation of one or more steps of the method, when the program runs on a server or mobile device or any suitable programmable device. The hardware device can be any kind of device which can be programmed including e.g., any kind of computer like a server or a personal computer, or the like, or any combination thereof. The device may also include means which could be e.g., hardware means like e.g., an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a combination of hardware and software means, e.g., an ASIC and an FPGA, or at least one microprocessor and at least one memory with software processing components located therein. Thus, the means can include both hardware means and software means. The method embodiments described herein could be implemented in hardware and software. The device may also include software means. Alternatively, the embodiments may be implemented on different hardware devices, e.g., using a plurality of CPUs.
The embodiments herein can comprise hardware and software elements. The embodiments that are implemented in software include but are not limited to, firmware, resident software, microcode, etc. The functions performed by various components described herein may be implemented in other components or combinations of other components. For the purposes of this description, a computer-usable or computer readable medium can be any apparatus that can comprise, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
The illustrated steps are set out to explain the exemplary embodiments shown, and it should be anticipated that ongoing technological development will change the manner in which particular functions are performed. These examples are presented herein for purposes of illustration, and not limitation. Further, the boundaries of the functional building blocks have been arbitrarily defined herein for the convenience of the description. Alternative boundaries can be defined so long as the specified functions and relationships thereof are appropriately performed. Alternatives (including equivalents, extensions, variations, deviations, etc., of those described herein) will be apparent to persons skilled in the relevant art(s) based on the teachings contained herein. Such alternatives fall within the scope of the disclosed embodiments. Also, the words “comprising,” “having,” “containing,” and “including,” and other similar forms are intended to be equivalent in meaning and be open ended in that an item or items following any one of these words is not meant to be an exhaustive listing of such item or items, or meant to be limited to only the listed item or items. It must also be noted that as used herein and in the appended claims, the singular forms “a,” “an,” and “the” include plural references unless the context clearly dictates otherwise.
Furthermore, one or more computer-readable storage media may be utilized in implementing embodiments consistent with the present disclosure. A computer-readable storage medium refers to any type of physical memory on which information or data readable by a processor may be stored. Thus, a computer-readable storage medium may store instructions for execution by one or more processors, including instructions for causing the processor(s) to perform steps or stages consistent with the embodiments described herein. The term “computer-readable medium” should be understood to include tangible items and exclude carrier waves and transient signals, i.e., be non-transitory. Examples include random access memory (RAM), read-only memory (ROM), volatile memory, nonvolatile memory, hard drives, CD ROMs, DVDs, flash drives, disks, and any other known physical storage media.
It is intended that the disclosure and examples be considered as exemplary only, with a true scope of disclosed embodiments being indicated by the following claims.
, C , Claims:
1. A processor implemented method (200), comprising:
receiving (202), via one or more hardware processors, a) an incremental dataset comprising (i) a plurality of images of a plurality of products, (ii) one or more attributes for each of the plurality of products, and (iii) an attribute value for each of the one or more attributes, wherein the incremental dataset is obtained by adding an evolving ontology to a pre-existed database and b) a first generative visual language model trained on the pre-existed database, wherein the first generative visual language model comprises a visual encoder, a first linear layer, and a Large Language Model (LLM), as input;
generating (204), via the one or more hardware processors, a plurality of questions for each of the one or more attributes of each of the plurality of products, wherein an answer to each of the plurality of questions is associated attribute value;
generating (206), via the one or more hardware processors, a Visual Question Answering (VQA) dataset comprising a plurality of triplets (I, Q, A), wherein in each of the plurality of triplets, I represents image of each of the plurality of products, Q represents each of the plurality of questions associated with each attribute among the one or more attributes of a product among the plurality of products in the image I, and A represents answer to each of the plurality of questions;
initializing (208), via the one or more hardware processors, a second generative visual language model with the VQA dataset, wherein the second generative visual language model comprises the visual encoder, a second linear layer and the LLM;
extracting (210), via the one or more hardware processors, a plurality of image features by passing each image I in the VQA dataset through the visual encoder;
generating (212), via the one or more hardware processors, a first visual token and a second visual token by passing the extracted plurality of image features through the first linear layer and the second linear layer; and
generating (214), via the one or more hardware processors, a first prompt and a second prompt by prepending the first visual token and the second visual token respectively to the associated question Q in the VQA dataset.
2. The method as claimed in claim 1, comprising:
passing (302) the first prompt to the LLM of the first generative visual language model and the second prompt to the second generative visual language model to obtain a first answer and a second answer;
computing (304) a) a Kullback–Leibler (KL) divergence loss between the first answer and the second answer, and b) a language modeling loss between the second answer obtained from the LLM and an associated answer in the VQA dataset; and
training (306) the second generative visual language model to jointly optimize the KL divergence loss and the language modelling loss.
3. The method as claimed in claim 2, wherein by training the second generative visual language model to optimize the KL divergence loss and the language modelling loss causes learning of the evolving ontology while retaining information in the pre-existed database.
4. A system (100), comprising:
one or more hardware processors (102);
a communication interface (112); and
a memory (104) storing a plurality of instructions, wherein the plurality of instructions when executed, cause the one or more hardware processors to:
receive a) an incremental dataset comprising (i) a plurality of images of a plurality of products, (ii) one or more attributes for each of the plurality of products, and (iii) an attribute value for each of the one or more attributes, wherein the incremental dataset is obtained by adding an evolving ontology to a pre-existed database and b) a first generative visual language model trained on the pre-existed database, wherein the first generative visual language model comprises a visual encoder, a first linear layer, and a Large Language Model (LLM), as input;
generate a plurality of questions for each of the one or more attributes of each of the plurality of products, wherein an answer to each of the plurality of questions is associated attribute value;
generate a Visual Question Answering (VQA) dataset comprising a plurality of triplets (I, Q, A), wherein in each of the plurality of triplets, I represents image of each of the plurality of products, Q represents each of the plurality of questions associated with each attribute among the one or more attributes of a product among a plurality of products, in the image I, and A represents answer to each of the plurality of questions;
initialize a second generative visual language model with the VQA dataset, wherein the second generative visual language model comprises the visual encoder, a second linear layer and the LLM;
extract a plurality of image features by passing each image I in the VQA dataset through the visual encoder;
generate a first visual token and a second visual token by passing the extracted plurality of image features through the first linear layer and the second linear layer; and
generate a first prompt and a second prompt by prepending the first visual token and the second visual token respectively to the associated question Q in the VQA dataset.
5. The system as claimed in claim 4, wherein the one or more hardware processors are configured to:
pass the first prompt to the LLM of the first generative visual language model and the second prompt to the second generative visual language model to obtain a first answer and a second answer;
compute a) a Kullback–Leibler (KL) divergence loss between the first answer and the second answer, and b) a language modeling loss between the second answer obtained from the LLM and an associated answer in the VQA dataset; and
train the second generative visual language model to jointly optimize the KL divergence loss and the language modelling loss.
6. The system as claimed in claim 5, wherein training the second generative visual language model to optimize the KL divergence loss and the language modelling loss causes learning of the evolving ontology while retaining information in the pre-existed database.
| # | Name | Date |
|---|---|---|
| 1 | 202421021527-STATEMENT OF UNDERTAKING (FORM 3) [21-03-2024(online)].pdf | 2024-03-21 |
| 2 | 202421021527-REQUEST FOR EXAMINATION (FORM-18) [21-03-2024(online)].pdf | 2024-03-21 |
| 3 | 202421021527-FORM 18 [21-03-2024(online)].pdf | 2024-03-21 |
| 4 | 202421021527-FORM 1 [21-03-2024(online)].pdf | 2024-03-21 |
| 5 | 202421021527-FIGURE OF ABSTRACT [21-03-2024(online)].pdf | 2024-03-21 |
| 6 | 202421021527-DRAWINGS [21-03-2024(online)].pdf | 2024-03-21 |
| 7 | 202421021527-DECLARATION OF INVENTORSHIP (FORM 5) [21-03-2024(online)].pdf | 2024-03-21 |
| 8 | 202421021527-COMPLETE SPECIFICATION [21-03-2024(online)].pdf | 2024-03-21 |
| 9 | Abstract1.jpg | 2024-05-16 |
| 10 | 202421021527-FORM-26 [20-05-2024(online)].pdf | 2024-05-20 |
| 11 | 202421021527-Proof of Right [24-07-2024(online)].pdf | 2024-07-24 |