Attribute value prediction method, device, computer system, and readable storage medium
By using an improved feature pyramid deep learning model, the system can directly predict product attribute values on e-commerce platforms, solving the problem of mismatch between manually set attributes and actual attributes. This improves configuration accuracy and user satisfaction, enables automated review, and saves labor costs.
Patent Information
- Application Number
- CN202110166460.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-05
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2041-02-05
AI Technical Summary
The mismatch between manually set product attributes and actual product attributes on e-commerce platforms leads to a poor user shopping experience. Existing correction methods are inefficient and rely on the quality of underlying data.
An improved feature pyramid deep learning model is adopted, which extracts feature maps through a pre-trained model, adjusts their size, and stitches them together using an attention mechanism. Combined with image preprocessing and iterative training, it directly predicts product attribute values.
It improves the accuracy of product attribute configuration, reduces human configuration errors, enhances user satisfaction, achieves automated review, and saves labor costs.
Smart Images

Figure CN113762316B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to an attribute value prediction method, an attribute value prediction device, a computer system, a computer-readable storage medium, and a computer program product. Background Technology
[0002] As living standards improve, people have higher demands for material goods and services, and online shopping has gradually become an important channel and method for shopping, with e-commerce platforms becoming a key choice. At this point, ecosystem issues on these platforms, such as product attributes, can significantly impact the user's shopping experience.
[0003] In the process of realizing the present invention, the inventors discovered that the related technology has at least the following problem: the product attributes set by the user on the e-commerce platform do not match the actual attributes of the product. Summary of the Invention
[0004] In view of the above, this disclosure provides an attribute value prediction method, an attribute value prediction apparatus, a computer system, a computer-readable storage medium, and a computer program product.
[0005] One aspect of this disclosure provides an attribute value prediction method, comprising: acquiring at least two feature maps, wherein the at least two feature maps are obtained by inputting an image to be processed into a pre-trained model and extracting them using at least two feature extraction layers in the pre-trained model, and the image to be processed includes an attribute to be predicted; adjusting the output size of each feature map in the at least two feature maps to a target size; stitching the at least two feature maps having the target size together using a preset stitching rule to obtain a final feature map; and processing the final feature map to obtain an attribute value of the image to be processed.
[0006] According to embodiments of this disclosure, the target size includes a target length, a target width, and a target number of channels. Adjusting the output size of each feature map in the at least two feature maps to the target size includes: when the length of the feature map is inconsistent with the target length and the width of the feature map is inconsistent with the target width, adjusting the length of the feature map to the target length and adjusting the width of the feature map to the target width by upsampling; and when the number of channels in the feature map is inconsistent with the target number of channels, adjusting the number of channels in the feature map to the target number of channels by convolution.
[0007] According to embodiments of this disclosure, the at least two feature maps include a first feature map, a second feature map, and a third feature map. The process of stitching the at least two feature maps having the target size together using a preset stitching rule to obtain a final feature map includes: stitching the first feature map and the second feature map together based on an attention mechanism to obtain a stitched feature map; and stitching the stitched feature map and the third feature map together based on an attention mechanism to obtain the final feature map.
[0008] According to an embodiment of this disclosure, the attribute value prediction method further includes: performing image preprocessing on the image to be processed before inputting the image to be processed into the pre-trained model, including: determining a preset standard for the input size of the attribute value prediction model for the image to be processed; if the size of the image to be processed does not conform to the preset standard, keeping the aspect ratio of the image to be processed unchanged, and supplementing the edges of the image to be processed with pixels so that the size of the image to be processed after supplementing pixels conforms to the preset standard.
[0009] According to embodiments of this disclosure, the attribute value prediction method is implemented through an attribute value prediction model, which includes the pre-trained model. The method further includes: when there are multiple attributes to be predicted, obtaining a total prediction model that includes multiple attribute value prediction models; predicting each attribute to be predicted using each of the attribute value prediction models in the total prediction model to obtain multiple attribute values of the image to be processed; and determining a target attribute value of the image to be processed based on the multiple attribute values.
[0010] According to embodiments of this disclosure, the attribute value prediction model is trained iteratively. Each iteration includes: acquiring an image training set, wherein the image training set includes multiple images and basic attribute values corresponding to each image; inputting the image training set into the attribute value training model to obtain a first predicted attribute value for each image in the image training set; adjusting the loss function of the attribute value prediction model based on the first predicted attribute value and the basic attribute value to obtain the attribute value training model for the next iteration; inputting the image training set into the attribute value training model for the next iteration to obtain a second predicted attribute value for each image in the image training set; and deleting the image corresponding to the mismatched attribute value from the image training set if the second predicted attribute value and the basic attribute value do not match, to obtain the image training set for the next iteration.
[0011] According to embodiments of this disclosure, the image to be processed includes configured attribute values, the configured attribute values being the actual configured values of the attribute to be predicted in the image to be processed. The method further includes: obtaining predicted attribute values for the image to be processed obtained by the attribute value prediction model; and marking the image to be processed if the predicted attribute values and the configured attribute values do not match.
[0012] Another aspect of this disclosure provides an attribute value prediction apparatus, comprising: an acquisition module for acquiring at least two feature maps obtained by processing an image to be processed through a pre-trained model based on at least two feature extraction layers in the pre-trained model, wherein the image to be processed includes an attribute to be predicted; an adjustment module for adjusting the output size of each feature map in the at least two feature maps to a target size; a stitching module for stitching the at least two feature maps having the target size together using a preset stitching rule to obtain a final feature map; and a processing module for processing the final feature map to obtain an attribute value of the image to be processed.
[0013] Another aspect of this disclosure provides a computer system comprising: one or more processors; and a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method as described above.
[0014] Another aspect of this disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon, which, when executed, are used to implement the method described above.
[0015] Another aspect of this disclosure provides a computer program product including computer-executable instructions that, when executed, are used to implement the method described above.
[0016] According to embodiments of this disclosure, by employing a technique of acquiring at least two feature maps, wherein the at least two feature maps are obtained by inputting the image to be processed into a pre-trained model and extracting them using at least two feature extraction layers in the pre-trained model, the image to be processed includes an attribute to be predicted, adjusting the output size of each feature map in the at least two feature maps to a target size, stitching the at least two feature maps with the target size together using a preset stitching rule to obtain a final feature map, and processing the final feature map to obtain an attribute value of the image to be processed, since the attribute value of the image to be processed can be directly predicted, the technical problem of mismatch between manually set product attributes and actual product attributes is at least partially overcome, thereby achieving the technical effect of improving the accuracy of product attribute configuration in e-commerce platforms and enhancing user satisfaction with the e-commerce platform. Attached Figure Description
[0017] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0018] Figure 1 An exemplary system architecture to which attribute value prediction methods can be applied according to embodiments of this disclosure is illustrated;
[0019] Figure 2 A flowchart illustrating an attribute value prediction method according to an embodiment of the present disclosure is shown schematically.
[0020] Figure 3 A schematic diagram illustrating the principle of an attribute value prediction model according to an embodiment of the present disclosure is shown.
[0021] Figure 4 An image preprocessing method according to an embodiment of the present disclosure is illustrated schematically;
[0022] Figure 5 The illustration schematically shows an implementation method of Block 1 according to an embodiment of the present disclosure;
[0023] Figure 6 The illustration schematically shows an implementation method of Block 2 according to an embodiment of the present disclosure;
[0024] Figure 7 The illustration schematically shows an implementation method of Block 3 according to an embodiment of the present disclosure;
[0025] Figure 8 The illustration schematically shows an implementation method of Block 4 according to an embodiment of the present disclosure;
[0026] Figure 9 The illustration schematically shows how the overall prediction model is deployed according to an embodiment of the present disclosure;
[0027] Figure 10 A flowchart illustrating the training process of an attribute value prediction model according to an embodiment of the present disclosure is shown.
[0028] Figure 11 A block diagram of an attribute value prediction apparatus according to an embodiment of the present disclosure is schematically shown; and
[0029] Figure 12 A block diagram of a computer system suitable for implementing an attribute value prediction method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation
[0030] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0031] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0032] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0033] When using expressions such as "at least one of A, B, and C," the expression should generally be interpreted in accordance with the meaning commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, systems having A alone, having B alone, having C alone, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.). Similarly, when using expressions such as "at least one of A, B, or C," the expression should generally be interpreted in accordance with the meaning commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, or C" should include, but is not limited to, systems having A alone, having B alone, having C alone, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0034] E-commerce platforms primarily target two groups: customers and merchants. Their services include providing products for customers and facilitating product listing for merchants. When purchasing goods, customers pay particular attention to product attributes because these attributes directly reflect the product's basic information and thus directly influence their purchase decision. Therefore, these attributes are the primary focus for customers when browsing products.
[0035] In realizing this disclosed concept, the inventor discovered that some merchants only focus on the main image and title of their products, neglecting product attributes and often filling them in haphazardly or directly using "other" options. This is most prominent in the apparel category. Apparel has a particularly large amount of attribute information, including: pattern, color, style, function, material, etc., with each attribute containing dozens or even hundreds of attribute values. This makes filling out the information extremely difficult for merchants. It also results in a poor experience for consumers; for example, sometimes a consumer may like a particular garment but, due to a lack of relevant information, often chooses to abandon it. This negative shopping experience is highly detrimental to e-commerce platforms.
[0036] In realizing this disclosed concept, the inventors also discovered that, in order to purify the e-commerce platform environment, business personnel often use a combination of manual screening and semi-automatic rule-based methods to correct non-compliant products. However, this method is too inefficient and cannot fundamentally solve the problem. For example, organizing manual spot checks has a limited scope and cannot cover all products. Moreover, the standards for manual review are inconsistent, which can easily lead to merchant complaints. Using similar product attribute values for voting is highly dependent on the underlying data. If the underlying data is clean, the results are reliable; if the underlying data is not clean, the results will be less reliable.
[0037] Embodiments of this disclosure provide an attribute value prediction method, an attribute value prediction apparatus, a computer system, a computer-readable storage medium, and a computer program product. The attribute value prediction method includes: acquiring at least two feature maps, wherein the at least two feature maps are obtained by inputting an image to be processed into a pre-trained model and extracting features using at least two feature extraction layers in the pre-trained model, and the image to be processed includes an attribute to be predicted; adjusting the output size of each feature map in the at least two feature maps to a target size; stitching the at least two feature maps with the target size using a preset stitching rule to obtain a final feature map; and processing the final feature map to obtain an attribute value of the image to be processed.
[0038] Figure 1 An exemplary system architecture 100 to which attribute value prediction methods can be applied according to embodiments of this disclosure is illustrated. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.
[0039] like Figure 1As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0040] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social media platforms.
[0041] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0042] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103. The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0043] It should be noted that the attribute value prediction method provided in this embodiment can generally be executed by server 105. Correspondingly, the attribute value prediction device provided in this embodiment can generally be located in server 105. The attribute value prediction method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the attribute value prediction device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Alternatively, the attribute value prediction method provided in this embodiment can also be executed by terminal devices 101, 102, or 103, or by other terminal devices different from terminal devices 101, 102, or 103. Accordingly, the attribute value prediction device provided in this embodiment of the present disclosure may also be set in terminal device 101, 102, or 103, or in other terminal devices different from terminal device 101, 102, or 103.
[0044] For example, the image to be processed may originally be stored in any one of terminal devices 101, 102, or 103 (e.g., terminal device 101, but not limited thereto), or it may be stored on an external storage device and imported into terminal device 101. The attribute value prediction model may be preset in terminal devices 101, 102, 103, a server, or a server cluster. Then, terminal device 101 may execute the attribute value prediction method provided in the embodiments of this disclosure locally, or send the image to be processed to other terminal devices, servers, or server clusters, and have the attribute value prediction model in the other terminal devices, servers, or server clusters that receive the image to be processed execute the attribute value prediction method provided in the embodiments of this disclosure.
[0045] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0046] Figure 2 A flowchart illustrating an attribute value prediction method according to an embodiment of the present disclosure is shown schematically.
[0047] Figure 3 A schematic diagram of an attribute value prediction model according to an embodiment of the present disclosure is shown.
[0048] like Figure 2 As shown, the attribute value prediction method includes operations S201 to S204.
[0049] According to embodiments of this disclosure, the attribute value prediction method can be implemented, for example, by an attribute value prediction model, which can be, for example, such as... Figure 3 The improved feature pyramid deep learning model is shown.
[0050] In operation S201, at least two feature maps are obtained, wherein the at least two feature maps are extracted by using at least two feature extraction layers in the pre-trained model after the image to be processed is input into the pre-trained model, and the image to be processed includes the attribute to be predicted.
[0051] According to embodiments of this disclosure, the image to be processed can be, for example, various product images, and the attribute to be predicted can include, for example, patterns, colors, styles, functions, materials, etc. The pre-trained model can be, for example, MobileNet_v2 (a lightweight neural network). MobileNet_v2 is, for example, a pre-trained model containing multiple feature extraction layers. MobileNet_v2 can extract features from the input image to be processed. The multiple feature extraction layers of MobileNet_v2 can respectively obtain the feature extraction results (i.e., feature maps) of the image to be processed at different processing stages in the pre-trained model. Since different feature maps may represent different features of the image to be processed, in order to enhance the completeness and accuracy of the features, this embodiment selects at least two feature maps for feature construction, so as to perform subsequent attribute value prediction based on the feature construction results.
[0052] It should be noted that the above-mentioned at least two feature maps can be, for example, feature maps obtained from multiple feature extraction layers of the feature extraction network that are more closely related to the actual attribute to be predicted (e.g., any one of pattern, color, style, function, or material), or feature maps corresponding to any at least two feature extraction layers in the feature extraction network.
[0053] according to Figure 3 In the illustrated embodiment, the pre-trained model described above can be, for example, a... Figure 3 In the feature extraction network, at least two of the above feature maps can ultimately be represented as follows: Figure 3 Features Figure 1 ,feature Figure 2 ,feature Figure 3 and characteristics Figure 4 .
[0054] It should be noted that, Figure 3 Features Figure 1 ~Characteristics Figure 4 This is merely an exemplary implementation scheme. In actual implementation, the number of the above at least two feature maps can be determined based on the specific circumstances, such as the actual attributes to be predicted.
[0055] In operation S202, the output size of each feature map in at least two feature maps is adjusted to the target size.
[0056] According to embodiments of this disclosure, since the feature maps output by different feature extraction layers of the pre-trained model have different sizes, i.e., the sizes of the at least two feature maps are different from each other, in order to achieve a feature construction method that is more suitable for the attribute value prediction model and to enable the feature construction results to more efficiently and accurately predict attribute values, the at least two feature maps can be adjusted to the same size, i.e., the target size.
[0057] according to Figure 3 In the illustrated embodiment, the above adjustment process can be, for example, by... Figure 3 The implementation of the Block component in [the context of the project].
[0058] It should be noted that the target size mentioned above can be, for example, a feature. Figure 1 ~Characteristics Figure 4 The size corresponding to the largest feature map in the middle, and other sizes can also be set by custom settings.
[0059] In operation S203, at least two feature maps with the above target size are stitched together using a preset stitching rule to obtain the final feature map.
[0060] According to embodiments of this disclosure, in order to better predict attribute values based on the above-mentioned at least two feature maps, the features of the at least two feature maps can be fused, and the fusion process can be implemented, for example, based on the above-mentioned preset splicing rules.
[0061] according to Figure 3 In the embodiments shown, the aforementioned preset splicing rules can be expressed, for example, as follows: Figure 3 The concatenation rule shown is based on an attention mechanism. The final feature map described above can be, for example, the feature map processed by the Block component based on an attention mechanism. Figure 1 ~Characteristics Figure 4 It was pieced together.
[0062] In operation S204, the final feature map is processed to obtain an attribute value of the image to be processed.
[0063] According to embodiments of this disclosure, the process of processing the final feature map may include, for example, max pooling and linear transformation operations. The result of the linear transformation may be fed into the output layer for attribute value prediction.
[0064] It should be noted that, in order to ensure that the prediction process is not disturbed and the prediction results are more accurate, the above attribute value prediction model is only used to predict one of the attribute values of the image to be processed (i.e., it can be any one of pattern, color, style, function, and material).
[0065] Through the above embodiments of this disclosure, an attribute value prediction model is designed. Employing an improved feature pyramid deep learning model structure, it can comprehensively utilize various information from images to predict attribute values, significantly improving prediction accuracy. Furthermore, since this model can directly predict attribute values in images, when merchants upload new product images to e-commerce platforms, the platforms can directly predict attribute values based on this model. This allows for the direct determination of the new product's attribute values without requiring additional information input, reducing potential errors caused by manual configuration and saving significant manpower costs later. It fundamentally solves the problem of mismatch between manually set product attributes and actual product attributes in e-commerce platforms, effectively improving the reliability of these platforms and ultimately enhancing user satisfaction.
[0066] The following describes specific embodiments and references. Figures 3 to 10 ,right Figure 2 The method shown will be further explained.
[0067] According to embodiments of this disclosure, for the above-described operation S201, before inputting the image to be processed into the pre-trained model, a process of image preprocessing of the image to be processed may be included. This preprocessing process may include, for example, determining a preset standard for the input size of the attribute value prediction model for the image to be processed; if the size of the image to be processed does not conform to the preset standard, keeping the aspect ratio of the image to be processed unchanged, and supplementing the edges of the image to be processed with pixels so that the size of the image to be processed after supplementing pixels conforms to the preset standard.
[0068] Figure 4 The illustration schematically depicts a method for image preprocessing according to an embodiment of the present disclosure.
[0069] according to Figure 4 In the illustrated embodiment, taking clothing images as an example, the image preprocessing may include adjusting the size of the image to be processed (i.e., resizing). The preprocessing process may be implemented, for example, through a letterbox method (a method that preserves the original aspect ratio and displays the content completely). The preset standard may be that the size of the image to be processed meets the square standard. The supplementary pixels may be represented as supplementary black borders.
[0070] like Figure 4The left-middle image is the original image to be processed, but it is not square and does not meet the model's input requirements (i.e., the aforementioned preset standard). Therefore, adjustments are needed. However, since the clothing attributes corresponding to the image can include details such as collar shape and length, directly resizing the image may cause distortion of these details, leading to prediction failure. Therefore, this embodiment introduces a letterbox method to adjust the image. For example, it involves keeping the image's aspect ratio unchanged, resizing the image, and adding black borders to other parts that do not meet the size requirements, thereby obtaining... Figure 4 The image shown on the right is the resized image.
[0071] It should be noted that the above preset standards are not limited to the square standard. However, regardless of the standard, the image can be processed based on the letterbox method to obtain an image that meets the preset standard. The above preset standards can be the input standards of the attribute value prediction model or the input standards of the pre-trained model, and there is no limitation here.
[0072] Through the above embodiments of this disclosure, the image is resized using the letterbox method, which not only preserves the information of the original image but also adjusts it to the input size required by the pre-trained model, thus meeting the input requirements of the pre-trained model and achieving two goals at once.
[0073] According to embodiments of this disclosure, the target size in the above operation S202 may include, for example, a target length, a target width, and a target number of channels. Based on this, the above operation S202 may include, for example, adjusting the length of the feature map to the target length and adjusting the width of the feature map to the target width by upsampling when the length of the feature map is inconsistent with the target length and the width of the feature map is inconsistent with the target width; and adjusting the number of channels of the feature map to the target number of channels by convolution when the number of channels of the feature map is inconsistent with the target number of channels.
[0074] It should be noted that the above upsampling method can adjust both the length and width of the feature map at the same time. However, in some cases, it is not necessary to completely satisfy the conditions that the length of the feature map is inconsistent with the target length and the width of the feature map is inconsistent with the target width. Instead, it is only necessary to satisfy any one of these conditions (for example, only satisfying that the length of the feature map is inconsistent with the target length, or only satisfying that the width of the feature map is inconsistent with the target width) to adjust the feature map by upsampling.
[0075] according to Figure 3 The illustrated embodiment uses features obtained through four feature extraction layers of a feature extraction network. Figure 1 ~Characteristics Figure 4 For example, it can be expressed in the following form:
[0076] Feature1: block_2_project_BN(56, 56, 24)
[0077] Feature2: block_5_project_BN(28, 28, 32)
[0078] Feature3: block_12_project_BN(14, 14, 96)
[0079] Feature4: block_16_project_BN(7, 7, 320)
[0080] The content within parentheses represents the output size of the corresponding feature extraction layer. Since the output sizes of these feature extraction layers are inconsistent, the Block component is needed to unify them to a single size to facilitate subsequent attribute value prediction. For example... Figure 3 As shown, the Block component may include, for example, Block1, Block2, Block3, and Block4, which respectively adjust the size of Feature1, Feature2, Feature3, and Feature4. In this embodiment, the target size is, for example, (56, 56, 64), that is, the target length is 56, the target width is 56, and the target number of channels is 64.
[0081] Figure 5 The implementation method of Block 1 according to an embodiment of the present disclosure is illustrated schematically.
[0082] like Figure 5 As shown, since the length and width of the feature map output corresponding to Feature1 are the same as the length and width of the target, only the number of channels is different from the number of channels in the target, Block1 mainly adjusts the number of channels in the feature map output corresponding to Feature1 through 1*1 convolution, that is, adjusts the original number of channels 24 to the target number of channels 64, so as to obtain the output of the target size.
[0083] Figure 6 The illustration schematically shows an implementation method of Block 2 according to an embodiment of the present disclosure.
[0084] like Figure 6 As shown, since the length, width, and number of channels of the feature map output by Feature2 are inconsistent with the length, width, and number of channels of the target, Block2 mainly uses UpSampling to upsample the image to adjust the size of the feature layer to 56*56*32, and then uses 3*3 convolution to adjust the number of channels to obtain the output of the target size.
[0085] Figure 7The illustration schematically shows an implementation method of Block 3 according to an embodiment of the present disclosure.
[0086] like Figure 7 As shown, since the length, width, and number of channels of the feature map output by Feature3 are inconsistent with the length, width, and number of channels of the target, Block3 mainly performs upsampling through two UpSampling operations to adjust the size of the feature layer of the image to 56*56*32, and then adjusts the number of channels through 3*3 convolution to obtain the output of the target size.
[0087] Figure 8 The illustration schematically shows an implementation method of Block 4 according to an embodiment of the present disclosure.
[0088] like Figure 8 As shown, since the length, width, and number of channels of the feature map output by Feature4 are inconsistent with the length, width, and number of channels of the target, Block4 mainly performs upsampling through 3 UpSampling operations to adjust the size of the feature layer of the image to 56*56*32, and then adjusts the number of channels through 3*3 convolution to obtain the output of the target size.
[0089] It should be noted that the method for adjusting the number of channels is not limited to... Figures 5-8 The methods shown, including various adjustment and transformation methods that can achieve the transformation from the original size to the target size, are all applicable to this invention.
[0090] According to embodiments of this disclosure, for the above operation S203, the at least two feature maps may include, for example, a first feature map, a second feature map, and a third feature map. Based on this, the above operation S203 may include, for example,: splicing the first feature map and the second feature map based on an attention mechanism to obtain a spliced feature map; and splicing the spliced feature map and the third feature map based on an attention mechanism to obtain a final feature map.
[0091] according to Figure 3In the illustrated embodiment, after obtaining four feature maps of the target size, the stitching process begins. This embodiment uses a more flexible attention mechanism to implement this stitching process. For example, it can be implemented as follows: First, Feature1 and Feature2 are stitched together using attention to obtain feature_contact_feature1 (which can correspond to the stitched feature map mentioned above); then, this feature is stitched together with Feature3 using attention to obtain contact_feature2 (which can also correspond to the stitched feature map mentioned above); finally, contact_feature2 is stitched together with Feature4 using attention to obtain the final feature_contact_features (which can correspond to the final feature map mentioned above).
[0092] It should be noted that the splicing process in this solution is not limited to the above-described implementation method. In specific implementation methods, the splicing process can be adaptively adjusted according to the number of feature maps. Any other splicing method that is beneficial to feature extraction can be applied to this invention.
[0093] Based on the above embodiments of this disclosure, and taking into account the fact that the feature extraction focus of each layer from Feature1 to Feature4 is different, attention modules are used for feature selection in multiple places, and feature concatenation is performed in combination with attention methods. The most effective image features can be selected for attribute value prediction. Compared with the clumsy and rigid direct concatenation method and the feature redundancy caused by it, the features obtained by this attention method are more flexible and more representative.
[0094] According to embodiments of this disclosure, the above-described attribute value prediction method further includes: when there are multiple attributes to be predicted, obtaining a total prediction model including multiple attribute value prediction models; predicting each attribute to be predicted by each attribute value prediction model in the total prediction model to obtain multiple attribute values of the image to be processed; and determining the target attribute value of the image to be processed based on the multiple attribute values.
[0095] Figure 9 The illustration schematically shows how the overall prediction model is deployed according to an embodiment of this disclosure.
[0096] Because ensuring sufficiently accurate attribute value prediction results is required, the attribute value prediction model disclosed herein is only used to predict one attribute value. However, in reality, the image to be processed has numerous attributes, making it impossible to deploy a model service for each attribute. Therefore, a modular approach is adopted, treating each attribute value prediction model as a module, and combining multiple modules into a large model (i.e., the aforementioned overall prediction model). This overall prediction model is responsible for predicting all attributes of an image to be processed. For example, when attribute value prediction is required, only one image needs to be input to obtain the probability of the corresponding attribute value for each attribute, thus obtaining all attribute value prediction results, and then selecting the desired result. Moreover, for this overall prediction model, if upgrades and iterations are needed, only the module corresponding to the required attribute value prediction model needs to be upgraded, without affecting other modules.
[0097] Through the above embodiments of this disclosure, a modular approach is adopted, and a prediction model is built separately for each attribute. Moreover, through model combination technology, multiple models are combined together. Thus, during deployment, only one model needs to be deployed to predict multiple attributes, saving time. During upgrade iteration, only one module needs to be upgraded to complete the upgrade iteration without affecting other modules.
[0098] According to embodiments of this disclosure, the attribute value prediction model described above is trained through iterative training, with each iteration including:
[0099] a. Obtain the image training set, which includes multiple images and the basic attribute values corresponding to each image;
[0100] b. Input the image training set into the attribute value training model to obtain the first predicted attribute value for each image in the image training set;
[0101] c. Adjust the loss function of the attribute value prediction model based on the first predicted attribute value and the basic attribute value to obtain the attribute value training model for the next iteration;
[0102] d. Input the image training set into the attribute values of the next iteration to train the model and obtain the second predicted attribute value for each image in the image training set;
[0103] e. If the second predicted attribute value and the basic attribute value do not match, delete the images corresponding to the mismatched attribute values from the image training set to obtain the image training set for the next iteration.
[0104] Figure 10 A flowchart illustrating the training process of an attribute value prediction model according to an embodiment of the present disclosure is shown.
[0105] According to embodiments of this disclosure, the aforementioned image training set may be images obtained from e-commerce platforms. Since the attribute values configured for images obtained from e-commerce platforms may not match the actual attribute values, the basic attribute values corresponding to the images in this training set may actually include both true and false values. Since the attribute value prediction model is used to predict attribute values, such as predicting the color of clothing (black, white, red, etc.), this multi-classification situation is highly dependent on the cleanliness of the data, meaning it needs to ensure the authenticity of the basic attribute values corresponding to the images in the training set. However, the cost of manual labeling required to achieve this is very high. To reduce the degree of manual intervention, this embodiment directly targets the image training set containing both true and false values, employing a method of training and cleaning data simultaneously to train the attribute value prediction model. This process may include, for example, training the model first, then using the model to predict attribute values in reverse, finding samples that differ from the true labels (i.e., the aforementioned basic attribute values), and then verifying and cleaning them.
[0106] According to embodiments of this disclosure, the above-mentioned training model process can be implemented, for example, by the methods described in steps b and c; the above-mentioned process of using the model to predict attribute values in reverse can be implemented, for example, by the method described in step d; and the above-mentioned verification and cleaning process can be implemented, for example, by the method described in step e. Furthermore, the cleaned data obtained through step e (here, for example, the remaining images obtained after deleting images corresponding to mismatched attribute values from the image training set) can be used as the image training set for step a in the next iteration, and the methods described in steps b to d are repeated in the next iteration. Thus, the training of the attribute value prediction model is completed through a process of simultaneous training, cleaning, repeated training, and repeated iterations.
[0107] According to embodiments of this disclosure, in the method described in process e above, if the predicted attribute value and the basic attribute value do not match, the image corresponding to the mismatched attribute value can also be labeled, which reduces the cost of manual labeling to a certain extent.
[0108] The above embodiments of this disclosure employ a multi-iterative training method, which reduces the workload of manually labeling data.
[0109] According to embodiments of this disclosure, the image to be processed includes configured attribute values, which are the actual configuration values of the attribute to be predicted in the image to be processed. The attribute value prediction method may further include: obtaining the predicted attribute value for the image to be processed obtained by the attribute value prediction model; and marking the image to be processed if the predicted attribute value and the configured attribute value do not match.
[0110] Through the embodiments of this disclosure, product images with inaccurate attribute value configurations can be directly marked using an attribute value prediction model, thereby achieving an automated review process. By replacing manual review with machine review, the degree of human intervention in the review process is reduced. Moreover, this review process implemented through the attribute value prediction model does not rely on other information, such as underlying data; it can identify attribute details based solely on the product's own information, achieving a fully automated and highly reliable review process.
[0111] According to the above embodiments of this disclosure, product images entered by merchants are generally associated with corresponding attributes. These attributes may include, for example, attributes that have not yet been configured with actual values, or attributes that have already been configured with actual values. The configured actual values may be either true or false. Regardless of the form, this embodiment can use the aforementioned overall prediction model to predict the product image. The prediction result may be, for example, determining the attribute value corresponding to the attribute in the product image that has not been configured with actual values, judging whether the configuration value corresponding to the attribute in the product image that has been configured with actual values is correct. If incorrect, the correct value can be selected for reconfiguration, or the product image can be marked to prompt the merchant to modify it or to inform the user that the product information is inaccurate.
[0112] According to embodiments of this disclosure, an efficient attribute value prediction model for detecting attributes in an image is provided, along with a detailed deployment scheme. This scheme utilizes a deep learning model for detection and allows for threshold adjustment in the final decision maker, offering high flexibility and operability.
[0113] Through the embodiments of this disclosure, based on the aforementioned attribute value prediction model, on the one hand, attribute value prediction for images can be achieved, reducing some manual operations during product entry to a certain extent. For example, when product attributes are selectable, the selected attribute value can be directly determined. On the other hand, it also enables the review of existing product information, such as marking or modifying related products with inaccurate attribute values. The entire process reduces manual operations, facilitating the product entry and review process of e-commerce platforms, thereby effectively improving user satisfaction when using e-commerce platforms.
[0114] Figure 11 A block diagram of an attribute value prediction apparatus according to an embodiment of the present disclosure is shown schematically.
[0115] like Figure 11 As shown, the attribute value prediction device 1100 includes a first acquisition module 1110, an adjustment module 1120, a splicing module 1130, and a processing module 1140.
[0116] The first acquisition module 1110 is used to acquire at least two feature maps obtained by processing the image to be processed by inputting it into a pre-trained model, based on at least two feature extraction layers in the pre-trained model, wherein the image to be processed includes attributes to be predicted.
[0117] The adjustment module 1120 is used to adjust the output size of each feature map in the at least two feature maps to the target size.
[0118] The stitching module 1130 is used to stitch together at least two feature maps with the target size using a preset stitching rule to obtain a final feature map.
[0119] The processing module 1140 is used to process the final feature map to obtain an attribute value of the image to be processed.
[0120] According to embodiments of this disclosure, the target dimensions include target length, target width, and target number of channels, and the adjustment module includes a first adjustment unit and a second adjustment unit.
[0121] The first adjustment unit is used to adjust the length and width of the feature map to the target length and width by upsampling when the length and width of the feature map are inconsistent with the target length and target width.
[0122] The second adjustment unit is used to adjust the number of channels in the feature map to the target number of channels by convolution when the number of channels in the feature map is inconsistent with the target number of channels.
[0123] According to embodiments of this disclosure, the at least two feature maps include a first feature map, a second feature map, and a third feature map, and the splicing module includes a first splicing unit and a second splicing unit.
[0124] The first splicing unit is used to splice the first feature map and the second feature map based on an attention mechanism to obtain a spliced feature map.
[0125] The second splicing unit is used to splice the spliced feature map and the third feature map based on an attention mechanism to obtain the final feature map.
[0126] According to embodiments of this disclosure, the attribute value prediction device further includes a preprocessing module for preprocessing the image to be processed before inputting it into the pre-trained model. The preprocessing module includes a determination unit and a supplementary unit.
[0127] The determining unit is used to determine the preset standard for the input size of the attribute value prediction model for the image to be processed.
[0128] The supplementary unit is used to supplement pixels on the edges of the image to be processed, while keeping the aspect ratio of the image to be processed unchanged, so that the size of the image to be processed after supplementing pixels conforms to the preset standard, when the size of the image to be processed does not conform to the preset standard.
[0129] According to embodiments of this disclosure, the attribute value prediction device further includes a second acquisition module, a prediction module, and a determination module.
[0130] The second acquisition module is used to acquire a total prediction model that includes multiple attribute value prediction models when the attribute to be predicted includes multiple attributes.
[0131] The prediction module is used to predict each of the attributes to be predicted by each of the attribute value prediction models in the overall prediction model, so as to obtain multiple attribute values of the image to be processed.
[0132] The determination module is used to determine the target attribute value of the image to be processed based on the plurality of attribute values.
[0133] According to embodiments of this disclosure, the attribute value prediction device further includes a training module for training the attribute value prediction model through iterative training. The training module includes an acquisition unit, a first prediction unit, an adjustment unit, a second prediction unit, and a deletion unit, and each iteration of training is achieved through the acquisition unit, the first prediction unit, the adjustment unit, the second prediction unit, and the deletion unit.
[0134] An acquisition unit is used to acquire an image training set, wherein the image training set includes multiple images and basic attribute values corresponding to each image.
[0135] The first prediction unit is used to input the image training set into the attribute value training model to obtain the first predicted attribute value for each image in the image training set.
[0136] The adjustment unit is used to adjust the loss function of the attribute value prediction model according to the first predicted attribute value and the basic attribute value, so as to obtain the attribute value training model for the next iteration.
[0137] The second prediction unit is used to input the image training set into the attribute value training model of the next iteration to obtain the second predicted attribute value for each image in the image training set.
[0138] The deletion unit is used to delete the images corresponding to the mismatched attribute values from the image training set when the second predicted attribute value and the basic attribute value do not match, so as to obtain the image training set for the next iteration.
[0139] According to embodiments of this disclosure, the image to be processed includes configured attribute values, which are the actual configured values of the attribute to be predicted in the image to be processed. The attribute value prediction device further includes a third acquisition module and a marking module.
[0140] The third acquisition module is used to acquire the predicted attribute values for the image to be processed, which are predicted by the attribute value prediction model.
[0141] A labeling module is used to label the image to be processed when the predicted attribute value and the configured attribute value do not match.
[0142] Any one or more of the modules or units according to embodiments of this disclosure, or at least a portion thereof, may be implemented in a single module. Any one or more of the modules or units according to embodiments of this disclosure may be implemented by dividing them into multiple modules. Any one or more of the modules or units according to embodiments of this disclosure may be at least partially implemented as hardware circuitry, such as a Field-Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-Chip, a System-on-Substrate, a System-on-Package, an Application-Specific Integrated Circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three methods. Alternatively, one or more of the modules or units according to embodiments of this disclosure may be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.
[0143] For example, any plurality of the first acquisition module 1110, adjustment module 1120, splicing module 1130, and processing module 1140 can be combined into one module / unit, or any one of these modules / units can be split into multiple modules / units. Alternatively, at least part of the functionality of one or more of these modules / units can be combined with at least part of the functionality of other modules / units and implemented in one module / unit. According to embodiments of this disclosure, at least one of the first acquisition module 1110, adjustment module 1120, splicing module 1130, and processing module 1140 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any one of the three implementation methods or a suitable combination of any of them. Alternatively, at least one of the first acquisition module 1110, adjustment module 1120, splicing module 1130 and processing module 1140 may be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0144] It should be noted that the attribute value prediction device part in the embodiments of this disclosure corresponds to the attribute value prediction method part in the embodiments of this disclosure. The specific description of the attribute value prediction device part is referred to in the attribute value prediction method part, and will not be repeated here.
[0145] Figure 12 A block diagram of a computer system suitable for implementing an attribute value prediction method according to an embodiment of the present disclosure is shown schematically. Figure 12 The computer system shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0146] like Figure 12 As shown, a computer system 1200 according to an embodiment of the present disclosure includes a processor 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage portion 1208 into a random access memory (RAM) 1203. The processor 1201 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1201 may also include onboard memory for caching purposes. The processor 1201 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0147] RAM 1203 stores various programs and data required for the operation of system 1200. Processor 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. Processor 1201 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 1202 and / or RAM 1203. It should be noted that the programs may also be stored in one or more memories other than ROM 1202 and RAM 1203. Processor 1201 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0148] According to embodiments of this disclosure, system 1200 may further include an input / output (I / O) interface 1205, which is also connected to bus 1204. System 1200 may also include one or more of the following components connected to I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to I / O interface 1205 as needed. A removable medium 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 1210 as needed so that computer programs read from it can be installed into storage section 1208 as needed.
[0149] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1209, and / or installed from removable medium 1211. When the computer program is executed by processor 1201, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0150] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0151] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0152] For example, according to embodiments of this disclosure, a computer-readable storage medium may include the ROM 1202 and / or RAM 1203 described above and / or one or more memories other than ROM 1202 and RAM 1203.
[0153] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the attribute value prediction method provided in the embodiments of this disclosure.
[0154] When the computer program is executed by the processor 1201, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0155] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1209, and / or installed from the removable medium 1211. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0156] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0157] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features recited in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not expressly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0158] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. An attribute value prediction method, comprising: At least two feature maps are obtained, wherein the at least two feature maps are obtained after the image to be processed is input into a pre-trained model. The image to be processed includes the attribute to be predicted, which is extracted using at least two feature extraction layers in the pre-trained model. Adjust the output size of each feature map in the at least two feature maps to the target size; At least two feature maps having the target size are stitched together using a preset stitching rule to obtain a final feature map; and The final feature map is processed to obtain an attribute value of the image to be processed; The attribute value prediction model is trained iteratively, with each iteration including: Obtain an image training set, wherein the image training set includes multiple images and basic attribute values corresponding to each image; The image training set is input into the attribute value training model to obtain the first predicted attribute value for each image in the image training set. The loss function of the attribute value prediction model is adjusted based on the first predicted attribute value and the basic attribute value to obtain the attribute value training model for the next iteration. The image training set is input into the attribute value training model in the next iteration to obtain the second predicted attribute value for each image in the image training set; If the second predicted attribute value and the basic attribute value do not match, the image corresponding to the mismatched attribute value is deleted from the image training set to obtain the image training set for the next iteration.
2. The method according to claim 1, wherein, The target size includes the target length, target width, and target number of channels. Adjusting the output size of each feature map in the at least two feature maps to the target size includes: When the length of the feature map is inconsistent with the target length, and the width of the feature map is inconsistent with the target width, the length of the feature map is adjusted to the target length, and the width of the feature map is adjusted to the target width, by upsampling. If the number of channels in the feature map is inconsistent with the target number of channels, the number of channels in the feature map is adjusted to the target number of channels by convolution.
3. The method according to claim 1, wherein, The at least two feature maps include a first feature map, a second feature map, and a third feature map. The at least two feature maps having the target size are stitched together using a preset stitching rule to obtain a final feature map including: The first feature map and the second feature map are concatenated using an attention mechanism to obtain a concatenated feature map; and The final feature map is obtained by concatenating the concatenated feature map and the third feature map based on an attention mechanism.
4. The method according to claim 1, further comprising: Before inputting the image to be processed into the pre-trained model, image preprocessing is performed on the image to be processed, including: Determine the preset standard for the input size of the image to be processed for the attribute value prediction model; If the size of the image to be processed does not conform to the preset standard, the aspect ratio of the image to be processed is kept unchanged, and pixels are added to the edges of the image to be processed so that the size of the image to be processed after adding pixels conforms to the preset standard.
5. The method according to claim 1, wherein, The attribute value prediction method is implemented through an attribute value prediction model, which includes the pre-trained model. The method further includes: When there are multiple attributes to be predicted, obtain a total prediction model that includes multiple prediction models for the attribute values. Each attribute to be predicted is predicted by a prediction model for each attribute value in the overall prediction model, thereby obtaining multiple attribute values for the image to be processed; and The target attribute value of the image to be processed is determined based on the multiple attribute values.
6. The method according to claim 1, wherein, The image to be processed includes configured attribute values, wherein the configured attribute values are the actual configured values of the attribute to be predicted in the image to be processed, and the method further includes: Obtain the predicted attribute values for the image to be processed, obtained by the attribute value prediction model; and If the predicted attribute value and the configured attribute value do not match, the image to be processed is marked.
7. An attribute value prediction device, comprising: The first acquisition module is used to acquire at least two feature maps obtained by processing the image to be processed by inputting it into a pre-trained model, based on at least two feature extraction layers in the pre-trained model, wherein the image to be processed includes attributes to be predicted. An adjustment module is used to adjust the output size of each feature map in the at least two feature maps to a target size; A stitching module is used to stitch together at least two feature maps having the target size using preset stitching rules to obtain a final feature map; and The processing module is used to process the final feature map to obtain an attribute value of the image to be processed; The attribute value prediction device further includes a training module, which includes: An acquisition unit is used to acquire an image training set, wherein the image training set includes multiple images and basic attribute values corresponding to each image; The first prediction unit is used to input the image training set into the attribute value training model to obtain a first predicted attribute value for each image in the image training set. The adjustment unit is used to adjust the loss function of the attribute value prediction model according to the first predicted attribute value and the basic attribute value, so as to obtain the attribute value training model for the next iteration. The second prediction unit is used to input the image training set into the attribute value training model of the next iteration to obtain the second predicted attribute value for each image in the image training set. The deletion unit is used to delete the images corresponding to the mismatched attribute values from the image training set when the second predicted attribute value and the basic attribute value do not match, so as to obtain the image training set for the next iteration.
8. A computer system, comprising: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 6.
9. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 6.
10. A computer program product comprising computer-executable instructions, which, when executed, are used to implement the method of any one of claims 1 to 6.
Citation Information
Patent Citations
An attribute detection method and an attribute detection device
CN109447021A
Image processing method, device and equipment and storage medium
CN110752028A