Method and device for gender classification of clothing products based on text data

By combining multiple text dimensions in the text data of clothing products and using multiple sub-text gender recognition network models to perform weighted confidence calculations, the problem of low accuracy in gender recognition of clothing products in the existing technology is solved and a more accurate gender is achieved. Identify.

CN113486948BActive Publication Date: 2024-09-06GUANGZHOU YOUMI INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110749022.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-01
Publication Date
2024-09-06
Estimated Expiration
2041-07-01

AI Technical Summary

Technical Problem

Existing technology has low accuracy when identifying the gender of clothing products based on text data, especially the problem of identification errors or inability to identify due to misleading information in scene texts in second-category e-commerce and the lack of obvious gender words.

Method used

A gender classification method for clothing products based on text data is adopted. Data from multiple text dimensions are obtained, combined and preprocessed, and input into multiple sub-text gender recognition network models for identification. The results of multiple sub-models are combined for weighted confidence calculations. , determine the final gender category.

Benefits of technology

It improves the accuracy of gender recognition of clothing products, avoids recognition errors caused by simple keyword matching, and can effectively handle gender information in complex scene text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113486948B
    Figure CN113486948B
Patent Text Reader

Abstract

The present invention discloses a method and device for gender classification of clothing products based on text data, the method comprising: obtaining text-related data of target clothing products; extracting and combining data of multiple text dimensions in the text-related data according to a preset combination rule to form multiple text combination data; inputting the multiple text combination data into multiple corresponding sub-text gender recognition network models in a text gender recognition network model to obtain multiple sub-text recognition results; determining the text recognition results corresponding to the text-related data according to the multiple sub-text recognition results; the text recognition results are used to indicate the gender classification of the text-related data. It can be seen that the present invention can comprehensively combine the information of multiple dimensions in the text data of the product for gender recognition, which is conducive to improving the accuracy of recognition, thereby avoiding the problem of recognition errors or failure to recognize caused by simply using keyword matching in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of neural network technology, and in particular to a method and device for gender classification of clothing products based on text data. Background Art

[0002] With the rise of Internet clothing e-commerce, the form and characteristics of clothing product data have also changed. Early Internet e-commerce paid more attention to the direct display of clothing products on the detail page. In order to facilitate users to view, the pictures and text information of clothing products were more standardized. The newly emerging second-class e-commerce pays more attention to the content and brings scenes into the content, which will introduce interfering information. At present, e-commerce copywriting often brings in various scenes, resulting in new gender meanings for certain gender word combinations, such as "This lipstick color, my boyfriend loves it!", "Gift for a male bestie", obviously these words with male and female gender colors cannot be directly used for gender classification; secondly, when the text information of some products does not contain obvious gender-biased words, that is, when these gender words are missing, it is impossible to classify gender through text information.

[0003] The existing technology generally adopts the idea of ​​keyword matching when identifying the gender category of clothing products based on text data. However, as mentioned above, due to the misleading information in the scene text brought into the single product page by the second-category e-commerce, relying solely on keyword matching to identify the gender of clothing products has the problem of low accuracy. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method and device for determining the gender classification of clothing products based on text data, which can comprehensively combine the information of multiple dimensions in the text data of the products for gender recognition, thereby helping to improve the accuracy of recognition, and thus avoiding the problem of recognition errors or unrecognition caused by simply using keyword matching in the prior art.

[0005] In order to solve the above technical problems, the first aspect of the present invention discloses a method for gender classification of clothing products based on text data, the method comprising:

[0006] Obtain text-related data of the target clothing product;

[0007] Extracting and combining data of multiple text dimensions in the text-related data according to a preset combination rule to form multiple text combination data;

[0008] Inputting the plurality of text combination data into a plurality of corresponding sub-text gender recognition network models in the text gender recognition network model to obtain a plurality of sub-text recognition results;

[0009] A text recognition result corresponding to the text-related data is determined according to the multiple sub-text recognition results; the text recognition result is used to indicate the gender classification of the text-related data.

[0010] As an optional embodiment, in the first aspect of the present invention, the multiple text dimensions include at least two of product title, product recommendation, product store name, text in product image, product code, product style, product price, product origin, product brand information, product store contact information and product shipping address information.

[0011] As an optional implementation, in the first aspect of the present invention, the sub-text recognition result includes the corresponding confidence scores of the text combination data under multiple gender categories; the text recognition result includes the confidence scores of the text-related data under multiple gender categories; and the determining, based on the multiple sub-text recognition results, the text recognition result corresponding to the text-related data includes:

[0012] Determine a text sub-model weight of the sub-text gender recognition network model corresponding to each sub-text recognition result; the text sub-model weight is related to the training prediction accuracy of the corresponding sub-text gender recognition network model;

[0013] The text recognition result corresponding to the text-related data is determined according to the multiple sub-text recognition results and the corresponding text sub-model weights.

[0014] As an optional implementation manner, in the first aspect of the present invention, determining the text recognition result corresponding to the text-related data according to the multiple sub-text recognition results and the corresponding text sub-model weights includes:

[0015] For each of the sub-text recognition results, multiply the confidence scores of the corresponding text combination data under multiple gender categories by the corresponding text sub-model weights to obtain weighted confidence scores of the corresponding text combination data under multiple gender categories;

[0016] Calculate a total weighted confidence score corresponding to each gender category according to the weighted confidence scores of the text combination data corresponding to all the sub-text recognition results under multiple gender categories;

[0017] Sorting all the gender categories according to the total weighted confidence score from high to low to obtain a gender category sequence;

[0018] The first preset number of gender categories in the gender category sequence and the corresponding total weighted confidence scores are determined as the text recognition result corresponding to the text-related data.

[0019] As an optional implementation, in the first aspect of the present invention, the text gender recognition network model is trained based on the following steps:

[0020] Get text training data for clothing items;

[0021] Extracting and combining the data of the multiple text dimensions in the text training data according to the combination rule to form multiple text training sets;

[0022] The multiple text training sets are respectively input into the text gender recognition training network for training until convergence, so as to train and obtain the multiple sub-text gender recognition network models.

[0023] As an optional embodiment, in the first aspect of the present invention, the method further comprises:

[0024] Acquire size-related data and image-related data of a target clothing item;

[0025] Inputting the size-related data into a size-gender recognition network model to obtain a size recognition result;

[0026] Inputting the image-related data into an image gender recognition network model to obtain an image recognition result;

[0027] The gender category corresponding to the target clothing item is determined according to the text recognition result, the size recognition result, and the image recognition result.

[0028] As an optional implementation, in the first aspect of the present invention, determining the gender category corresponding to the target clothing product according to the text recognition result, the size recognition result, and the image recognition result includes:

[0029] Determining final confidence scores of the target clothing item under multiple gender categories according to the text recognition result, the size recognition result, and the image recognition result;

[0030] The gender category corresponding to the target clothing item is determined according to the final confidence scores of the target clothing item under multiple gender categories.

[0031] The second aspect of the present invention discloses a device for gender classification of clothing products based on text data, the device comprising:

[0032] A text acquisition module is used to acquire text-related data of a target clothing product;

[0033] A text combination module, used for extracting and combining data of multiple text dimensions in the text-related data according to a preset combination rule to form multiple text combination data;

[0034] A text recognition module, used for inputting the plurality of text combination data into a plurality of corresponding sub-text gender recognition network models in the text gender recognition network model to obtain a plurality of sub-text recognition results;

[0035] The text determination module is used to determine the text recognition result corresponding to the text-related data according to the multiple sub-text recognition results; the text recognition result is used to indicate the gender classification of the text-related data.

[0036] As an optional embodiment, in the second aspect of the present invention, the multiple text dimensions include at least two of product title, product recommendation, product store name, text in product image, product code, product style, product price, product origin, product brand information, product store contact information and product shipping address information.

[0037] As an optional implementation, in the second aspect of the present invention, the sub-text recognition result includes the corresponding confidence scores of the text combination data under multiple gender categories; the text recognition result includes the confidence scores of the text-related data under multiple gender categories; the text determination module determines the specific manner of the text recognition result corresponding to the text-related data according to the multiple sub-text recognition results, including:

[0038] Determine a text sub-model weight of the sub-text gender recognition network model corresponding to each sub-text recognition result; the text sub-model weight is related to the training prediction accuracy of the corresponding sub-text gender recognition network model;

[0039] The text recognition result corresponding to the text-related data is determined according to the multiple sub-text recognition results and the corresponding text sub-model weights.

[0040] As an optional implementation, in the second aspect of the present invention, the text determination module determines the specific manner of the text recognition result corresponding to the text-related data according to the multiple sub-text recognition results and the corresponding text sub-model weights, including:

[0041] For each of the sub-text recognition results, multiply the confidence scores of the corresponding text combination data under multiple gender categories by the corresponding text sub-model weights to obtain weighted confidence scores of the corresponding text combination data under multiple gender categories;

[0042] Calculate a total weighted confidence score corresponding to each gender category according to the weighted confidence scores of the text combination data corresponding to all the sub-text recognition results under multiple gender categories;

[0043] Sorting all the gender categories according to the total weighted confidence score from high to low to obtain a gender category sequence;

[0044] The first preset number of gender categories in the gender category sequence and the corresponding total weighted confidence scores are determined as the text recognition result corresponding to the text-related data.

[0045] As an optional implementation, in the second aspect of the present invention, the text gender recognition network model is trained based on the following steps:

[0046] Get text training data for clothing items;

[0047] Extracting and combining the data of the multiple text dimensions in the text training data according to the combination rule to form multiple text training sets;

[0048] The multiple text training sets are respectively input into the text gender recognition training network for training until convergence, so as to train and obtain the multiple sub-text gender recognition network models.

[0049] As an optional implementation, in the second aspect of the present invention, the device further includes:

[0050] An acquisition module, used to acquire size-related data and image-related data of a target clothing product;

[0051] A size recognition module, used for inputting the size-related data into a size-gender recognition network model to obtain a size recognition result;

[0052] An image recognition module, used for inputting the image-related data into an image gender recognition network model to obtain an image recognition result;

[0053] The gender determination module is used to determine the gender category corresponding to the target clothing product according to the text recognition result, the size recognition result and the image recognition result.

[0054] As an optional implementation, in the second aspect of the present invention, the specific manner in which the gender determination module determines the gender category corresponding to the target clothing product according to the text recognition result, the size recognition result, and the image recognition result includes:

[0055] Determining final confidence scores of the target clothing item under multiple gender categories according to the text recognition result, the size recognition result, and the image recognition result;

[0056] The gender category corresponding to the target clothing item is determined according to the final confidence scores of the target clothing item under multiple gender categories.

[0057] The third aspect of the present invention discloses another device for gender classification of clothing products based on text data, the device comprising:

[0058] A memory storing executable program code;

[0059] a processor coupled to the memory;

[0060] The processor calls the executable program code stored in the memory to execute part or all of the steps in the method for gender classification of clothing products based on text data disclosed in the first aspect of the embodiment of the present invention.

[0061] A fourth aspect of an embodiment of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute some or all of the steps in the clothing product gender classification method based on text data disclosed in the first aspect of the embodiment of the present invention.

[0062] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0063] In an embodiment of the present invention, text-related data of a target clothing product is obtained; data of multiple text dimensions in the text-related data are extracted and combined according to a preset combination rule to form multiple text combination data; the multiple text combination data are input into multiple corresponding sub-text gender recognition network models in a text gender recognition network model to obtain multiple sub-text recognition results; based on the multiple sub-text recognition results, the text recognition results corresponding to the text-related data are determined; the text recognition results are used to indicate the gender classification of the text-related data. It can be seen that the present invention can combine data of multiple dimensions in the text data of a product, and respectively perform predictive recognition through multiple sub-network models, so that gender recognition can be comprehensively combined with information of multiple dimensions in the text data of the product, which is conducive to improving the accuracy of recognition, thereby avoiding the problem of recognition errors or failure to recognize caused by simply using keyword matching in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0065] Figure 1 It is a flow chart of a method for gender classification of clothing products based on text data disclosed in an embodiment of the present invention;

[0066] Figure 2 It is a flow chart of another method for gender classification of clothing products based on text data disclosed in an embodiment of the present invention;

[0067] Figure 3 It is a structural schematic diagram of a device for gender classification of clothing products based on text data disclosed in an embodiment of the present invention;

[0068] Figure 4 It is a schematic diagram of the structure of another device for gender classification of clothing products based on text data disclosed in an embodiment of the present invention;

[0069] Figure 5 It is a structural schematic diagram of another device for gender classification of clothing products based on text data disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0070] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0071] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.

[0072] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0073] The present invention discloses a method and device for gender classification of clothing products based on text data, which can combine data of multiple dimensions in the text data of the products, and respectively predict and identify through multiple sub-network models, so as to comprehensively combine the information of multiple dimensions in the text data of the products for gender identification, which is conducive to improving the accuracy of identification, thereby avoiding the problem of identification errors or failure to identify caused by simply using keyword matching in the prior art. The following are detailed descriptions.

[0074] Embodiment 1

[0075] See also Figure 1 , Figure 1 1 is a flow chart of a method for gender classification of clothing products based on text data disclosed in an embodiment of the present invention. Figure 1 The described method is applied to a gender prediction device based on a neural network, and the prediction device can be a corresponding prediction terminal, prediction device or server, and the server can be a local server or a cloud server, which is not limited in the embodiment of the present invention. Figure 1 As shown, the clothing product gender classification method based on text data may include the following operations:

[0076] 101. Obtain text-related data of the target clothing product.

[0077] In an embodiment of the present invention, the text-related data of the target clothing product can be obtained from the text or image of the product page corresponding to the target clothing product. In an embodiment of the present invention, the text-related data of the target clothing product can be a combination of one or more data in the product introduction, product promotional slogan and merchant information in the product details page, for example, it can include one or more of the product title, product recommendation, product store name, text in the product image, product style, product price, product origin, product brand information, product store contact information and product shipping address information, which is not limited by the present invention.

[0078] 102. Extract and combine data of multiple text dimensions in the text-related data according to a preset combination rule to form multiple text combination data.

[0079] In an embodiment of the present invention, the preset combination rule may be to randomly extract and combine data of multiple text dimensions multiple times. Optionally, multiple text combination data may be formed by randomly extracting several non-repetitive data from the data of multiple text dimensions multiple times.

[0080] In an embodiment of the present invention, multiple text dimensions may include at least two of product title, product recommendation, product store name, text in product image, product code, product style, product price, product origin, product brand information, product store contact information and product shipping address information, wherein the text in the product image can be identified by an image recognition algorithm such as an OCR algorithm to identify the text in the image in the page of the clothing product.

[0081] 103. Input the plurality of text combination data into a plurality of corresponding sub-text gender recognition network models in the text gender recognition network model to obtain a plurality of sub-text recognition results.

[0082] In the embodiment of the present invention, each sub-text gender recognition network model corresponds to a combination of several text dimensions corresponding to a text combination data. Preferably, each sub-text gender recognition network model is trained by inputting text training data having the same text dimension combination as the corresponding text combination data. Therefore, the data format of the model input of each sub-text gender recognition network model is the same as the format of the corresponding text combination data.

[0083] 104. Determine a text recognition result corresponding to the text-related data according to the multiple sub-text recognition results.

[0084] In the embodiment of the present invention, the text recognition result is used to indicate the gender classification of the text-related data.

[0085] It can be seen that the method described in the embodiment of the present invention can combine data of multiple dimensions in the text data of the product, and perform prediction and identification through multiple sub-network models respectively, so as to comprehensively combine the information of multiple dimensions in the text data of the product for gender identification, which is conducive to improving the accuracy of identification, and thus avoiding the problem of identification errors or non-identification caused by simply using keyword matching in the prior art.

[0086] As an optional implementation, the subtext recognition result includes the confidence scores of the corresponding text combination data under multiple gender categories; the text recognition result includes the confidence scores of the text-related data under multiple gender categories. In the above step 104, determining the text recognition result corresponding to the text-related data based on the multiple subtext recognition results includes:

[0087] Determine the text sub-model weight of the sub-text gender recognition network model corresponding to each sub-text recognition result;

[0088] According to the multiple sub-text recognition results and the corresponding text sub-model weights, the text recognition result corresponding to the text-related data is determined.

[0089] In an embodiment of the present invention, the text sub-model weight is related to the training prediction accuracy of the corresponding sub-text gender recognition network model. Optionally, the training prediction accuracy can be calculated by obtaining historical training prediction data of the sub-text gender recognition network model. For example, the average training prediction accuracy of the sub-text gender recognition network model in multiple trainings can be calculated. Preferably, the text sub-model weight is proportional to the training prediction accuracy of the corresponding sub-text gender recognition network model, that is, the higher the training prediction accuracy of the sub-text gender recognition network model, the greater the proportion of the sub-text recognition result output by it in the final text recognition success.

[0090] It can be seen that the implementation of this optional implementation method can determine the text recognition results corresponding to the text-related data based on multiple sub-text recognition results and the corresponding text sub-model weights, thereby obtaining more accurate and reasonable text recognition results, which is conducive to improving the recognition accuracy, and thus avoiding the recognition errors or unrecognition problems caused by simply using keyword matching in the prior art.

[0091] As an optional implementation, in the above step, determining the text recognition result corresponding to the text-related data according to the multiple sub-text recognition results and the corresponding text sub-model weights includes:

[0092] For each sub-text recognition result, multiply the confidence scores of the corresponding text combination data under multiple gender categories by the corresponding text sub-model weights to obtain weighted confidence scores of the corresponding text combination data under multiple gender categories;

[0093] Calculate the total weighted confidence score corresponding to each gender category according to the weighted confidence scores of the text combination data corresponding to all sub-text recognition results under multiple gender categories;

[0094] Sort all gender categories according to the total weighted confidence score from high to low to obtain a gender category sequence;

[0095] The first preset number of gender categories in the gender category sequence and the corresponding total weighted confidence scores are determined as the text recognition result corresponding to the text-related data.

[0096] Optionally, the sum of all weighted confidence scores corresponding to each gender category may be determined as the total weighted confidence score corresponding to each gender category.

[0097] Optionally, the preset number may be 1, in which case the gender category with the highest total weighted confidence score and the corresponding total weighted confidence score are selected and determined as the text recognition result corresponding to the text-related data. Optionally, the preset number may also be determined based on actual conditions or experience.

[0098] It can be seen that the implementation of this optional implementation method can calculate the total weighted confidence score corresponding to each gender category based on the weighted confidence scores of the text combination data corresponding to all sub-text recognition results under multiple gender categories, and further determine the text recognition results corresponding to the text-related data, thereby obtaining more accurate and reasonable text recognition results, which is conducive to improving the recognition accuracy, and thus avoiding the recognition errors or unrecognition problems caused by simply using keyword matching in the prior art.

[0099] As an optional implementation, the above-mentioned text gender recognition network model is trained based on the following steps:

[0100] Get text training data for clothing items;

[0101] Extract and combine data of multiple text dimensions in the text training data according to the combination rules to form multiple text training sets;

[0102] Multiple text training sets are respectively input into the text gender recognition training network for training until convergence, so as to train multiple sub-text gender recognition network models.

[0103] In an embodiment of the present invention, the combination rules followed when extracting and combining text training data should be the same as the combination rules in the above-mentioned step 102. However, in actual situations, some text dimensions of the possible text-related data in the prediction link corresponding to step 102 may not exist or have no data. At this time, the number of multiple text combination data obtained by extracting and combining through the combination rules in step 102 may be less than the number of the above-mentioned text training sets. Since each text training set is trained to obtain a sub-text gender recognition network model, in step 102, there may be some sub-text gender recognition network models that do not have corresponding data inputs, but each text combination data must have a corresponding sub-text gender recognition network model.

[0104] Optionally, the structure of the text gender identification training network is the same as the network structure of the sub-text gender identification network model obtained by training, and it can all adopt a neural network structure such as a CNN structure that can be used for text recognition. Preferably, the structure of the text gender identification training network can adopt a deep learning network structure based on TextCNN (Text Convolutional Neural Network, text convolutional neural network), including a convolutional layer, a pooling layer and a softmax classification layer. Optionally, the structure of the text gender identification training network can also adopt a fixed representation model based on word vectors such as FastText, Word2Vec, GloVe, or a recurrent neural network structure such as TextRNN or TextRNN+Attention, or use a dynamic representation model based on word vectors such as Transformer, ERNIE, BERT, ElMo, BART, Bort, T5, XLNet and other network structures, and the collocation combination of these several network structures such as DPCNN, TextRCNN, BERT+RNN, BERT+RCNN, BERT+DPCNN, BERT+CNN and other network structures are all OK.

[0105] Optionally, text training data and text-related data need to be processed before training or prediction, including but not limited to one or more of word segmentation, cleaning, word vector mapping and word vector concatenation of the text training data or text-related data.

[0106] It can be seen that the implementation of this optional implementation method can input multiple text training sets into the text gender recognition training network for training until convergence, so as to train multiple sub-text gender recognition network models, so as to improve the efficiency and accuracy of the text gender task when performing the text gender recognition task based on the multiple sub-text gender recognition network models in the future.

[0107] As an optional implementation, the step of inputting each text training set into the text gender recognition training network for training until convergence includes:

[0108] Enter text information related to clothing products;

[0109] Integrate the domain dictionaries published by various institutions or word segmenters, perform word frequency statistics and related word expansion, and build domain dictionaries and stop word lists for various industries;

[0110] Import the constructed domain dictionary into the word segmentation tool of HanLP (Han Language Processing) or Jieba word segmenter as the prior knowledge of the word segmenter, and add the stop word list to segment and clean the input text;

[0111] Use pre-trained word vectors to map the word segmentation results of the text into a K-dimensional word vector;

[0112] Concatenate the M word vectors in each sentence to form an M×K matrix as the input of the text gender recognition training network;

[0113] Set the number J and size S of the convolution kernels in the text gender recognition training network, and perform convolution calculation on the input matrix to extract features;

[0114] After convolution, the M×K vector matrix is ​​mapped to the x×y feature matrix f through the activation function. The text will output a feature matrix after passing through each convolution kernel.

[0115] The feature matrix is ​​input into the pooling layer for pooling operation to obtain the pooling result, so as to reduce the number of parameters and speed up the calculation while retaining the main features;

[0116] After multiple convolution and pooling operations, the final outputs are concatenated and input into the softmax layer for classification to obtain the confidence of each gender category. The cross-entropy loss function is used for training, and the gender category corresponding to the maximum confidence is output. A threshold is set for the confidence of each gender category. The output greater than the threshold is used as the gender label of the clothing product text, and the gender score is the corresponding confidence.

[0117] Embodiment 2

[0118] See also Figure 2 , Figure 2 1 is a flow chart of another method for gender classification of clothing products based on text data disclosed in an embodiment of the present invention. Figure 2 The described method is applied to a gender prediction device based on a neural network, and the prediction device can be a corresponding prediction terminal, prediction device or server, and the server can be a local server or a cloud server, which is not limited in the embodiment of the present invention. Figure 2 As shown, the clothing product gender classification method based on text data may include the following operations:

[0119] 201. Obtain text-related data of a target clothing product.

[0120] 202. Extract and combine data of multiple text dimensions in the text-related data according to a preset combination rule to form multiple text combination data.

[0121] 203. Input the plurality of text combination data into a plurality of corresponding sub-text gender recognition network models in the text gender recognition network model to obtain a plurality of sub-text recognition results.

[0122] 204. Determine a text recognition result corresponding to the text-related data according to the multiple sub-text recognition results; the text recognition result is used to indicate the gender classification of the text-related data.

[0123] The specific technical details and technical terminology of the above steps 201-204 can be referred to the description of steps 101-104 in the first implementation, and will not be repeated here.

[0124] 205. Obtain size-related data and image-related data of the target clothing product.

[0125] In an embodiment of the present invention, the size-related data of the target clothing product may be a combination of one or more data in the merchant size table, size comparison chart and product spot size information in the purchase details page, and specifically, it may include height size information and / or weight size information. Optionally, the size information in Unicode encoding may be directly extracted from the web page, and after converting it into Chinese utf-8 encoding, regular expressions may be used to extract the numeric part. Optionally, the size table image information in the web page may be obtained, and the size table text information in the size table image may be extracted using an image OCR text recognition algorithm to obtain the size information. Optionally, the size-related data includes height size data and / or weight size data.

[0126] In an embodiment of the present invention, the image-related data of the target clothing product can be obtained from the image material of the product page of the target clothing product. Preferably, the image-related data includes all images of the product-related page of the target clothing product. In an embodiment of the present invention, the image-related data of the target clothing product can be an image in a product display page or an image in a product detail page, which can be one or more of a clothing body image, a clothing detail image, and a model wearing image.

[0127] 206. Input the size-related data into the size-gender recognition network model to obtain a size recognition result.

[0128] In the embodiment of the present invention, the size recognition result includes a confidence score of the size-related data under at least one gender category.

[0129] 207. Input the image-related data into the image gender recognition network model to obtain the image recognition result.

[0130] In the embodiment of the present invention, the image recognition result includes a confidence score of the image-related data under at least one gender category.

[0131] 208. Determine the gender category corresponding to the target clothing product based on the text recognition result, the size recognition result, and the image recognition result.

[0132] It can be seen that the method described in the embodiment of the present invention can combine multimodal data such as text data, image data and size data of clothing products to perform gender recognition respectively, and then finally determine the gender of the clothing product based on multiple recognition results corresponding to the multimodal data. Therefore, clothing gender recognition can be performed based on features at more modal levels of the clothing product, which can effectively improve the accuracy and efficiency of clothing product gender recognition, and further effectively solve the problem of lower accuracy caused by the prior art of using only single modal data for clothing gender recognition.

[0133] As an optional implementation, in the above step 206, inputting the size-related data into the size-gender recognition network model to obtain the size recognition result includes:

[0134] Extract and combine data of multiple dimension dimensions in the dimension-related data according to a preset combination rule to form multiple dimension combination data;

[0135] Inputting a plurality of size combination data into a plurality of corresponding sub-size gender recognition network models in the size gender recognition network model to obtain a plurality of sub-size recognition results;

[0136] A size recognition result corresponding to the size-related data is determined according to the multiple sub-size recognition results.

[0137] The size recognition result is used to indicate the gender classification of the size-related data.

[0138] In an embodiment of the present invention, the preset combination rule may be to randomly extract and combine data of multiple size dimensions multiple times. Optionally, multiple size combination data may be formed by randomly extracting several non-repetitive data from the data of multiple size dimensions multiple times.

[0139] In the embodiment of the present invention, the multiple size dimensions may include at least two of a maximum height dimension, a minimum height dimension, a maximum weight dimension, and a minimum weight dimension.

[0140] In the embodiment of the present invention, each sub-size gender recognition network model corresponds to a combination of several size dimensions corresponding to a size combination data. Preferably, each sub-size gender recognition network model is trained by inputting size training data having the same size dimension combination as the corresponding size combination data. Therefore, the data format of the model input of each sub-size gender recognition network model is the same as the format of the corresponding size combination data.

[0141] It can be seen that the implementation of this optional implementation method can combine data of multiple dimensions in the text data of the commodity, and perform prediction and identification through multiple sub-network models respectively, so that gender identification can be performed in combination with information of multiple dimensions in the size data of the clothing commodity, which is beneficial to using the gender information implicit in the size information to improve the accuracy of gender identification, and further increase the scope and types of information available for gender identification, so as to improve the efficiency of gender identification.

[0142] As an optional implementation, the sub-size recognition result includes the confidence scores of the corresponding size combination data under multiple gender categories; the size recognition result includes the confidence scores of the size-related data under multiple gender categories. In the above steps, determining the size recognition result corresponding to the size-related data according to the multiple sub-size recognition results includes:

[0143] Determine the size sub-model weight of the sub-size gender recognition network model corresponding to each sub-size recognition result;

[0144] According to the multiple sub-size recognition results and the corresponding size sub-model weights, a size recognition result corresponding to the size-related data is determined.

[0145] In an embodiment of the present invention, the size sub-model weight is related to the training prediction accuracy of the corresponding sub-size gender recognition network model. Optionally, the training prediction accuracy can be calculated by obtaining historical training prediction data of the sub-size gender recognition network model. For example, the average training prediction accuracy of the sub-size gender recognition network model in multiple trainings can be calculated. Preferably, the size sub-model weight is proportional to the training prediction accuracy of the corresponding sub-size gender recognition network model, that is, the higher the training prediction accuracy of the sub-size gender recognition network model, the greater the proportion of the sub-size recognition result output by it in the final size recognition success.

[0146] It can be seen that the implementation of this optional implementation method can determine the size recognition result corresponding to the size-related data based on multiple sub-size recognition results and the corresponding size sub-model weights, which is beneficial to using the gender information implicit in the size information to improve the accuracy of gender recognition, and further increase the scope and type of information available for gender recognition, so as to improve the efficiency of gender recognition.

[0147] As an optional implementation, in the above step, determining the size recognition result corresponding to the size-related data according to the multiple sub-size recognition results and the corresponding size sub-model weights includes:

[0148] For each sub-size recognition result, multiply the confidence scores of the corresponding size combination data under multiple gender categories by the corresponding size sub-model weights to obtain weighted confidence scores of the corresponding size combination data under multiple gender categories;

[0149] Calculate a total weighted confidence score corresponding to each gender category according to the weighted confidence scores of the size combination data corresponding to all sub-size recognition results under multiple gender categories;

[0150] Sort all gender categories according to the total weighted confidence score from high to low to obtain a gender category sequence;

[0151] The first preset number of gender categories in the gender category sequence and the corresponding total weighted confidence scores are determined as the size recognition result corresponding to the size-related data.

[0152] Optionally, the sum of all weighted confidence scores corresponding to each gender category may be determined as the total weighted confidence score corresponding to each gender category.

[0153] Optionally, the preset number may be 1, in which case the gender category with the highest total weighted confidence score and the corresponding total weighted confidence score are selected and determined as the text recognition result corresponding to the text-related data. Optionally, the preset number may also be determined based on actual conditions or experience.

[0154] It can be seen that the implementation of this optional implementation method can calculate the total weighted confidence score corresponding to each gender category according to the weighted confidence scores of the size combination data corresponding to all sub-size recognition results under multiple gender categories, and further determine the size recognition result corresponding to the size-related data, which is beneficial to using the gender information implicit in the size information to improve the accuracy of gender recognition, and further increase the scope and types of information available for gender recognition, so as to improve the efficiency of gender recognition.

[0155] As an optional implementation, the above-mentioned text gender recognition network model is trained based on the following steps:

[0156] Get size training data for clothing items;

[0157] Extract and combine data of multiple size dimensions in the size training data according to the combination rules to form multiple size training sets;

[0158] Multiple size training sets are respectively input into the size gender recognition training network for training until convergence, so as to train and obtain multiple sub-size gender recognition network models.

[0159] In the embodiment of the present invention, the combination rule followed by the size training data when extracting the combination should be the same as the combination rule in the above steps. Therefore, in the above steps, each size combination data must have a corresponding sub-size gender recognition network model.

[0160] Optionally, the structure of the size gender recognition training network is the same as the network structure of the sub-size gender recognition network model obtained by training, and both can adopt a decision tree network structure. Preferably, each sub-size gender recognition network model adopts a decision tree network structure to form a random forest network model. Optionally, the decision tree network is a model for decision judgment based on a tree structure. It classifies the data set through multiple conditional discrimination processes and finally obtains the required results. The starting point of the decision tree is the root node, the intermediate decision process is the internal node, and the classification result is the leaf node. A decision tree contains a root node, several internal nodes and several leaf nodes. The root node contains the full set of samples, wherein the leaf node corresponds to the decision result (output what gender label), and each other node corresponds to an attribute test (for example, whether the maximum value of the input height is less than the maximum value of the height). The sample set contained in each node is divided into subnodes according to the result of the attribute test, and the root node contains the full set of samples. The path from the root node to each leaf node corresponds to a judgment test sequence. That is, through many different binary classifications, the input data is finally classified into different categories.

[0161] Optionally, the structure of the size gender recognition training network can also adopt a gradient boosting tree GBDT based on a boosting ensemble learning strategy. Optionally, it is not limited to using traditional machine learning methods, and deep learning models can also be used to capture the relationship between gender labels and size data, such as RNN, LSTM, GRU and other deep learning networks.

[0162] Optionally, the size training data and size-related data need to be processed before training or prediction, including but not limited to one or more of decoding processing, transcoding processing, and regular expression extraction processing of the size training data or size-related data. Optionally, the size data processing includes:

[0163] Determine whether data of a certain dimension is missing among the data of multiple dimension dimensions of the dimension-related data;

[0164] When the judgment result is yes, the data of the size dimension of the missing data is determined as the average value of the data of other size dimensions. By implementing this, the data of the size dimension of the missing data of size-related data can be determined as the average value of the data of other size dimensions, which is helpful to fill in the information of the size-related data, so as to facilitate the subsequent use of the size-related data for gender prediction, and use the gender information implicit in the size information to improve the accuracy of gender recognition.

[0165] It can be seen that the implementation of this optional implementation method can input multiple size training sets into the size gender recognition training network for training until convergence, so as to train multiple sub-size gender recognition network models, so as to improve the efficiency and accuracy of the size gender task when the size gender recognition task is subsequently performed based on the multiple sub-size gender recognition network models.

[0166] As an optional implementation, in the above step, the multiple size training sets are respectively input into the size gender recognition training network for training until convergence, so as to train multiple sub-size gender recognition network models, including:

[0167] Inputting multiple size training sets into the size and gender recognition training network respectively to obtain a random forest model composed of multiple decision tree models;

[0168] Based on grid search and / or cross validation, multiple decision tree models in the random forest model are selected and trained to obtain multiple sub-size gender recognition network models.

[0169] Specifically, based on grid search, you can manually set a set of parameters required in the model, and the program automatically runs all the parameters using the exhaustive method. When training the decision tree model, the parameters that need to be adjusted include the maximum number of leaf nodes, the weights of each category, the Gini coefficient threshold, the decision tree depth, and the minimum value of the sum of all sample weights of the leaf nodes.

[0170] Specifically, based on cross-validation, all data can be divided into K parts, one of which is selected as the test set, and the remaining K-1 parts are used as training sets for training. This is repeated K times until each of the K parts of data has been used as a test set, and K models are trained to obtain K accuracy scores.

[0171] Specifically, grid search and cross validation can be combined. All parameter combinations can be listed using grid search, divided into N parameter combinations, and the model can use each parameter combination to perform k-fold cross validation in turn to train k models. The average prediction accuracy of the k models is used as the comprehensive score of this parameter combination. Then the scores of the N parameter combinations are compared, and the parameter combination with the highest score is used as the final model parameter.

[0172] Specifically, the random forest model is a combination of multiple decision tree models. The classification results of multiple decision tree models are voted and selected to form a strong classifier. The idea of ​​model integration is adopted to solve the inherent defects of models trained by a single model or a single set of parameter combinations, so as to integrate more models, learn from each other's strengths and avoid limitations.

[0173] It can be seen that the implementation of this optional implementation method can select and train multiple decision tree models based on grid search and cross-validation, so as to make the training convergence speed faster, which is convenient for the subsequent size gender recognition task based on the multiple sub-size gender recognition network models, thereby improving the efficiency and accuracy of the size gender task.

[0174] As an optional implementation, in the above step 207, inputting the image-related data into the image gender recognition network model to obtain the image recognition result includes:

[0175] Inputting the image-related data into the image gender recognition network model to obtain the confidence scores of the image-related data under multiple gender categories;

[0176] An image recognition result corresponding to the image-related data is determined based on confidence scores of the image-related data under multiple gender categories and weight information corresponding to each gender category; the image recognition result is used to indicate the gender classification of the image-related data.

[0177] It can be seen that the implementation of this optional implementation can combine the weight information of multiple gender categories of clothing products and multiple confidence prediction results to determine the gender of the clothing product, which can effectively improve the gender accuracy of the clothing product.

[0178] As an optional implementation, the image-related data includes multiple product images corresponding to the target clothing product. In the above steps, the image-related data is input into the image gender recognition network model to obtain confidence scores of the image-related data under multiple gender categories, including:

[0179] Multiple product images are respectively input into the image gender recognition network model to obtain the sub-prediction gender category and the corresponding image confidence score corresponding to each product image.

[0180] In an embodiment of the present invention, the image gender recognition network model can use a pre-trained image recognition network. Optionally, the image gender recognition network model can use an image recognition model pre-trained based on the ImageNet image dataset, such as a MobilenetV3 model, a ResNet model, an EfficientNet model, or a ShuffleNet model, and on this basis, perform transfer learning of the gender classification task through an image training dataset of clothing products. Specifically, the model uses an RGB three-channel image training dataset as input, is trained through a softmax cross entropy loss, and finally outputs the confidence corresponding to each category, where the gender category with the highest confidence and exceeding a preset threshold is considered to be the predicted gender category corresponding to the input image.

[0181] It can be seen that implementing this optional implementation method can input multiple product images into the image gender recognition network model separately to obtain the sub-predicted gender category and the corresponding image confidence score corresponding to each product image, so as to facilitate the subsequent determination of the final image recognition result based on the sub-predicted gender category and the corresponding image confidence score corresponding to each product image, thereby improving the efficiency and accuracy of the image gender recognition task.

[0182] As an optional implementation, the image recognition result includes the target predicted gender category and the target confidence score corresponding to the image-related data. In the above steps, according to the confidence scores of the image-related data under multiple gender categories and the weight information corresponding to each gender category, the image recognition result corresponding to the image-related data is determined, including:

[0183] Determine the category confidence score corresponding to each gender category based on the sub-predicted gender categories and the corresponding image confidence scores corresponding to all product images;

[0184] Determine the category weight corresponding to each gender category based on the sub-predicted gender categories and corresponding image confidence scores corresponding to all product images;

[0185] The product of the category confidence score corresponding to each gender category and the category weight is determined as the final category confidence score corresponding to each gender category;

[0186] According to the final category confidence scores corresponding to all gender categories, the target predicted gender category and target confidence score corresponding to the image-related data are determined.

[0187] In an embodiment of the present invention, the average value of all image confidence scores corresponding to each sub-predicted gender category can be determined as the category confidence score of the gender category corresponding to the sub-predicted gender category. The reason for determining the category confidence score as the average value of all image confidence scores instead of directly taking the highest confidence score of each category is to solve the situation where a certain image material is misjudged by the model, resulting in incorrect final category information. By calculating the average confidence, the output error of the model for each category can be reduced.

[0188] Optionally, the category weight may include a quantity weight corresponding to the gender category and / or a category weight attenuation factor.

[0189] It can be seen that implementing this optional implementation method can determine the target predicted gender category and target confidence score corresponding to the image-related data based on the final category confidence scores corresponding to all gender categories, which can effectively improve the efficiency and accuracy of the image gender recognition task.

[0190] As an optional implementation, in the above step, determining the category weight corresponding to each gender category according to the sub-predicted gender categories and the corresponding image confidence scores corresponding to all product images includes:

[0191] For each sub-predicted gender category, the number of images of all product images belonging to the sub-predicted gender category is determined, and the ratio of the number of images to the total number of all product images is determined as the quantity weight corresponding to the gender category corresponding to the sub-predicted gender category.

[0192] It can be seen that the implementation of this optional implementation method can determine the ratio of the number of all product images belonging to any gender category to the total number of all product images as the quantity weight corresponding to the gender category, which can effectively correct the confidence score of the gender category, increase the score of the category with a large number, and reduce the score of the category with a small number, so as to improve the efficiency and accuracy of the image gender recognition task.

[0193] As an optional implementation, in the above step, determining the category weight corresponding to each gender category according to the sub-predicted gender categories and the corresponding image confidence scores corresponding to all product images includes:

[0194] Determine the category weight decay factor corresponding to each gender category.

[0195] Among them, the category weight decay factor is related to the proportion of image materials corresponding to the corresponding gender category in the image-related data. Preferably, the category weight decay factors for male and female can be set to 1, and the category weight decay factors for neutral and others can be set to 0.9. This is because among the multiple image materials corresponding to the same product, there may be some interference images such as size tables and scene images that do not contain clothing. When the number of product images containing clothing and these interference images is similar, the final calculated category confidence score difference will be small. Therefore, the purpose of introducing the category weight decay factor is to slightly reduce the score values ​​of neutral and other categories, and reduce their contribution to the final output gender.

[0196] It can be seen that implementing this optional implementation method can determine the category weight attenuation factor corresponding to each gender category, and can effectively correct the confidence score of the gender category to improve the efficiency and accuracy of the image gender recognition task.

[0197] As an optional implementation, determining the target predicted gender category and target confidence score corresponding to the image-related data according to the final category confidence scores corresponding to all gender categories includes:

[0198] Sort all final category confidence scores from high to low to obtain a confidence score sequence;

[0199] Calculate the score difference between the first two confidence scores of the confidence score sequence, and determine whether the score difference is greater than a preset score difference threshold to obtain a score determination result;

[0200] When the score judgment result is yes, the higher confidence score of the first two confidence scores and its corresponding gender category are determined as the target confidence score and target predicted gender category corresponding to the image-related data;

[0201] When the score judgment result is no, determine whether the gender categories corresponding to the first two confidence scores are male and female respectively, and obtain the gender judgment result;

[0202] When the gender judgment result is yes, the average of the first two confidence scores and the neutral gender are determined as the target confidence score and target predicted gender category corresponding to the image-related data;

[0203] When the gender judgment result is negative, the average of the first two confidence scores and other gender categories are determined as the target confidence score and target predicted gender category corresponding to the image-related data.

[0204] Among them, other gender categories refer to categories whose gender cannot be determined. For example, when the input image is an irrelevant image that does not contain gender information, such as a text image or a merchant LOGO, this gender category is used to indicate its irrelevance.

[0205] It can be seen that implementing this optional implementation can determine the score difference between the first two confidence scores in the confidence score sequence and the gender categories corresponding to the two confidence scores, so as to more accurately determine the final gender recognition result.

[0206] Next, a specific implementation scheme of the above disclosed method of inputting image-related data into the image gender recognition network model for recognition is described, and the scheme includes the following operations:

[0207] A deep learning method based on convolutional neural network is used to classify the gender of clothing images. The model uses MobilenetV3 pre-trained on the ImageNet image dataset, and transfer learning of gender classification tasks is performed on the clothing image dataset on this basis. The model takes RGB three-channel clothing images as input, trains through softmax cross entropy loss, and finally outputs the confidence corresponding to each category. The category with the highest confidence that exceeds the preset threshold is considered to be the predicted gender corresponding to the input image.

[0208] Since a product page usually contains multiple image materials, it is necessary to build an association between the gender of a single image material and the final gender of the product page: the image interface needs to receive all the image materials of the same product page as input, that is, the storage set of image gender labels. This set stores the model-predicted gender and corresponding confidence of each image material. After obtaining the storage set of image gender labels, calculate the average confidence of each category and the weight proportion of each category in the entire label set. Finally, the average confidence of each category is multiplied by the weight proportion, and then multiplied by a pre-set category attenuation factor, and the result is the final score of the category. Sort the scores of all categories from high to low, take the top two and calculate the score difference. When the difference is greater than or equal to the threshold, the image interface outputs the gender category to which the highest score belongs, and the output gender score is the score corresponding to the category; when the difference is less than the threshold, it is necessary to determine whether the top two genders with the highest scores are both male or female. If so, the image interface outputs a neutral category, and the gender score is the average of the two. Otherwise, the image interface outputs other categories and corresponding scores. The details are as follows:

[0209] Product page A contains n images, where the model predicts a gender category C for the i-th image. i and confidence S i Finally, the product page A will get the storage set L of image labels, which stores the gender category and confidence of each image material.

[0210] Calculate the average confidence of each category in the set L l represents the category, and n_l represents the number of items belonging to the category:

[0211]

[0212] Calculate the weight ratio of each category in the set L in the entire label set to obtain the quantity weight W l :

[0213]

[0214] Multiply the average confidence of each category by its weight ratio and the pre-set category weight decay factor α, and the result is the final score S of the category. l :

[0215] Sort the scores of all categories from high to low and take the highest score S l1 and the second highest score S l2 , calculate the difference between the two, when the difference is greater than or equal to the threshold k, S l1 Category C l1That is the output gender of the image interface; when the difference is less than the threshold k, it is necessary to judge C l1 and C l2 Whether the gender is both male and female at the same time, if yes, the image interface outputs a neutral category, otherwise the image interface outputs other genders.

[0216] As an optional implementation, in the above step 208, determining the gender category corresponding to the target clothing product according to the text recognition result, the size recognition result and the image recognition result includes:

[0217] Determine the final confidence scores of the target clothing product under multiple gender categories based on the text recognition results, the size recognition results, and the image recognition results;

[0218] The gender category corresponding to the target clothing product is determined according to the final confidence scores of the target clothing product under multiple gender categories.

[0219] The gender category in the embodiment of the present invention may include male, female, neutral or other genders or a combination of one or more thereof.

[0220] It can be seen that the implementation of this optional implementation method can determine the gender category corresponding to the target clothing product based on the final confidence score of the target clothing product under multiple gender categories, thereby improving the accuracy and efficiency of clothing product gender recognition, and further effectively solving the problem of lower accuracy caused by the prior art of using only single modal data for clothing gender recognition.

[0221] As an optional implementation, in the above step, determining the final confidence score of the target clothing product under multiple gender categories according to the text recognition result, the size recognition result and the image recognition result includes:

[0222] Determine the final confidence scores of the target clothing product under multiple gender categories based on the text recognition results, the size recognition results, and the image recognition results;

[0223] The gender category corresponding to the target clothing product is determined according to the final confidence scores of the target clothing product under multiple gender categories.

[0224] The gender category in the embodiment of the present invention may include male, female, neutral or other genders or a combination of one or more thereof.

[0225] It can be seen that the implementation of this optional implementation method can determine the gender category corresponding to the target clothing product based on the final confidence score of the target clothing product under multiple gender categories, thereby improving the accuracy and efficiency of clothing product gender recognition, and further effectively solving the problem of lower accuracy caused by the prior art of using only single modal data for clothing gender recognition.

[0226] As an optional implementation, in the above step, determining the final confidence score of the target clothing product under multiple gender categories according to the text recognition result, the size recognition result and the image recognition result includes:

[0227] The confidence scores of the text-related data, the size-related data, and the image-related data in at least one gender category are adjusted according to corresponding confidence correction formulas to obtain final confidence scores of the text-related data, the size-related data, and the image-related data in at least one gender category;

[0228] Final confidence scores of the text-related data, the size-related data, and the image-related data under at least one gender category are respectively determined as final confidence scores of the target clothing product under multiple gender categories.

[0229] In an embodiment of the present invention, the confidence correction formula is related to the prediction accuracy and / or confidence score threshold difference of the gender recognition network model corresponding to the corresponding confidence score. Optionally, the confidence score threshold difference is the difference between the confidence score corresponding to the weight factor and the recognition confidence threshold of the corresponding gender recognition network model.

[0230] It can be seen that the implementation of this optional implementation method can determine the final confidence scores of the text-related data, size-related data and image-related data in at least one gender category after being adjusted by the confidence correction formula as the final confidence scores of the target clothing products in multiple gender categories, thereby improving the rationality and accuracy of the final confidence scores, so as to improve the accuracy and efficiency of subsequent clothing product gender identification, and further effectively solve the problem of lower accuracy caused by the prior art of using only single modality data for clothing gender identification.

[0231] As an optional implementation, the confidence correction formula is:

[0232] S=S o ×b×γ;

[0233] Among them, S is the final confidence score, S o is the confidence score, b is the confidence normalization factor, and γ is the interface weight factor.

[0234] In an embodiment of the present invention, the interface weight factor is related to the prediction accuracy of the gender recognition network model corresponding to the confidence score, and is used to measure the importance of each gender recognition network model. For example, when considering the confidence score of text-related data, the historical prediction accuracy information related to the text gender recognition network model is selected to determine the interface weight factor. For example, when considering the confidence score of size-related data, the historical prediction accuracy information related to the size gender recognition network model is selected to determine the interface weight factor. For example, when considering the confidence score of image-related data, the historical prediction accuracy information related to the image gender recognition network model is selected to determine the interface weight factor. Optionally, the historical prediction accuracy information can be determined by calculating the average prediction accuracy of the corresponding gender recognition network model in a historical time period or historical prediction task.

[0235] Optionally, the interface weight factor can also be determined based on the inherent judgment attributes of the gender recognition network model. For example, the image gender recognition network model performs gender judgment based on the image content of the clothing product, and the image gender recognition network model receives multiple image materials to determine the output gender category of the clothing product. The gender classification accuracy of the image gender recognition network model is higher than that of the text gender recognition network model and the size gender recognition network model. Therefore, it is believed that the image gender recognition network model has higher credibility and stronger classification ability. The interface weight factor of the image gender recognition network model can be set to the maximum, and the text gender recognition network model and the size gender recognition network model also determine a lower interface weight factor than the image gender recognition network model based on actual conditions such as experimental results.

[0236] As an optional implementation, the confidence normalization factor is determined based on the following formula:

[0237] b = log a x;

[0238] Among them, x is related to the confidence score, a is related to the confidence threshold of the gender recognition network model corresponding to the confidence score, and x and a are both greater than 1. The reason for setting a greater than 1 is to ensure that log a The logarithmic function x is a monotonically increasing function to achieve the expected normalization effect. The reason for setting x greater than 1 is to ensure that the final b, that is, the confidence normalization factor, is greater than 0 to avoid data errors in the subsequent confidence correction based on this factor.

[0239] Optionally, x can be converted from the confidence score, such as x can be equal to the confidence score plus 1. Similarly, a can also be converted from the confidence threshold of the gender recognition network model, such as a can be the confidence threshold plus 1. In order to ensure the conversion effect of the confidence normalization factor, the formulas used to convert x and a from the corresponding confidence score or confidence threshold should be consistent or similar. For example, when the confidence score is 0.88 and the confidence threshold is 0.70, x can be 1+0.88 and a can be 1+0.7, so the confidence normalization factor b=log 1.7 1.88.

[0240] In an embodiment of the present invention, the confidence threshold of the gender recognition network model is the gender classification threshold determined during training, which corresponds to the confidence threshold of the corresponding network, such as the text gender recognition network model, the size gender recognition network model or the image gender recognition network model after the final training convergence. Those skilled in the art are aware that the confidence threshold is used to determine whether the confidence score corresponding to the output gender category is sufficiently credible, and the confidence threshold will be adjusted during training to reach a more accurate critical value.

[0241] Optionally, the confidence normalization factor may be a preset specific number or a piecewise function in addition to the logarithmic formula as above. Specifically, the role of the confidence normalization factor is that each gender recognition network model has different criteria for judging gender scores, that is, the confidence scores it outputs are in different dimensions, and therefore cannot be used directly for comparison. It is necessary to use the confidence normalization factor to map the confidence of each gender recognition network model to the same dimension, so that the gender recognition confidence scores of each model can be directly compared.

[0242] For example, the confidence score output by the text gender recognition network model is 0.88 (threshold is 0.85), the confidence score output by the size gender recognition network model is 0.6 (threshold is 0.4), and the confidence score output by the image gender recognition network model is 0.88 (threshold is 0.7). Here, we first assume that the importance of the three models is the same. At this time, if we directly compare the confidence scores, it is obvious that the text gender recognition network model has the highest score, while the size gender recognition network model has the lowest score. Then the gender output by the text gender recognition network model will have a great impact on the final output gender. However, for the text gender recognition network model, its confidence score is only 3.5% higher than the threshold, while the confidence score of the size gender recognition network model is 50% higher than the threshold. Obviously, the result of the size gender recognition network model is more credible. Therefore, it is necessary to adjust the scores of each model through the confidence normalization factor, reduce the gender score of the text model from 0.88 to 0.74, and increase the gender score of the size model from 0.6 to 0.93, so that it can be comparable.

[0243] It can be seen that the implementation of this optional implementation method can determine the confidence correction formula for correcting the confidence score, so that the final confidence score can be determined more accurately, so as to improve the accuracy and efficiency of subsequent clothing product gender recognition, and thus can effectively solve the problem of lower accuracy caused by the prior art of only using single modal data for clothing gender recognition.

[0244] As an optional implementation, in the above step, determining the gender category corresponding to the target clothing product according to the final confidence scores of the target clothing product under multiple gender categories includes:

[0245] Among the final confidence scores of the target clothing product under multiple gender categories, the gender category with the highest final confidence score is determined as the gender category corresponding to the target clothing product.

[0246] It can be seen that the implementation of this optional implementation method can determine the gender category with the highest final confidence score of the target clothing product under multiple gender categories as the gender category corresponding to the target clothing product, thereby accurately determining the gender category of the target clothing product, improving the accuracy and efficiency of clothing product gender recognition, and further effectively solving the problem of lower accuracy caused by the prior art of using only single modality data for clothing gender recognition.

[0247] As an optional implementation, in the above step, determining the gender category corresponding to the target clothing product according to the final confidence scores of the target clothing product under multiple gender categories includes:

[0248] According to the final confidence scores of the target clothing products under multiple gender categories, multiple final confidence scores are sorted from high to low to obtain a score sorting result;

[0249] The gender category corresponding to the target clothing product is determined according to the gender categories corresponding to the first N final confidence scores in the score sorting result; wherein N is an integer greater than 1, and N is less than the total number of final confidence scores.

[0250] It can be seen that the implementation of this optional implementation method can determine the gender category corresponding to the target clothing product according to the gender categories corresponding to the top N final confidence scores in the score sorting results, thereby accurately determining the gender category of the target clothing product, improving the accuracy and efficiency of clothing product gender recognition, and further effectively solving the problem of lower accuracy caused by the prior art of using only single modal data for clothing gender recognition.

[0251] As an optional implementation, in the above step, determining the gender category corresponding to the target clothing product according to the gender categories corresponding to the first N final confidence scores in the score sorting result includes:

[0252] Calculate the difference between the first two final confidence scores in the score ranking result;

[0253] Determine whether the difference is greater than a preset score difference threshold, and obtain a first determination result;

[0254] When the first judgment result is yes, the gender category corresponding to the highest final confidence score is determined as the gender category corresponding to the target clothing product;

[0255] When the first judgment result is no, determining whether the gender categories corresponding to the first two final confidence scores are male and female respectively, and obtaining a second judgment result;

[0256] When the second judgment result is yes, the gender category corresponding to the target clothing product is determined to be neutral;

[0257] When the second judgment result is no, the gender category corresponding to the highest final confidence score is determined as the gender category corresponding to the target clothing product.

[0258] A specific implementation scheme of the above disclosed method for gender identification of clothing products based on multimodal data is described below. The scheme includes the following steps:

[0259] The multimodal data of the target clothing product, including image data, text data and size data, is obtained and respectively input into the corresponding gender recognition network model.

[0260] A preset weight factor γ and a confidence normalization factor b are introduced for each gender recognition network model. The confidence normalization factor b is used to map the gender scores of each gender recognition network model to the same dimension. Then, the weight factor γ is used to adjust the importance of each gender recognition network model. The relationship between the final gender score S of each gender recognition network model and the output score So of each interface is: S = So × b × γ;

[0261] Compare the final gender scores S of each gender recognition network model: take the highest and second highest gender scores, calculate the score difference between the two, if it is greater than the score difference threshold, the gender category to which the highest gender score belongs is used as the output gender of the product; if the score difference is less than the score difference threshold, consider whether the gender categories to which the highest and second highest gender scores belong are both male and female at the same time. If so, output the neutral category as the gender of the product, otherwise still output the gender category to which the highest gender score belongs as the gender of the product.

[0262] Embodiment 3

[0263] See also Figure 3 , Figure 3 1 is a schematic diagram of a device for gender classification of clothing products based on text data disclosed in an embodiment of the present invention. Figure 3 The described apparatus can be applied to a corresponding training terminal, training device or server, and the server can be a local server or a cloud server, which is not limited in the embodiment of the present invention. Figure 3 As shown, the device may include:

[0264] A text acquisition module 301 is used to acquire text-related data of a target clothing product;

[0265] The text combination module 302 is used to extract and combine data of multiple text dimensions in the text-related data according to a preset combination rule to form multiple text combination data;

[0266] The text recognition module 303 is used to input the plurality of text combination data into the plurality of corresponding sub-text gender recognition network models in the text gender recognition network model to obtain a plurality of sub-text recognition results;

[0267] The text determination module 301 is used to determine the text recognition result corresponding to the text-related data according to the multiple sub-text recognition results; the text recognition result is used to indicate the gender classification of the text-related data.

[0268] As an optional implementation, the multiple text dimensions include at least two of the product title, product recommendation, product store name, text in the product image, product code, product style, product price, product origin, product brand information, product store contact information and product shipping address information.

[0269] As an optional implementation, the subtext recognition result includes the confidence scores of the corresponding text combination data under multiple gender categories; the text recognition result includes the confidence scores of the text-related data under multiple gender categories; the specific manner in which the text determination module 304 determines the text recognition result corresponding to the text-related data according to the multiple subtext recognition results includes:

[0270] Determine the text sub-model weight of the sub-text gender recognition network model corresponding to each sub-text recognition result; the text sub-model weight is related to the training prediction accuracy of the corresponding sub-text gender recognition network model;

[0271] According to the multiple sub-text recognition results and the corresponding text sub-model weights, the text recognition result corresponding to the text-related data is determined.

[0272] As an optional implementation, the text determination module 304 determines the specific manner of the text recognition result corresponding to the text-related data according to the multiple sub-text recognition results and the corresponding text sub-model weights, including:

[0273] For each sub-text recognition result, multiply the confidence scores of the corresponding text combination data under multiple gender categories by the corresponding text sub-model weights to obtain weighted confidence scores of the corresponding text combination data under multiple gender categories;

[0274] Calculate the total weighted confidence score corresponding to each gender category according to the weighted confidence scores of the text combination data corresponding to all sub-text recognition results under multiple gender categories;

[0275] Sort all gender categories according to the total weighted confidence score from high to low to obtain a gender category sequence;

[0276] The first preset number of gender categories in the gender category sequence and the corresponding total weighted confidence scores are determined as the text recognition result corresponding to the text-related data.

[0277] As an optional implementation, the text gender recognition network model is trained based on the following steps:

[0278] Get text training data for clothing items;

[0279] Extract and combine data of multiple text dimensions in the text training data according to the combination rules to form multiple text training sets;

[0280] Multiple text training sets are respectively input into the text gender recognition training network for training until convergence, so as to train multiple sub-text gender recognition network models.

[0281] As an optional implementation, Figure 4 As shown, the device also includes:

[0282] An acquisition module 305 is used to acquire size-related data and image-related data of a target clothing product;

[0283] The size recognition module 306 is used to input the size-related data into the size-gender recognition network model to obtain a size recognition result;

[0284] An image recognition module 307, used to input image-related data into an image gender recognition network model to obtain an image recognition result;

[0285] The gender determination module 308 is used to determine the gender category corresponding to the target clothing product according to the text recognition result, the size recognition result and the image recognition result.

[0286] As an optional implementation, the gender determination module 308 determines the specific manner of the gender category corresponding to the target clothing product according to the text recognition result, the size recognition result and the image recognition result, including:

[0287] Determine the final confidence scores of the target clothing product under multiple gender categories based on the text recognition results, the size recognition results, and the image recognition results;

[0288] The gender category corresponding to the target clothing product is determined according to the final confidence scores of the target clothing product under multiple gender categories.

[0289] Embodiment 4

[0290] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of another device for gender classification of clothing products based on text data disclosed in an embodiment of the present invention. Figure 5 As shown, the device may include:

[0291] A memory 401 storing executable program codes;

[0292] a processor 402 coupled to the memory 401;

[0293] The processor 402 calls the executable program code stored in the memory 401 to execute part or all of the steps in the method for gender classification of clothing products based on text data disclosed in the first or second embodiment of the present invention.

[0294] Embodiment 5

[0295] An embodiment of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute some or all steps in the clothing commodity gender classification method based on text data disclosed in embodiment 1 or embodiment 2 of the present invention.

[0296] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0297] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0298] Finally, it should be noted that the method and device for gender classification of clothing products based on text data disclosed in the embodiments of the present invention only disclose the preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for gender classification of clothing products based on text data, characterized in that: The method comprises: Obtain text-related data of the target clothing product; Extracting and combining data of multiple text dimensions in the text-related data according to a preset combination rule to form multiple text combination data; Inputting the plurality of text combination data into a plurality of corresponding sub-text gender recognition network models in the text gender recognition network model to obtain a plurality of sub-text recognition results; the sub-text recognition results include confidence scores of the corresponding text combination data under a plurality of gender categories; Determine the text sub-model weight of the sub-text gender recognition network model corresponding to each of the sub-text recognition results; the text sub-model weight is related to the training prediction accuracy of the corresponding sub-text gender recognition network model; for each of the sub-text recognition results, multiply the confidence score of the corresponding text combination data under multiple gender categories by the corresponding text sub-model weight to obtain the weighted confidence score of the corresponding text combination data under multiple gender categories; calculate the total weighted confidence score corresponding to each of the gender categories according to the weighted confidence scores of the text combination data under multiple gender categories corresponding to all the sub-text recognition results; sort all the gender categories from high to low according to the total weighted confidence score to obtain a gender category sequence; determine the first preset number of gender categories and the corresponding total weighted confidence scores of the gender category sequence as the text recognition result corresponding to the text-related data; the text recognition result is used to indicate the gender classification of the text-related data.

2. The method for gender classification of clothing products based on text data according to claim 1 is characterized in that: The multiple text dimensions include at least two of the product title, product recommendation, product store name, text in the product image, product code, product style, product price, product origin, product brand information, product store contact information and product shipping address information.

3. The method for gender classification of clothing products based on text data according to claim 2 is characterized in that: The text recognition result includes confidence scores of the text-related data under multiple gender categories.

4. The method for gender classification of clothing products based on text data according to claim 1, characterized in that: The text gender recognition network model is trained based on the following steps: Get text training data for clothing items; Extracting and combining the data of the multiple text dimensions in the text training data according to the combination rule to form multiple text training sets; The multiple text training sets are respectively input into the text gender recognition training network for training until convergence, so as to train and obtain the multiple sub-text gender recognition network models.

5. The method for gender classification of clothing products based on text data according to claim 1, characterized in that: The method further comprises: Acquire size-related data and image-related data of a target clothing item; Inputting the size-related data into a size-gender recognition network model to obtain a size recognition result; Inputting the image-related data into an image gender recognition network model to obtain an image recognition result; The gender category corresponding to the target clothing item is determined according to the text recognition result, the size recognition result, and the image recognition result.

6. The method for gender classification of clothing products based on text data according to claim 5 is characterized in that: The determining, according to the text recognition result, the size recognition result, and the image recognition result, the gender category corresponding to the target clothing product includes: Determining final confidence scores of the target clothing item under multiple gender categories according to the text recognition result, the size recognition result, and the image recognition result; The gender category corresponding to the target clothing item is determined according to the final confidence scores of the target clothing item under multiple gender categories.

7. A device for gender classification of clothing products based on text data, characterized in that: The device comprises: A text acquisition module is used to acquire text-related data of a target clothing product; A text combination module, used for extracting and combining data of multiple text dimensions in the text-related data according to a preset combination rule to form multiple text combination data; A text recognition module, used for inputting the plurality of text combination data into a plurality of corresponding sub-text gender recognition network models in a text gender recognition network model to obtain a plurality of sub-text recognition results; the sub-text recognition results include confidence scores of the corresponding text combination data under a plurality of gender categories; A text determination module, used to determine the text sub-model weight of the sub-text gender recognition network model corresponding to each of the sub-text recognition results; the text sub-model weight is related to the training prediction accuracy of the corresponding sub-text gender recognition network model; for each of the sub-text recognition results, the confidence score of the corresponding text combination data under multiple gender categories included therein is multiplied by the corresponding text sub-model weight to obtain the weighted confidence score of the corresponding text combination data under multiple gender categories; according to the weighted confidence scores of the text combination data under multiple gender categories corresponding to all the sub-text recognition results, the total weighted confidence score corresponding to each of the gender categories is calculated; according to the total weighted confidence score, all the gender categories are sorted from high to low to obtain a gender category sequence; the first preset number of gender categories and the corresponding total weighted confidence scores of the gender category sequence are determined as the text recognition result corresponding to the text-related data; the text recognition result is used to indicate the gender classification of the text-related data.

8. A device for gender classification of clothing products based on text data, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the clothing product gender classification method based on text data as described in any one of claims 1 to 6.

9. A computer storage medium, characterized in that The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the clothing commodity gender classification method based on text data as described in any one of claims 1 to 6.