Sign In to Follow Application
View All Documents & Correspondence

Method And System For Ontology Guided Supervised Contrastive Learning

Abstract: State-of-the-art approaches for fashion attribute extraction model attribute extraction as a multi label classification problem during training of data models, which leads to poor performance on fine-grained attribute extraction. Some of these approaches use multi-task learning by using product category classification, landmark and/or key-point detection as auxiliary task(s) to improve the performance. However, these approaches fail to determine and consider relationships between different values, which may be a crucial factor helping in differentiating between the attributes. Method and system in the embodiments disclosed herein provide mechanism that involves determining attribute value relatedness based on an ontology guided approach, to generate a trained Supervised Contrastive Language Image Pretraining (SCLIP) model, which is further used for performing the fashion attribute extraction.

Get Free WhatsApp Updates!
Notices, Deadlines & Correspondence

Patent Information

Application #
Filing Date
26 May 2023
Publication Number
48/2024
Publication Type
INA
Invention Field
COMPUTER SCIENCE
Status
Email
Parent Application

Applicants

Tata Consultancy Services Limited
Nirmal Building, 9th Floor, Nariman Point, Mumbai 400021, Maharashtra, India

Inventors

1. PALIWAL, Shubham Singh
Tata Consultancy Services Limited, 4th & 5th Floor, PTI Building, 4 Parliament Street, New Delhi – 110001, India
2. PATIDAR, Mayur
Tata Consultancy Services Limited, 4th & 5th Floor, PTI Building, 4 Parliament Street, New Delhi – 110001, India
3. PATWARDHAN, Manasi Samarth
Tata Consultancy Services Limited, Tata Research Design and Development center, HADAPSAR INDUSTRIAL ESTATE-2, 54-B, Hadapsar, Pune – 411013, Maharashtra, India
4. VIG, Lovekesh
Tata Consultancy Services Limited, 4th & 5th Floor, PTI Building, 4 Parliament Street, New Delhi – 110001, India
5. KARANDE, Shirish Subhash
Tata Consultancy Services Limited, Commerzone Building No 7, Samrat Ashok Path, Yerwada, Pune – 411006, Maharashtra, India
6. MAHAJAN, Meghna Kishor
Tata Consultancy Services Limited, Deccan Park, Plot No 1, Survey No. 64/2, Software Units Layout, Serilingampally Mandal, Madhapur, Hyderabad – 500081, Telangana, India
7. VASUDEVAN, Bagya Lakshmi
Tata Consultancy Services Limited, Magnum Module-4, 3rd Floor South Block, Chennai One It Sez Phase-2, 200 Feet Radial Rd, MCN Nagar Extension, Pallavaram, Thoraipakkam – 600097, Tamil Nadu, India

Specification

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 ONTOLOGY GUIDED SUPERVISED CONTRASTIVE LEARNING

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 a method and system for ontology guided supervised contrastive learning.

BACKGROUND
Fashion attributes are key to many downstream tasks in e-commerce such as product recommendation, fashion captioning, item matching, fashion image retrieval and generation. Extraction of appropriate fine-grained attributes from fashion images is a pre-requisite for automation of multiple e-commerce tasks, including product copy generation, catalog search, product recommendation, fashion image generation, and retrieval. Accurately extracted attributes provide more control over down-stream tasks. For example, a product copy is a succinct description of products and needs to cover only important attributes that enhance customer appeal. Instead of directly generating product copy from a fashion product image, attribute extraction as an intermediate step allows for more controlled generation, covering only selective attributes (depending on the brand, product uniqueness and/or product copy style), and reducing hallucinations.
Most state-of-the-art approaches for fashion attribute extraction model attribute extraction as a multi label classification problem during training of data models, which leads to poor performance on fine-grained attribute extraction. Some of these approaches use multi-task learning by using product category classification, landmark and/or key-point detection as auxiliary task(s) to improve the performance. However, these approaches fail to determine and consider relationships between different values, which maybe a crucial factor helping in differentiating between the attributes.

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 plurality of images and associated text from a dataset, as input data. Further, a multimodal representation of each of the plurality of images is obtained, via the one or more hardware processors, by processing each of the plurality of images using an image encoder and a multimodal image projection layer of a Supervised Contrastive Language Image Pretraining (SCLIP) model executed by the one or more hardware processors. Further, a multimodal representation of the associated text is obtained, via the one or more hardware processors, by processing the associated text using a text encoder and a multimodal text projection layer of the SCLIP model. Further, one or more cosine similarity matrices are constructed via the one or more hardware processors, from the multimodal representation of image and the multimodal representation of the text, wherein a cosine similarity between representation of one or more positive image-attributes pairs is maximum and the cosine similarity between one or more negative image-attributes pairs is minimum. Further, the one or more positive image-attributes pairs and the one or more negative image-attributes pairs are augmented via the one or more hardware processors, with a focal loss, to reduce a class imbalance and to reduce the cosine similarity between the one or more negative image-attributes pairs. Further, an Ontology Guided Supervised Contrastive Loss is computed, via the one or more hardware processors, based on the one or more image-attributes pairs and the one or more negative image-attributes pairs augmented with the focal loss. Further, the SCLIP model is trained based on the Ontology Guided Supervised Contrastive Loss, to generate a trained SCLIP model.
In another embodiment, a fashion attribute feature extraction is performed using the trained SCLIP model.
In another embodiment, all image-attribute pairs that are siblings of each other in a fashion ontology are determined as hard-negative pairs, wherein the hard-negative pairs are used for contrastive learning for the feature extraction.
In yet another embodiment, the method includes computation of the Ontology Guided Supervised Contrastive Loss as:

L_OGSCL= L_CLIP^(SupCon+)+ ? L_CLIP^(SupCon-)
,
where,
L_CLIP^(SupCon+) represents the one or more positive image-attributes, and L_CLIP^(SupCon-) represents the one or more negative image-attributes.

In yet another embodiment, the trained SCLIP models a fine-granular multi-label fashion attribute classification as a matching problem to address relatedness of attribute values embedded in an attribute ontology.
In yet 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 cause the one or more hardware processors to receive a plurality of images and associated text from a dataset, as input data. Further, a multimodal representation of each of the plurality of images is obtained, via the one or more hardware processors, by processing each of the plurality of images using an image encoder and a multimodal image projection layer of a Supervised Contrastive Language Image Pretraining (SCLIP) model executed by the one or more hardware processors. Further, a multimodal representation of the associated text is obtained, via the one or more hardware processors, by processing the associated text using a text encoder and a multimodal text projection layer of the SCLIP model. Further, one or more cosine similarity matrices are constructed via the one or more hardware processors, from the multimodal representation of image and the multimodal representation of the text, wherein a cosine similarity between representation of one or more positive image-attributes pairs is maximum and the cosine similarity between one or more negative image-attributes pairs is minimum. Further, the one or more positive image-attributes pairs and the one or more negative image-attributes pairs are augmented via the one or more hardware processors, with a focal loss, to reduce a class imbalance and to reduce the cosine similarity between the one or more negative image-attributes pairs. Further, an Ontology Guided Supervised Contrastive Loss is computed, via the one or more hardware processors, based on the one or more image-attributes pairs and the one or more negative image-attributes pairs augmented with the focal loss. Further, the SCLIP model is trained based on the Ontology Guided Supervised Contrastive Loss, to generate a trained SCLIP model.
In yet another embodiment, the system performs a fashion attribute feature extraction using the trained SCLIP model.
In yet another embodiment, the system determines all image-attribute pairs that are siblings of each other in a fashion ontology as hard-negative pairs, wherein the hard-negative pairs are used for contrastive learning for the feature extraction.
In yet another embodiment, the system computes the Ontology Guided Supervised Contrastive Loss as:

L_OGSCL= L_CLIP^(SupCon+)+ ? L_CLIP^(SupCon-)
where,
L_CLIP^(SupCon+) represents the one or more positive image-attributes, and L_CLIP^(SupCon-) represents the one or more negative image-attributes.
In yet another embodiment, the trained SCLIP of the system models a fine-granular multi-label fashion attribute classification as a matching problem to address relatedness of attribute values embedded in an attribute ontology.
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, causes one or more hardware processors to receive a plurality of images and associated text from a dataset, as input data. Further, a multimodal representation of each of the plurality of images is obtained, via the one or more hardware processors, by processing each of the plurality of images using an image encoder and a multimodal image projection layer of a Supervised Contrastive Language Image Pretraining (SCLIP) model executed by the one or more hardware processors. Further, a multimodal representation of the associated text is obtained, via the one or more hardware processors, by processing the associated text using a text encoder and a multimodal text projection layer of the SCLIP model. Further, one or more cosine similarity matrices are constructed via the one or more hardware processors, from the multimodal representation of image and the multimodal representation of the text, wherein a cosine similarity between representation of one or more positive image-attributes pairs is maximum and the cosine similarity between one or more negative image-attributes pairs is minimum. Further, the one or more positive image-attributes pairs and the one or more negative image-attributes pairs are augmented via the one or more hardware processors, with a focal loss, to reduce a class imbalance and to reduce the cosine similarity between the one or more negative image-attributes pairs. Further, an Ontology Guided Supervised Contrastive Loss is computed, via the one or more hardware processors, based on the one or more image-attributes pairs and the one or more negative image-attributes pairs augmented with the focal loss. Further, the SCLIP model is trained based on the Ontology Guided Supervised Contrastive Loss, to generate a trained SCLIP model.
In yet another embodiment, the non-transitory computer readable medium causes the trained SCLIP model to perform a fashion attribute feature extraction.
In yet another embodiment, the non-transitory computer readable medium causes the one or more hardware processors to determine all image-attribute pairs that are siblings of each other in a fashion ontology as hard-negative pairs, wherein the hard-negative pairs are used for contrastive learning for the feature extraction.
In yet another embodiment, the non-transitory computer readable medium causes computation of the Ontology Guided Supervised Contrastive Loss as:


L_OGSCL= L_CLIP^(SupCon+)+ ? L_CLIP^(SupCon-)
where,
L_CLIP^(SupCon+) represents the one or more positive image-attributes, and L_CLIP^(SupCon-) represents the one or more negative image-attributes.

In yet another embodiment, the non-transitory computer readable medium causes the trained SCLIP to model a fine-granular multi-label fashion attribute classification as a matching problem to address relatedness of attribute values embedded in an attribute ontology.
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 depicts example diagrams depicting attribute value relatedness, captured in the ontology in FIG. 3, according to some embodiments of the present disclosure.
FIG. 2 illustrates an exemplary system for fashion attribute extraction, according to some embodiments of the present disclosure.
FIGS. 3A and 3B (collectively referred to as FIG. 3) is a flow diagram depicting steps involved in the process of generating a trained Supervised Contrastive Language Image Pretraining (SCLIP) model for the fashion attribute extraction, by the system of FIG. 1, according to some embodiments of the present disclosure.
FIG. 4 illustrates an example of fashion ontology, used by the system of FIG. 1, in accordance with 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.
In fashion attribute extraction context, certain attribute types are applicable to certain product categories and one attribute type may take one or more values. For example, the sleeve length attribute type for product category ‘blouse’ may have values such as sleeveless, cup sleeves, short sleeves, etc. This makes, extraction of attributes from fashion images non-trivial given its fine-granular nature. This is depicted in FIG. 1. For example, an image representation (e.g. I1 in Figure 1) should be closer to the attribute value representations with which it is labelled (e.g. text prompt T1 for attribute value ‘wrist length Sleeves’). Thus, indirectly bringing the image representations of two images having the same attribute value (e.g. ‘wrist length sleeves’) for an attribute type (e.g. ‘Sleeve Length’) closer and image representations farther when the two images hold distinct values (e.g. ‘turtle neck’ and ‘Ruffle Semi-High Collar neck’) for an attribute type (e.g. ‘neck design’). More importantly, to embed the attribute relatedness depicted by the ontology structure in FIG. 1, the image representation should be farther from the attribute values which are siblings (other values of the same attribute type) of the attribute value the image is annotated with. For example, image representation I1 in figure 1 should be farther to the text prompt representation T2 for attribute value ‘log length sleeves’, which is the sibling of (belongs to the same attribute type ‘sleeve length’) the attribute value ‘wrist length sleeves’, with which the I1 is labelled. Such attribute values belonging to same attribute type are hard to distinguish. I1 and I2 have been taken from an openly available FashionAI database (tianchi.aliyun.com/dataset/136948).
Most state-of-the-art approaches for fashion attribute extraction model attribute extraction as a multi label classification problem during training of data models, which leads to poor performance on fine-grained attribute extraction. Some of these approaches use multi-task learning by using product category classification, landmark and/or key-point detection as auxiliary task(s) to improve the performance. However, these approaches fail to determine and consider relationships between different values, which may be a crucial factor helping in differentiating between the attributes.
To address these challenges, a method and system for ontology guided supervised contrastive learning is provided. The method includes receiving, via one or more hardware processors, a plurality of images and associated text from a dataset, as input data. Further, a multimodal representation of each of the plurality of images is obtained, via the one or more hardware processors, by processing each of the plurality of images using an image encoder and a multimodal image projection layer of a Supervised Contrastive Language Image Pretraining (SCLIP) model executed by the one or more hardware processors. Further, a multimodal representation of the associated text is obtained, via the one or more hardware processors, by processing the associated text using a text encoder and a multimodal text projection layer of the SCLIP model. Further, one or more cosine similarity matrices are constructed via the one or more hardware processors, from the multimodal representation of image and the multimodal representation of the text, wherein a cosine similarity between representation of one or more positive image-attributes pairs is maximum and the cosine similarity between one or more negative image-attributes pairs is minimum. Further, the one or more positive image-attributes pairs and the one or more negative image-attributes pairs are augmented via the one or more hardware processors, with a focal loss, to reduce a class imbalance and to reduce the cosine similarity between the one or more negative image-attributes pairs. Further, an Ontology Guided Supervised Contrastive Loss is computed, via the one or more hardware processors, based on the one or more image-attributes pairs and the one or more negative image-attributes pairs augmented with the focal loss. Further, the SCLIP model is trained based on the Ontology Guided Supervised Contrastive Loss, to generate a trained SCLIP model. In another embodiment, a fashion attribute feature extraction is performed using the trained SCLIP model.
Referring now to the drawings, and more particularly to FIG. 2 through FIG. 4, 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. 2 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 fashion attribute extraction, being performed by the system 100. 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.
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 steps in flow diagram in FIG. 3 and the ontology structure in FIG. 4.
FIGS. 3A and 3B (collectively referred to as FIG. 3) is a flow diagram depicting steps involved in the process of generating a trained Supervised Contrastive Language Image Pretraining (SCLIP) model for the fashion attribute extraction, 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 method 300 in FIG. 3 by the processor(s) or one or more hardware processors 102. The steps of the method 300 of the present disclosure will now be explained with reference to the components or blocks of the system 100 as depicted in FIG. 2 and the steps of flow diagram as depicted in FIG. 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 302 of the method 300, the system 100 receives, via the one or more hardware processors 102, a plurality of images and associated text from a dataset, as input data. The input data may correspond to a fashion ontology O, which consists of fashion-related concepts (e.g., Product Category (PC), Attribute Type (AT), and Attribute Values (AV), etc.) which are arranged in the form of a hierarchy and are connected to each other via appropriate relationships. For e.g., ‘Blouse’ is an instance of a product category with Neck, Sleeve, Print, etc., as attribute types and turtle, draped collar, etc., are some of the attribute values of attribute type Neck, as depicted in the ontology structure in FIG. 4, which comprises of data such as but not limited to product category, valid attribute types, and corresponding attribute values.
For the purpose of the fashion attribute extraction, initially a problem is modelled as below. Given the fashion ontology O, and corresponding annotated dataset, i.e. D= {(I_1,A_1 ),(I_2,A_2 )… (I_n,A_n )}, where ith image I_i is annotated with A_i= {?PC?_i^j,?AT?_i^j,… ?AT?_j^m }, product category ?PC?_i^j, valid attribute types {?AT?_j^l,… ?AT?_j^m }, and corresponding valid attribute values ?AT?_j^l= {?AV?_l^1,… ?AV?_l^k }, objective is to automatically annotate a test image with respect to O.
Further, at step 304 of the method 300, a multimodal representation of each of the plurality of images is obtained, via the one or more hardware processors 102, by processing each of the plurality of images using an image encoder and a multimodal image projection layer of a Supervised Contrastive Language Image Pretraining (SCLIP) model executed by the one or more hardware processors. The system 100 obtains the multimodal representation of each of the plurality of images by first passing each of the plurality of images through an image encoder (f_CLIP^IE) and then through a multi model image projection layer (W_I ), of the SCLIP, i.e. I^e= W_I.f_CLIP^IE (I).
Further, at step 306 of the method 300, a multimodal representation of the associated text (which maybe attribute value) is obtained, via the one or more hardware processors 102, by processing the associated text using a text encoder (f_CLIP^IE) and a multimodal text projection layer (W_T ) of the SCLIP model, i.e. T^e= W_T.f_CLIP^TE (T).
Further, at step 308 of the method 300, the system 100 constructs one or more cosine similarity matrices via the one or more hardware processors 102, from the multimodal representation of image and the multimodal representation of the text, wherein a cosine similarity between representation of one or more positive image-attributes pairs is maximum and the cosine similarity between one or more negative image-attributes pairs is minimum. In an embodiment, the SCLIP is pre-trained on (image, text) pairs by maximizing the cosine similarity between representations of B (image,text) pairs and minimizing the cosine similarity for B^2-B invalid pairs in a batch size of B, as:

L_CLIP= -1/B ?_(i=1)^B¦log?[exp(/t)/(?_(a=1)^B¦exp?(/t) )] - 1/B ?_(j=1)^B¦log?[exp(/t)/(?_(a=1)^B¦exp?(/t) )]

--- (1)
In the fashion domain, an image might share the attribute values with other images based on the category to which they belong or due to visual similarity among them. For example, a fashion image of a shirt and a fashion image of a blouse may both share attribute value ‘rib collar’ for attribute type ‘collar design’. Unlike traditional CLIP, the SCLIP is configured to consider all (image, attribute) pairs in B, which share the same attribute, as positive pairs and others as negative. During fine-tuning of the SCLIP, the system 100 is configured to maximize the cosine similarity between representation of positive (image, attributes) and minimize the cosine similarity between negative pairs, as:

L_CLIP^(SupCon+)= -1/B ?_(i=1)^B¦? 1/|P(i)| ?_(p? P (i))¦log ??[exp(/t)/(?_(a=1)^B¦exp?(/t) )] - 1/B ?_(j=1)^B¦?1/|P(j)| ?_(p? P (j))¦log??[exp(/t)/(?_(a=1)^B¦exp?(/t) )]
--- (2)
Further, at step 310 of the method 300, the system 100 augments the one or more positive image-attributes pairs and the one or more negative image-attributes pairs, via the one or more hardware processors, with a focal loss, to reduce a class imbalance and to reduce the cosine similarity between the one or more negative image-attributes pairs. The class imbalance, if present in a dataset, makes it harder to learn good representation for rare classes via supervised contrastive learning due to absence of positive pairs for low frequency attribute values in B. Hence at the step 310, the system 100 augments L_CLIP^SupCon with the focal loss as in equation (3), and directly minimizes the cosine similarity among negative (image, attribute) pairs (L_CLIP^(SupCon-)) as in equation (4).

L_CLIP^(SupCon+)= -1/B ?_(i=1)^B¦? 1/|P(i)| ?_(p? P (i))¦[1- [exp(/t)/(?_(a=1)^B¦exp?(/t) )]]^? ???exp(/t)/(?_(a=1)^B¦exp?(/t) )- ? 1/B ?_(j=1)^B¦1/((j)) ?_(p? P (j))¦[1- [exp(/t)/(?_(a=1)^B¦exp?(/t) )]]^? exp(/t)/(?_(a=1)^B¦exp?(/t) )
---- (3)

L_CLIP^(SupCon-)= -1/B ?_(i=1)^B¦? 1/|N(i)| ?_(n? N (i))¦log?[1- exp(/t)/(?_(a=1)^B¦exp?(/t) )] ???- ? 1/B ?_(j=1)^B¦1/N(j) log?|1- exp(/t)/(?_(a=1)^B¦exp?(/t) ) |
--- (4)
Further, at step 312 of the method 300, an Ontology Guided Supervised Contrastive Loss is computed, via the one or more hardware processors, based on the one or more image-attributes pairs and the one or more negative image-attributes pairs augmented with the focal loss. At this step, all image-attribute pairs that are siblings of each other in a fashion ontology are determined as hard-negative pairs, wherein the hard-negative pairs are used for contrastive learning for the feature extraction. As shown in Fig 1, text prompt T1 from attribute value “wrist length Sleeves” is a hard negative pair for image I2 with attribute value “Long length Sleeves”, if they appear in the same batch B. The Ontology Guided Supervised Contrastive Loss is computed as:
L_OGSCL= L_CLIP^(SupCon+)+ ? L_CLIP^(SupCon-) --- (5)

where,
L_CLIP^(SupCon+) represents the one or more positive image-attributes, and L_CLIP^(SupCon-) represents the one or more negative image-attributes.
In an embodiment, to improve the robustness of ?????????? - ??????, the system 100 may perform data augmentation by applying attribute-invariant transformations over images present in D. Further, at step 314 of the method 300, the SCLIP model is trained based on the Ontology Guided Supervised Contrastive Loss, to generate a trained SCLIP model. In an embodiment, the trained SCLIP models a fine-granular multi-label fashion attribute classification as a matching problem to address relatedness of attribute values embedded in an attribute ontology.
In a test scenario, i.e. maybe in a practical application, a fashion attribute feature extraction is performed using the trained SCLIP model on a test image. At this stage, given a test image (I_test), the system 100 obtains the multimodal representation I_test^e via the image encoder of the SCLIP, i.e. I_test^e= W_I.f_CLIP^IE (I_test). So as to predict the product category, the system 100 calculates the cosine similarity between the I_test^e and the multimodal representation of the textual prompt corresponding to each product category present in the fashion ontology O, and chooses the one (?PC?_i ) with maximum cosine similarity, argmax. For the attribute prediction, the system 100 then calculates the cosine similarity between I_test^e and the multimodal representation of the textual prompt corresponding to each attribute value for an attribute type (applicable to that product category) and chooses the one (?AV?_i ) with maximum cosine similarity, and this is repeated independently for all attribute types.

Experimental Data:

Datasets used
DeepFashion: Consisted of 289,222 fashion images (Train: 209,222, Validation: 40,000 and Test: 40,000), each belonging to one of 50 different categories and annotated w.r.t the ontology consisted of 5 attribute types and 1000 attribute values.
FashionAI: Consisted of 180,335 fashion images (Train: 144,335, Validation: 18,000 and Test: 18,000) which belonged to 6 different categories and were annotated w.r.t the ontology consisted of 8 design specific attribute types and 54 attribute values.
Baselines
Approaches such as Conditional Similarity Networks (CSN), Attribute-Specific Embedding Network (ASEN), Dual Attributeaware Ranking Network (DARN) and Convolutional Attribute Mask Network (CAMNet) are designed for fashion image retrieval by learning fine-grained attribute specific embedding for fashion images with metric learning. Instead, in the method 300 of the embodiments disclosed herein, attribute relatedness is taken into consideration for learning image representation by ontology guided training using contrastive setting.
WTBI, FashionNet, Bidirectional Convolutional Recurrent Neural Networks (BCRNNs), Texture and Shape biased Fashion Networks (TS-FashionNet), Single-Task Learning with Hierarchical Label Sharing (STL w/ HLS), Multi-Task Learning with RNN and Visual Attention (MTL w/ RNN + VA) and Two-Stream Multi-Task Network (TwoStreamMN) treat the attribute extraction as a multi-class classification task and takes help of auxiliary task(s) such as pose estimation, landmark prediction, category identification and/or object type detection by either jointly learning the model or following a staged pipeline, leading to improvement in the performance of the attribute extraction. As opposed to these approaches, instead of multi-class classification, the method 300 treats the attribute extraction task as a matching problem. HABP addresses the problem of class imbalance for fashion attribute extraction, by adaptively focusing on training hard data (attributes with very less tagged samples) followed by a method to synthesize complementary samples for such hard attributes. In the method 300, the class imbalance is handled by using focal loss, data augmentation and ontology guided hard negative sampling.
Contrastive Language-Image Pre-Training- Pretrained (CLIPP) has been used as baseline, where pre-trained version of the CLIP model is used without any task specific fine-tuning. Whereas, Supervised Contrastive Language-Image Pre-Training Finetuned (SCLIP-F) is where task specific finetuning of CLIP is performed for domain adaptation. Multilabel Classification (MLC) is where same base model is used, which is used as the image encoder in the CLIP setting and fine-tune it for multi-label attribute classification.

Training Details:

Pre-trained ViT/B-16 was used as the CLIP image encoder implemented in Pytorch, for the experiments. For all of the experiments, the models were trained on an Nvidia A-100, using batch size of 96 and the learning rate of 3e-6. For the MLC baseline, linear layers of size 512, 1024 and the dimension of attribute classes are appended to the end of the pre-trained image encoder, and fine-tuned using asymmetric focal loss. For Deepfashion a sigmoid activation layer was used per attribute, while for FashionAI grouped (as per attribute type) softmax activation distributed over attribute values was used. Validation set assistance was used in training, in which for each epoch, the negative pair sampling frequency is set in proportion to the nondiagonal validation set confusion matrix values, for each attribute pair, helping in better distinguishing confusing attribute pairs.

Evaluation:

Top-k Recall:- For a given attribute type, it refers to the fraction of test images for which the true attribute value is present in the top-k predicted attribute values. Also, for a dataset, Top-k recall is the mean of Top-K recall for each attribute type.

Mean Average Precision (mAP). For a given attribute type, it refers to the fraction of test images for which predicted attribute value matches with the ground truth. And for a dataset, mAP is the mean of mAP for each attribute type.

Results:

Pre-training Vs Fine-tuning for fine-grained fashion attribution extraction: As shown in Table 1 and Table 2a, for both the datasets, SCLIP outperformed CLIP by a significant margin, which suggests that pre-trained CLIP cannot be used without fine-tuning for attribute extraction in fashion domain.
Multilabel classification vs Matching: As depicted in Table 1 OGSCL-FAE outperforms MLC on DeepFashion by 20.74% and 20% in terms of Top-3 and Top-5 recall, respectively. Similarly, in Table 2a, it also outperforms MLC on FashionAI by 8.1% in terms of mAP. This suggests that fashion ontology is a key component to achieve better performance on fine-grained attribute classification i.e., during the training contrasting an attribute value with all its sibling (OGSCL-FAE) is important as compared to maximizing the likelihood of an attribute value in isolation with respect to it’s sibling (MLC).
OGSCL-FAE Vs Baselines In terms of overall performance, OGSCL-FAE outperforms the best baseline SCLIP-F by 5.04% (Top- 3) and 5.8% (Top-5) on DeepFashion and baseline CAMNET by 0.93% mAP on FashionAI. For DeepFashion, except for Style, OGSCL-FAE outperforms all other baselines for all attribute types. For FashionAI, OGSCL-FAE outperforms all baselines for 5 out of 8 attribute types.
Discussion about ablations Data augmentations and ontology guided supervised contrastive learning are key components of OGSCL-FAE because there is a drop in performance of 6.07% (Top-3) and 6.72% (Top-5), as shown in Table 2b (OGSCL-FAE w/o DA & OGSCL). CLIP fine-tuning with self-supervised contrastive loss and data augmentation performs very poorly as compared to supervised contrastive loss with data augmentation (OGSCL-FAE w/o OGSCL). Ontology guided negative sampling over random sampling improves performance of OGSCL-FAE by 2.95% (Top-3) and 3.16% (Top-5) (OGSCL-FAE w/o OG). Data augmentation also affects the overall performance of OGSCL-FAE by 5.64% (Top-3) and 5.24% (Top-5) (OGSCL-FAE w/o DA).

Approach Attributes
Texture Fabric Shape Part Style
Top3 Top5 Top3 Top5 Top3 Top5 Top3 Top5 Top3 Top5
WTBI
DARN
FashionNet
BCRNN
TS-FashionNet
HABP 24.21
36.15
37.46
50.31

58.52
60.87 32.65
48.15
49.52
65.48

68.19
70.54 25.38
36.64
39.30
40.31

46.44
49.40 36.06
48.52
49.84
48.23

57.02
59.88 23.39
35.89
39.47
53.32

61.86
61.97 31.26
46.93
48.59
61.05

70.81
70.80 26.31
39.17
44.13
40.65

49.82
51.39 33.24
50.17
54.02
56.32

60.36
61.82 49.85
66.11
66.43
68.70

34.40
38.61 58.68
71.36
73.16
74.25

43.44
46.99
MLC
CLIP-P
SCLIP
OGSCL-FAE 53.81
27.73
46.24

52.42 61.76
34.43
53.92

58.76 42.61
11.75
46.39

52.71 52.29
19.42
55.09

62.43 39.82
31.66
62.92

68.99 49.62
44.94
74.98

77.20 25.43
9.983
45.08

56.33 38.14
16.03
53.68

63.93 47.60
41.51
57.01

65.90 48.31
45.57
63.41

70.73

Table.1a

Approach Overall
Top 3 Top 5
DARN
FashionNet
TS-FashionNet
HABP
TwoStreamMN
MTL w/ RNN+VA
STL w/ HLS 42.35
45.52
50.58
52.82
59.83
53.01
66.19 51.95
54.61
60.43
62.49
77.91
66.40
73.73
MLC
CLIP-P
SCLIP-F
OGSCL-FAE 65.57
64.50
81.27
86.31 71.22
71.33
85.42
91.22
Table. 1b

Length Design Overall
Skirt Sleeve Coat Pant Collar Lapel Neckline neck

38.52
53.52
64.31
66.37
59.20
17.52
60.20

67.30
Triplet network
CSN
ASEN
CAMNET
48.38
61.97
66.34
68.23
28.14
45.06
57.53
58.08
29.82
47.30
55.51
60.86
54.56
62.85
68.77
68.74
62.58
69.83
72.94
78.32
38.31
54.14
66.95
73.63
26.64
46.56
66.81
65.96
40.02
54.57
67.01
68.02
MLC
CLIP-P
SCLIP
OGSCL-CAE 66.07
19.45
63.36

66.30 50.81
14.71
54.72

63.48 51.57
13.46
57.34

63.86 68.33
23.43
64.65

69.25 78.17
24.68
64.75

72.34 66.77
20.40
61.48

71.29 46.64
12.10
60.84

67.55 66.16
20.51
56.98

69.26
Table. 2a

Approach Overall
Top-3 Top-5
OGSCL-FAE 86.31 91.22
OGSCL-FAE w/o DA & OGSCL 80.24 84.50
OGSCL-FAE w/o OGSCL 82.83 87.75
OGSCL-FAE w/o DA 80.67 85.98
OGSCL-FAE w/o OG 83.36 88.06

Table. 2b
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 attribute value relatedness based fashion attribute extraction. The embodiment, thus provides a mechanism for an ontology guided supervised contrastive learning, for determining the attribute value relatedness, and in turn using this information for training a SCLIP model for generating a trained SCLIP model. Moreover, the embodiments herein further provide a mechanism of performing the fashion attribute extraction using the trained SCLIP model.
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.
, Claims:
A processor implemented method (300), comprising:
receiving (302), via one or more hardware processors, a plurality of images and associated text from a dataset, as input data;
obtaining (304), via the one or more hardware processors, a multimodal representation of each of the plurality of images by processing each of the plurality of images using an image encoder and a multimodal image projection layer of a Supervised Contrastive Language Image Pretraining (SCLIP) model executed by the one or more hardware processors;
obtaining (306), via the one or more hardware processors, a multimodal representation of the associated text, by processing the associated text using a text encoder and a multimodal text projection layer of the SCLIP model;
constructing (308), via the one or more hardware processors, one or more cosine similarity matrices from the multimodal representation of image and the multimodal representation of the text, wherein a cosine similarity between representation of one or more positive image-attributes pairs is maximum and the cosine similarity between one or more negative image-attributes pairs is minimum;
augmenting (310), via the one or more hardware processors, the one or more positive image-attributes pairs and the one or more negative image-attributes pairs with a focal loss, to reduce a class imbalance and to reduce the cosine similarity between the one or more negative image-attributes pairs;
computing (312), via the one or more hardware processors, an Ontology Guided Supervised Contrastive Loss based on the one or more image-attributes pairs and the one or more negative image-attributes pairs augmented with the focal loss; and
training (314) the SCLIP model based on the Ontology Guided Supervised Contrastive Loss, to generate a trained SCLIP model.

The method as claimed in claim 1, wherein a fashion attribute feature extraction is performed using the trained SCLIP model.

The method as claimed in claim 1 comprises determining all image-attribute pairs that are siblings of each other in a fashion ontology as hard-negative pairs, wherein the hard-negative pairs are used for contrastive learning for the feature extraction.

The method as claimed in claim 1, wherein the Ontology Guided Supervised Contrastive Loss is computed as:

L_OGSCL= L_CLIP^(SupCon+)+ ? L_CLIP^(SupCon-)

where,
L_CLIP^(SupCon+) represents the one or more positive image-attributes, and L_CLIP^(SupCon-) represents the one or more negative image-attributes.

The method as claimed in claim 1, wherein the trained SCLIP models a fine-granular multi-label fashion attribute classification as a matching problem to address relatedness of attribute values embedded in an attribute ontology.

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 cause the one or more hardware processors to:
receive a plurality of images and associated text from a dataset, as input data;
obtain a multimodal representation of each of the plurality of images by processing each of the plurality of images using an image encoder and a multimodal image projection layer of a Supervised Contrastive Language Image Pretraining (SCLIP) model executed by the one or more hardware processors;
obtain a multimodal representation of the associated text, by processing the associated text using a text encoder and a multimodal text projection layer of the SCLIP model;
construct one or more cosine similarity matrices from the multimodal representation of image and the multimodal representation of the text, wherein a cosine similarity between representation of one or more positive image-attributes pairs is maximum and the cosine similarity between one or more negative image-attributes pairs is minimum;
augment the one or more positive image-attributes pairs and the one or more negative image-attributes pairs with a focal loss, to reduce a class imbalance and to reduce the cosine similarity between the one or more negative image-attributes pairs;
compute an Ontology Guided Supervised Contrastive Loss based on the one or more image-attributes pairs and the one or more negative image-attributes pairs augmented with the focal loss; and
train the SCLIP model based on the Ontology Guided Supervised Contrastive Loss, to generate a trained SCLIP model.
The system as claimed in claim 6, wherein the one or more hardware processors are configured to perform a fashion attribute feature extraction using the trained SCLIP model.

The system as claimed in claim 6, wherein the one or more hardware processors are configured to determine all image-attribute pairs that are siblings of each other in a fashion ontology as hard-negative pairs, wherein the hard-negative pairs are used for contrastive learning for the feature extraction.

The system as claimed in claim 6, wherein the one or more hardware processors are configured to compute the Ontology Guided Supervised Contrastive Loss as:
L_OGSCL= L_CLIP^(SupCon+)+ ? L_CLIP^(SupCon-)

where,
L_CLIP^(SupCon+) represents the one or more positive image-attributes, and L_CLIP^(SupCon-) represents the one or more negative image-attributes.
The system as claimed in claim 6, wherein the trained SCLIP model is configured to model a fine-granular multi-label fashion attribute classification as a matching problem to address relatedness of attribute values embedded in an attribute ontology.

Documents

Application Documents

# Name Date
1 202321036694-STATEMENT OF UNDERTAKING (FORM 3) [26-05-2023(online)].pdf 2023-05-26
2 202321036694-REQUEST FOR EXAMINATION (FORM-18) [26-05-2023(online)].pdf 2023-05-26
3 202321036694-FORM 18 [26-05-2023(online)].pdf 2023-05-26
4 202321036694-FORM 1 [26-05-2023(online)].pdf 2023-05-26
5 202321036694-FIGURE OF ABSTRACT [26-05-2023(online)].pdf 2023-05-26
6 202321036694-DRAWINGS [26-05-2023(online)].pdf 2023-05-26
7 202321036694-DECLARATION OF INVENTORSHIP (FORM 5) [26-05-2023(online)].pdf 2023-05-26
8 202321036694-COMPLETE SPECIFICATION [26-05-2023(online)].pdf 2023-05-26
9 202321036694-FORM-26 [19-06-2023(online)].pdf 2023-06-19
10 202321036694-Proof of Right [25-10-2023(online)].pdf 2023-10-25
11 Abstract.1.jpg 2023-12-20