Method, device, equipment and storage medium for feature extraction and processing of object images
By combining the image features and annotation features of the item pictures, using the feature annotation library and training model, the problem of inaccurate feature extraction of the item pictures is solved, and the accuracy and diversity of the processing results are improved.
Patent Information
- Application Number
- CN202010252467.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-01
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-04-01
AI Technical Summary
The features extracted from the item pictures in the existing technology can only be image features, which cannot accurately and completely express more features of the item, resulting in inaccurate processing results.
By obtaining annotation information of item pictures, combining image features and annotation features, adjusting the feature extraction process, and using feature annotation libraries and preset training models to enhance the accuracy and diversity of feature extraction.
It achieves accurate and diverse representation of item image features and improves the accuracy of processing results, such as the accuracy of advertising click-through rate prediction, item clustering and personalized recommendations.
Smart Images

Figure CN111767925B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of Internet technology, and in particular, to a method, device, equipment and storage medium for extracting and processing features of object images. Background Art
[0002] With the development of Internet technology, more and more items are displayed to users in the form of pictures, allowing users to view the details of the items or purchase them, etc. As the number of item pictures continues to increase, it is becoming increasingly important to mine item characteristics and user characteristics based on the visual features of item pictures; for example, mining user preferences and conducting advertising rate analysis based on the visual features of item pictures, etc.
[0003] In the prior art, image features of item images can be extracted, and the item images can be processed based on the image features, for example, image clustering, calculation of advertisement click-through rate, personalized recommendation, and the like.
[0004] In the process of implementing the present application, the inventors found that there are at least the following problems in the prior art: the features extracted based on the object picture can only be the image features of the picture, and the image features cannot accurately and completely express more features of the object picture; and furthermore, the results obtained by processing the object picture based on the image features are not accurate enough. Summary of the invention
[0005] The embodiments of the present application provide a method, device, equipment and storage medium for extracting and processing features of an object image, so as to solve the problem that image features cannot accurately and completely express more features of the object image and the obtained results are not accurate enough.
[0006] In a first aspect, an embodiment of the present application provides a method for extracting and processing features of an object image, comprising:
[0007] Acquire the annotation information of the image of the object to be processed, wherein the annotation information represents the annotation features of the object;
[0008] Determining a picture feature of the item picture according to the annotation information and the item picture, wherein the picture feature includes image feature information of the item picture and the annotation feature;
[0009] The item image is processed in a preset manner according to the image features to obtain a processing result.
[0010] This embodiment has the following advantages or beneficial effects: the object picture can represent the image feature information, and the annotation information can represent the prior knowledge of the object in the object picture; the object picture and the annotation information are combined to obtain the image features of the object picture, and the obtained image features can express the image features and annotation features of the object. The extracted image features can accurately and diversely represent the features of the object, that is, accurate object features are obtained; then, the object picture is processed based on the image features to obtain a relatively accurate processing result.
[0011] In an optional implementation, determining the image features of the item image according to the annotation information and the item image includes: extracting features from the item image to obtain a feature map of the item, wherein the feature map is used to represent the image feature information of the item image; and adjusting the feature map according to the annotation information to obtain the image features. Since feature annotation represents the prior knowledge of the item image, in order not to lose this important feature, feature annotation can be used to adjust the image feature information, increase the accuracy of the image features, and make the image features contain more content and information.
[0012] In an optional embodiment, the feature map is adjusted according to the annotation information to obtain the image features, including: determining the feature annotation corresponding to the annotation information according to the preset annotation information and the feature annotation library, wherein the feature annotation library includes feature annotations corresponding to different annotation information, and the feature annotation includes annotation channel information and annotation space information, wherein the annotation channel information is used to characterize the features of each channel of the item category corresponding to the annotation information, and the annotation space information is used to characterize the features of each space of the item category corresponding to the annotation information; adjusting the feature map according to the feature annotation corresponding to the annotation information to obtain the image features. The annotation channel information characterizes the features of each channel of the item category, and the annotation space information characterizes the features of each space of the item category; a feature annotation library can be set up, and when it is necessary to determine the feature annotation corresponding to the annotation information, it can be queried from the feature annotation library without regenerating the feature annotation, which can speed up the image feature extraction and image processing.
[0013] In an optional implementation manner, adjusting the feature map according to the feature annotation corresponding to the annotation information to obtain the image feature includes:
[0014] Repeat the following process until the first preset condition is met: according to the acquired annotated channel information, the acquired feature map is processed to obtain a first feature map tensor, wherein the first feature map tensor has feature information annotated with the channel information and feature information of the acquired feature map; according to the acquired annotated space information, the first feature map tensor is processed to obtain a second feature map tensor, wherein the second feature map tensor has feature information annotated with the channel information, feature information annotated with the space information, and feature information of the acquired feature map; determine that the second feature map tensor is the acquired feature map;
[0015] Among them, the second feature map tensor obtained when the first preset condition is met is the image feature.
[0016] The labeled channel information and the labeled space information are sequentially added to the feature map, so that the feature map has the labeled channel information and the labeled space information.
[0017] In an optional implementation, obtaining the annotation information of the to-be-processed object image includes: obtaining the annotation information displayed on a display platform, wherein the display platform is a platform for displaying the object image. Since the object image and the annotation information of the object image can be displayed on the display platform, when analyzing the object image, the object image and the annotation information of the object image can be obtained at the same time. The annotation information is a priori knowledge of the object, and the annotation information can be used to improve the accuracy of image feature extraction.
[0018] In an optional implementation manner, the annotation information has feature annotation, and the feature annotation includes annotation channel information and annotation space information, wherein the annotation channel information is used to characterize the features of each channel of the item category corresponding to the annotation information, and the annotation space information is used to characterize the features of each space of the item category corresponding to the annotation information;
[0019] The method further comprises:
[0020] Obtaining a to-be-trained feature map of a to-be-trained picture, wherein the to-be-trained picture and the object picture belong to the same object category, and the to-be-trained feature map is used to characterize image feature information of the to-be-trained picture;
[0021] According to the feature map to be trained, the initial annotation channel information and the initial annotation space information, a preset training model is trained to obtain feature annotations corresponding to the annotation information.
[0022] Based on the training method, feature annotations are established in advance, so that when processing object images, the obtained feature annotations can be directly used to process the feature maps of the object images, thereby improving the accuracy of feature extraction.
[0023] In an optional implementation, training a preset training model according to the feature map to be trained, the initial annotation channel information, and the initial annotation space information to obtain feature annotations corresponding to the annotation information includes:
[0024] Repeat the following steps until the second preset condition is reached:
[0025] According to the initial annotated channel information and the initial annotated space information, the acquired feature map to be trained is processed to obtain a third feature map tensor, wherein the third feature map tensor has feature information of the annotated channel information, feature information of the annotated space information, and feature information of the acquired feature map to be trained;
[0026] Using the estimation model to perform estimation processing on the third feature map tensor to obtain an estimation value, wherein the estimation value represents estimation information after the third feature map tensor is subjected to the preset processing;
[0027] If the second preset condition is not met, the initial labeled channel information and the initial labeled space information are adjusted according to the estimated value to obtain adjusted labeled channel information and adjusted labeled space information; and the adjusted labeled channel information is determined as the initial labeled channel information, the adjusted labeled space information is determined as the initial labeled space information, and the third feature map tensor is determined as the feature map to be trained;
[0028] The annotation channel information corresponding to the annotation information is the annotation channel information obtained when the second preset condition is met; and the annotation space information corresponding to the annotation information is the annotation space information obtained when the second preset condition is met.
[0029] Through the above process, the feature annotation corresponding to the annotation information can be obtained more accurately.
[0030] In an optional implementation, the acquired feature map to be trained is processed according to the initial annotated channel information and the initial annotated space information to obtain a third feature map tensor, including:
[0031] According to the initial annotated channel information, the acquired feature map to be trained is processed to obtain a fourth feature map tensor, wherein the fourth feature map tensor has feature information of the annotated channel information and feature information of the acquired feature map to be trained;
[0032] The fourth feature map tensor is processed according to the initial labeled space information to obtain the third feature map tensor.
[0033] The annotated channel information and the annotated space information are sequentially added to the feature map to be trained, thereby obtaining a third feature map tensor that can reflect the item update information and content. The third feature map tensor can be used in subsequent training processes to train the annotated channel information and the annotated space information.
[0034] In an optional implementation, the acquired feature map to be trained is processed according to the initial annotated channel information to obtain a fourth feature map tensor, including:
[0035] Compressing the spatial dimension information in the feature map to be trained to obtain first feature information and second feature information of the feature map to be trained, wherein the first feature information represents the channel dimension information after noise suppression, and the second feature information represents the channel dimension information after smoothing;
[0036] The initial annotated channel information is concatenated with the first feature information to obtain third feature information, where the third feature information is the channel dimension information with the annotated channel information after noise suppression; and the initial annotated channel information is concatenated with the second feature information to obtain fourth feature information, where the fourth feature information is the channel dimension information with the annotated channel information after smoothing;
[0037] Removing the preset channel information from the third feature information, and removing the preset channel information from the fourth feature information, wherein the influence factor of the preset channel information is less than the preset factor;
[0038] Determine channel attention information according to the third feature information from which the preset channel information is removed and the fourth feature information from which the preset channel information is removed, wherein the channel attention information represents the channel dimension information having the annotated channel information after smoothing and suppressing noise;
[0039] The feature map to be trained is combined with the channel attention information to obtain the fourth feature map tensor.
[0040] Through the above method, the spatial dimension information in the feature map to be trained is compressed, which makes it easier to process the channel dimension information in the feature map to be trained, and then the splicing and other processing are completed in sequence, so that the labeled channel information is added to the feature map to be trained, and the fourth feature map tensor that can reflect the item update information and content is obtained.
[0041] In an optional implementation, before combining the feature map to be trained with the channel attention information to obtain the fourth feature map tensor, the method further includes:
[0042] The channel attention information is dimensionally processed to obtain processed channel attention information, wherein the dimension of the processed channel attention information and the dimension of the feature map to be trained are the same. Since the dimension of the channel attention information and the dimension of the feature map to be trained are different, it is necessary to unify the dimension of the channel attention information and the dimension of the feature map to be trained.
[0043] In an optional implementation, the fourth feature map tensor is processed according to the initial annotation space information to obtain the third feature map tensor, including:
[0044] Compressing the channel dimension information in the fourth feature map tensor to obtain fifth feature information and sixth feature information of the feature map to be trained, wherein the fifth feature information represents the spatial dimension information after noise suppression, and the sixth feature information represents the spatial dimension information after smoothing;
[0045] The initial annotated space information, the fifth feature information, and the sixth feature information are concatenated to obtain seventh feature information, wherein the seventh feature information is space dimension information with the annotated space information;
[0046] Removing the preset spatial information from the seventh feature information, wherein the influence factor of the preset spatial information is less than the preset factor, to obtain spatial attention information, wherein the spatial attention information represents the spatial dimension information with the annotated spatial information after smoothing and suppressing noise;
[0047] The fourth feature map tensor is combined with the spatial attention information to obtain the third feature map tensor.
[0048] Through the above method, the channel dimension information in the feature map to be trained is compressed, which makes it easier to process the spatial dimension information in the feature map to be trained, and then complete the splicing and other processing in sequence, so that the labeled spatial information is added to the feature map to be trained, and the third feature map tensor that can reflect the item update information and content is obtained.
[0049] In an optional implementation, before combining the fourth feature map tensor with the spatial attention information to obtain the third feature map tensor, the method further includes:
[0050] The spatial attention information is dimensionally processed to obtain processed spatial attention information, wherein the dimension of the processed spatial attention information and the dimension of the feature map to be trained are the same.
[0051] Since the dimension of the spatial attention information is different from the dimension of the feature map to be trained, it is necessary to unify the dimension of the spatial attention information with the dimension of the feature map to be trained.
[0052] In an optional implementation manner, adjusting the initial annotation channel information and the initial annotation space information according to the estimated value includes:
[0053] A loss value is determined according to the estimated value and the preset value, wherein the loss value represents the difference between the estimated value and the preset value; if the loss value is greater than or equal to a preset threshold, the initial annotation channel information and the initial annotation space information are adjusted.
[0054] When it is determined that the loss value is greater than or equal to the preset threshold, it is determined that accurate annotation channel information and annotation space information have not been obtained, and the annotation channel information and annotation space information need to be adjusted; through the above cycle process, the prepared annotation channel information and annotation space information can be obtained.
[0055] In an optional embodiment, the annotation information includes any one or more of the following: item category information, related link information, and item detailed information; wherein the item category information includes at least one category level of the item. The annotation information may reflect prior knowledge of the item and different item categories.
[0056] In an optional implementation, the processing result includes any one or more of the following: advertisement click-through rate, ranking of search results, personalized recommendation information, item clustering results, item matching results. Thus, after obtaining accurate image features, the image features can be processed in a variety of ways.
[0057] In a second aspect, the present application provides a method for extracting and processing features of an object image, comprising:
[0058] Acquire an item picture displayed on a display platform, and acquire annotation information of the item picture displayed on the display platform, wherein the display platform is a platform for displaying the item picture;
[0059] Determining a picture feature of the item picture according to the annotation information and the item picture, wherein the picture feature includes image feature information of the item picture and the annotation feature;
[0060] The item image is processed in a preset manner according to the image features to obtain a processing result, and the processing result is displayed on the display platform.
[0061] This embodiment has the following advantages or beneficial effects: the item picture and annotation information displayed on the display platform are obtained, the item picture can represent the image feature information, and the annotation information can represent the prior knowledge of the item in the item picture; the item picture and the annotation information are combined to obtain the image features of the item picture, and the obtained image features can express the image features and annotation features of the item, and the extracted image features can accurately and diversely represent the features of the item, that is, accurate item features are obtained; then, the item picture is processed based on the image features to obtain a relatively accurate processing result. And the processing result is displayed on the display platform, so that the user can view the processing result.
[0062] In a third aspect, an embodiment of the present application provides a device for extracting and processing features of an object image, including:
[0063] A first acquisition unit is used to acquire the annotation information of the object image to be processed, wherein the annotation information represents the annotation features of the object;
[0064] a determining unit, configured to determine a picture feature of the item picture according to the annotation information and the item picture, wherein the picture feature includes image feature information of the item picture and the annotation feature;
[0065] The first processing unit is used to perform preset processing on the object image according to the image features to obtain a processing result.
[0066] This embodiment has the following advantages or beneficial effects: the object picture can represent the image feature information, and the annotation information can represent the prior knowledge of the object in the object picture; the object picture and the annotation information are combined to obtain the image features of the object picture, and the obtained image features can express the image features and annotation features of the object. The extracted image features can accurately and diversely represent the features of the object, that is, accurate object features are obtained; then, the object picture is processed based on the image features to obtain a relatively accurate processing result.
[0067] In an optional implementation manner, the determining unit includes:
[0068] An extraction module, used to extract features from the item picture to obtain a feature map of the item, wherein the feature map is used to represent image feature information of the item picture;
[0069] An adjustment module is used to adjust the feature map according to the annotation information to obtain image features.
[0070] Since feature annotation represents the prior knowledge of the object image, in order not to lose this important feature, feature annotation can be used to adjust the image feature information, increase the accuracy of the image features, and make the image features contain more content and information.
[0071] In an optional implementation manner, the adjustment module includes:
[0072] A determination submodule, configured to determine a feature annotation corresponding to the annotation information according to preset annotation information and a feature annotation library, wherein the feature annotation library includes feature annotations corresponding to different annotation information, and the feature annotation includes annotation channel information and annotation space information, wherein the annotation channel information is used to characterize the features of each channel of the item category corresponding to the annotation information, and the annotation space information is used to characterize the features of each space of the item category corresponding to the annotation information;
[0073] The adjustment submodule is used to adjust the feature map according to the feature annotation corresponding to the annotation information to obtain the image feature.
[0074] The annotated channel information represents the characteristics of each channel of the object category, and the annotated space information represents the characteristics of each space of the object category. A feature annotation library can be set up. When it is necessary to determine the feature annotation corresponding to the annotation information, it can be queried from the feature annotation library without regenerating the feature annotation, which can speed up the image feature extraction and image processing.
[0075] In an optional implementation manner, the adjustment submodule is specifically used to:
[0076] Repeat the following process until the first preset condition is met: according to the acquired annotated channel information, the acquired feature map is processed to obtain a first feature map tensor, wherein the first feature map tensor has feature information annotated with the channel information and feature information of the acquired feature map; according to the acquired annotated space information, the first feature map tensor is processed to obtain a second feature map tensor, wherein the second feature map tensor has feature information annotated with the channel information, feature information annotated with the space information, and feature information of the acquired feature map; determine that the second feature map tensor is the acquired feature map;
[0077] Among them, the second feature map tensor obtained when the first preset condition is met is the image feature.
[0078] The labeled channel information and the labeled space information are sequentially added to the feature map, so that the feature map has the labeled channel information and the labeled space information.
[0079] In an optional implementation manner, the first acquisition unit is specifically configured to:
[0080] The annotation information displayed on the display platform is obtained, wherein the display platform is a platform for displaying the item image. Since the item image and the annotation information of the item image can be displayed on the display platform, when analyzing the item image, the item image and the annotation information of the item image can be obtained at the same time. The annotation information is a priori knowledge of the item, and the annotation information can be used to improve the accuracy of image feature extraction.
[0081] In an optional implementation manner, the annotation information has feature annotation, and the feature annotation includes annotation channel information and annotation space information, wherein the annotation channel information is used to characterize the features of each channel of the item category corresponding to the annotation information, and the annotation space information is used to characterize the features of each space of the item category corresponding to the annotation information;
[0082] The device further comprises:
[0083] A second acquisition unit is used to acquire a to-be-trained feature map of a to-be-trained picture, wherein the to-be-trained picture and the object picture belong to the same object category, and the to-be-trained feature map is used to represent image feature information of the to-be-trained picture;
[0084] The second processing unit is used to train a preset training model according to the feature map to be trained, the initial annotation channel information and the initial annotation space information to obtain feature annotations corresponding to the annotation information.
[0085] Based on the training method, feature annotations are established in advance, so that when processing object images, the obtained feature annotations can be directly used to process the feature maps of the object images, thereby improving the accuracy of feature extraction.
[0086] In an optional implementation manner, the second processing unit includes:
[0087] The execution module is used to repeatedly execute the following steps until a second preset condition is met:
[0088] A first processing module is used to process the acquired feature map to be trained according to the initial annotated channel information and the initial annotated space information to obtain a third feature map tensor, wherein the third feature map tensor has feature information of the annotated channel information, feature information of the annotated space information, and feature information of the acquired feature map to be trained;
[0089] A second processing module is used to perform estimation processing on the third feature map tensor using an estimation model to obtain an estimation value, wherein the estimation value represents estimation information after the third feature map tensor is subjected to the preset processing;
[0090] A third processing module is used for adjusting the initial annotation channel information and the initial annotation space information according to the estimated value to obtain adjusted annotation channel information and adjusted annotation space information if the second preset condition is not met; and determining the adjusted annotation channel information as the initial annotation channel information, determining the adjusted annotation space information as the initial annotation space information, and determining the third feature map tensor as the feature map to be trained;
[0091] The annotation channel information corresponding to the annotation information is the annotation channel information obtained when the second preset condition is met; and the annotation space information corresponding to the annotation information is the annotation space information obtained when the second preset condition is met.
[0092] Through the above process, the feature annotation corresponding to the annotation information can be obtained more accurately.
[0093] In an optional implementation, the first processing module includes:
[0094] A first processing submodule is used to process the acquired feature map to be trained according to the initial annotated channel information to obtain a fourth feature map tensor, wherein the fourth feature map tensor has feature information of the annotated channel information and feature information of the acquired feature map to be trained;
[0095] The second processing submodule is used to process the fourth feature map tensor according to the initial annotation space information to obtain the third feature map tensor.
[0096] The annotated channel information and the annotated space information are sequentially added to the feature map to be trained, thereby obtaining a third feature map tensor that can reflect the item update information and content. The third feature map tensor can be used in subsequent training processes to train the annotated channel information and the annotated space information.
[0097] In an optional implementation manner, the first processing submodule is specifically configured to:
[0098] Compressing the spatial dimension information in the feature map to be trained to obtain first feature information and second feature information of the feature map to be trained, wherein the first feature information represents the channel dimension information after noise suppression, and the second feature information represents the channel dimension information after smoothing;
[0099] The initial annotated channel information is concatenated with the first feature information to obtain third feature information, where the third feature information is the channel dimension information with the annotated channel information after noise suppression; and the initial annotated channel information is concatenated with the second feature information to obtain fourth feature information, where the fourth feature information is the channel dimension information with the annotated channel information after smoothing;
[0100] Removing the preset channel information from the third feature information, and removing the preset channel information from the fourth feature information, wherein the influence factor of the preset channel information is less than the preset factor;
[0101] Determine channel attention information according to the third feature information from which the preset channel information is removed and the fourth feature information from which the preset channel information is removed, wherein the channel attention information represents the channel dimension information having the annotated channel information after smoothing and suppressing noise;
[0102] The feature map to be trained is combined with the channel attention information to obtain the fourth feature map tensor.
[0103] Through the above method, the spatial dimension information in the feature map to be trained is compressed, which makes it easier to process the channel dimension information in the feature map to be trained, and then the splicing and other processing are completed in sequence, so that the labeled channel information is added to the feature map to be trained, and the fourth feature map tensor that can reflect the item update information and content is obtained.
[0104] In an optional embodiment, the first processing submodule is further used to perform dimension processing on the channel attention information before combining the feature map to be trained with the channel attention information to obtain the fourth feature map tensor, so as to obtain the processed channel attention information, wherein the dimension of the processed channel attention information and the dimension of the feature map to be trained are the same. Since the dimension of the channel attention information is different from the dimension of the feature map to be trained, it is necessary to unify the dimension of the channel attention information with the dimension of the feature map to be trained.
[0105] In an optional implementation manner, the second processing submodule is specifically configured to:
[0106] Compressing the channel dimension information in the fourth feature map tensor to obtain fifth feature information and sixth feature information of the feature map to be trained, wherein the fifth feature information represents the spatial dimension information after noise suppression, and the sixth feature information represents the spatial dimension information after smoothing;
[0107] The initial annotated space information, the fifth feature information, and the sixth feature information are concatenated to obtain seventh feature information, wherein the seventh feature information is space dimension information with the annotated space information;
[0108] Removing the preset spatial information from the seventh feature information, wherein the influence factor of the preset spatial information is less than the preset factor, to obtain spatial attention information, wherein the spatial attention information represents the spatial dimension information with the annotated spatial information after smoothing and suppressing noise;
[0109] The fourth feature map tensor is combined with the spatial attention information to obtain the third feature map tensor.
[0110] Through the above method, the channel dimension information in the feature map to be trained is compressed, which makes it easier to process the spatial dimension information in the feature map to be trained, and then complete the splicing and other processing in sequence, so that the labeled spatial information is added to the feature map to be trained, and the third feature map tensor that can reflect the item update information and content is obtained.
[0111] In an optional embodiment, the second processing sub-module is further used to perform dimension processing on the spatial attention information before combining the fourth feature map tensor with the spatial attention information to obtain the third feature map tensor, so as to obtain processed spatial attention information, wherein the dimension of the processed spatial attention information and the dimension of the feature map to be trained are the same.
[0112] Since the dimension of the spatial attention information is different from the dimension of the feature map to be trained, it is necessary to unify the dimension of the spatial attention information with the dimension of the feature map to be trained.
[0113] In an optional implementation manner, the third processing module is specifically used to:
[0114] Determine a loss value according to the estimated value and the preset value, wherein the loss value represents the difference between the estimated value and the preset value;
[0115] If the loss value is greater than or equal to a preset threshold, the initial annotation channel information and the initial annotation space information are adjusted.
[0116] When it is determined that the loss value is greater than or equal to the preset threshold, it is determined that accurate annotation channel information and annotation space information have not been obtained, and the annotation channel information and annotation space information need to be adjusted; through the above cycle process, the prepared annotation channel information and annotation space information can be obtained.
[0117] In an optional implementation, the annotation information includes any one or more of the following: item category information, related link information, and item detailed information; wherein the item category information includes at least one category level of the item. The annotation information may reflect prior knowledge of the item and different item categories.
[0118] In an optional implementation, the processing result includes any one or more of the following: advertisement click-through rate, ranking of search results, personalized recommendation information, item clustering results, item matching results. Thus, after obtaining accurate image features, the image features can be processed in a variety of ways.
[0119] In a fourth aspect, an embodiment of the present application provides a computer device, including: a memory, a processor;
[0120] Memory; Memory for storing instructions executable by the processor;
[0121] The processor is configured to: obtain annotation information of the object picture to be processed, wherein the annotation information represents the annotation features of the object; determine the image features of the object picture based on the annotation information and the object picture, wherein the image features include the image feature information of the object picture and the annotation features; perform preset processing on the object picture according to the image features to obtain a processing result.
[0122] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the feature extraction and processing method of the object image provided in the first aspect and any embodiment of the first aspect, or to implement the feature extraction and processing method of the object image provided in the second aspect.
[0123] The feature extraction and processing method, device, equipment and storage medium of the object image provided by the embodiments of the present application can characterize the image feature information of the object image, and the annotation information can characterize the prior knowledge of the object in the object image; the object image and the annotation information are combined with each other to obtain the image features of the object image, and the obtained image features can express the image features and annotation features of the object. The extracted image features can accurately and diversely characterize the features of the object, that is, accurate object features are obtained; then, the object image is processed based on the image features to obtain a relatively accurate processing result. BRIEF DESCRIPTION OF THE DRAWINGS
[0124] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0125] Figure 1 A flowchart of a method for extracting and processing features of an object image provided in an embodiment of the present application;
[0126] Figure 2 Scenario diagram provided for the embodiment of the present application Figure 1 ;
[0127] Figure 3 Scenario diagram provided for the embodiment of the present application Figure 2 ;
[0128] Figure 4 Scenario diagram provided for the embodiment of the present application Figure 3 ;
[0129] Figure 5 A flowchart of another method for extracting and processing features of an object image provided in an embodiment of the present application;
[0130] Figure 6 The application scenario provided by the embodiment of the present application is shown in FIG. Figure 4 ;
[0131] Figure 7 A flowchart of another method for extracting and processing features of an object image provided in an embodiment of the present application;
[0132] Figure 8 A flowchart of step 302 in another method for extracting and processing features of an object image provided in an embodiment of the present application;
[0133] Fig. 9 A schematic diagram of a process for annotating channel information provided in an embodiment of the present application;
[0134] Fig.10 A schematic diagram of a process for marking spatial information provided in an embodiment of the present application;
[0135] Fig.11 An example diagram of the processing of annotating channel information and annotating space information provided in an embodiment of the present application;
[0136] Fig.12 A flowchart of another method for extracting and processing features of an object image provided in an embodiment of the present application;
[0137] Fig.13 A schematic diagram of the structure of a device for extracting and processing features of an object image provided in an embodiment of the present application;
[0138] Fig.14 A schematic diagram of the structure of another device for extracting and processing features of an object image provided in an embodiment of the present application;
[0139] Fig.15 A schematic diagram of the structure of another device for extracting and processing features of an object image provided in an embodiment of the present application;
[0140] Fig.16 The invention is a block diagram of a computer device according to an exemplary embodiment.
[0141] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0142] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0143] With the development of Internet technology, more and more items are displayed to users in the form of pictures, so that users can view the specific conditions of the items, or purchase the items, etc. For example, on the Internet, the pictures of the items can be provided to the terminal device for display.
[0144] Item images have visual features, that is, detailed and intuitive item information. Therefore, rich visual features can be extracted from item images, that is, image features of item images can be obtained; then, item images can be processed based on image features, for example, to meet the needs of mining item characteristics and user characteristics. For example, based on the visual features of item images, the item click-through rate (CTR) can be predicted, the item search results can be sorted, items can be automatically clustered, etc.; or, based on the visual features of item images, user preferences can be mined, personalized item recommendations can be made, etc.
[0145] For example, on the Internet, the goods displayed on the Internet have product pictures. In this case, the item pictures are product pictures; product pictures can express the visual characteristics of the product, such as color, texture, size ratio, etc. The image features of the product pictures can be extracted. Based on the image features, the advertisement click-through rate of the product is predicted to obtain the advertisement click-through rate of the product; or, based on the image features of multiple products, multiple products are clustered to obtain different types of products; or, based on the image features of multiple products, multiple products are sorted to obtain sorted products, and the highest-level products are recommended to users. It can be seen that mining product characteristics and user preferences based on product pictures is a basic component of machine learning tasks and e-commerce technology products.
[0146] It can be seen that the specific application scenario of the embodiment of the present application can be to analyze the pictures of items. For example, when displaying pictures of goods on an e-commerce platform, the image features of the goods pictures can be extracted; the advertisement click-through rate of the goods can be predicted based on the image features to obtain the advertisement click-through rate of the goods; or, based on the image features, multiple goods can be clustered to obtain different types of goods; or, based on the image features, the matching between goods and users can be calculated to obtain the matching degree between goods and users.
[0147] In the process of implementing this application, it is found that the features extracted from the object pictures can only be the image features of the pictures, and the image features cannot accurately and completely express more features of the object pictures; and the results obtained by processing the object pictures based on the image features are not accurate enough. For example, the obtained advertisement click-through rate is inaccurate, and the obtained clustering results are inaccurate.
[0148] The method, device, equipment and storage medium for feature extraction and processing of object images provided in the embodiments of the present application are intended to solve the above technical problems of the prior art.
[0149] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0150] Figure 1 A flowchart of a method for extracting and processing features of an object image provided in an embodiment of the present application, such as Figure 1 As shown, the method includes:
[0151] 101. Obtain labeling information of a to-be-processed object image, wherein the labeling information represents labeling features of the object.
[0152] In one example, the annotation information includes any one or more of the following: item category information, related link information, and item detailed information; wherein the item category information includes at least one category level of the item.
[0153] Exemplarily, the executor of this embodiment is a terminal device, or a network device, or a feature extraction and processing device or equipment for object images, or other devices or equipment that can execute the method of this embodiment, and there is no limitation on this.
[0154] When it is necessary to analyze and process the item image, the item image to be processed can be obtained. For example, the item image to be processed can be downloaded from the server; or, the item image to be processed can be obtained locally; or, a request to obtain the item image can be sent to other terminal devices to receive the item image to be processed returned by other terminals. The item image has visual features, that is, detailed and intuitive item information. For example, the visual features include but are not limited to one or more of the following: color, texture, size ratio, etc.
[0155] You can also obtain the annotation information of the item image. The annotation information is independent of the item image and can express the annotation features of the item. The annotation information includes but is limited to any one or more of the following: item detailed information, item category information, related link information, etc. Therefore, the annotation features of the item can be detailed information, category information, and related link information.
[0156] Item detailed information means that when displaying an item picture, the item picture can be introduced, such as the basic information of the item in the item picture; thus, the introductory information constitutes the item detailed information, which can be textual introduction information. For example, the display platform displays a picture of a piece of clothing, and the picture has item detailed information, which introduces the type of clothing, the size of the clothing, the color of the clothing, etc.
[0157] Item category information means that when displaying item images, the items in the item images have been classified and the category information has been marked for the items; thus, these category information constitute the item category information. For example, the display platform displays a picture of a piece of clothing. When displaying the picture of the clothing, the display platform marks the category of the clothing, for example, the categories are "clothing> women's clothing> dresses" at three levels; the display platform can automatically mark the category of the clothing, or the relevant personnel can manually add the category mark for the clothing.
[0158] Related link information refers to the additional information that can be added to the item image when displaying the item image, such as providing links to items of the same category and links to items of similar categories; these additional information constitute the related link information. For example, the display platform displays a picture of a piece of clothing. In order to facilitate users to choose clothing, the display platform can also display links to clothes of the same category and links to clothes of similar categories.
[0159] The display platforms of the main product images include, but are not limited to, e-commerce websites, applications (APPs) in mobile terminals, smart devices with display and shopping functions, etc., where smart devices are, for example, smart TVs, smart refrigerators, etc. Moreover, the display locations of the main product images include, but are not limited to, search result lists, recommended result lists, and advertising spaces, etc., where advertising spaces include, for example, native advertisements inserted in search and recommended result lists, other advertising spaces, etc.
[0160] According to the above introduction, when obtaining an object picture, the annotation information of the object in the object picture can also be obtained.
[0161] If feature extraction is performed directly on the object image, the annotation features of the object will be ignored, that is, the annotation information will be ignored. However, the annotation information coexists with the object image, and the annotation information includes a variety of prior knowledge related to the object in the object image, so the annotation information can express certain characteristics of the object in the object image; if the annotation information is lost, the accuracy of feature extraction of the object image will be reduced, and further the accuracy of image processing will be reduced.
[0162] In one example, an object image is displayed on a web page; in addition to displaying the object image on the web page, the annotation information of the object image can also be displayed; or, the object image is displayed in an application, and in addition to displaying the object image in the application, the annotation information of the object image can also be displayed.
[0163] For example, Figure 2 Scenario diagram provided for the embodiment of the present application Figure 1 ,like Figure 2 As shown, the item is a shoe; the item picture is displayed on the webpage, that is, the shoe picture is displayed; the item detailed information of the shoe can also be displayed on the webpage, and the item detailed information is the textual introduction information of the item picture, for example, the item detailed information includes but is not limited to style, size, thickness, and trademark. In one example, the item detailed information of the high-heeled shoe picture is style and trademark; the item detailed information of the sports shoe picture is size, thickness, and trademark.
[0164] For another example, the item is a skirt; the item picture is displayed in the application, that is, the picture of the skirt is displayed; the item category information of the skirt can also be displayed in the application, and the item category information is the item category information of the item picture, for example, the item category information includes but is not limited to clothing and women's clothing. Because the item picture needs to be classified into categories when it is displayed in the application, Figure 3 Scenario diagram provided for the embodiment of the present application Figure 2 ,like Figure 3As shown, the category level options under the application have item category information for the item; or, Figure 4 Scenario diagram provided for the embodiment of this application Figure 3 ,like Figure 4 As shown, the item category information can be displayed in text form.
[0165] The item category information may include at least one category level of the item. For example, for a skirt, its category levels are apparel and women's clothing from high to low; for biscuits, its category levels are food, snacks, and packaged food from high to low.
[0166] For another example, the item is a shoe; the item picture is displayed in the application, that is, the shoe picture is displayed; the item category information of the shoe can also be displayed in the application. In one example, the item detailed information of the high-heeled shoe picture is style and brand, and the user is more concerned about the style of the high-heeled shoe; the item detailed information of the sports shoe picture is size, thickness, and brand, and the user is more concerned about the size and thickness of the sports shoe. Since users pay attention to different features of different categories of items, it is very important to consider the category of the item in the feature extraction process of the item picture.
[0167] 102. Determine image features of the object image based on the annotation information and the object image, wherein the image features include image feature information and annotation features of the object image.
[0168] Exemplarily, the object picture can represent image feature information, such as the color, texture, type, and proportion of the object; and the annotation information can represent the prior knowledge of the object in the object picture, such as text introduction, category information, and related link information. According to the previous analysis, it can be seen that the accuracy of feature extraction based only on the object picture is low. In this step, the annotation information and the object picture can be combined to determine the image features of the object picture. The obtained image features can simultaneously represent the image feature information and annotation features of the object picture.
[0169] In one example, when an existing image feature extraction model is used to extract features from an object image, the feature extraction from the object image can be performed based on the annotation features as a priori conditions.
[0170] In another example, after using an existing image feature extraction model to extract features of an object image, the image features of the object image are obtained; then, based on the annotation features, the obtained image features are adjusted, for example, unnecessary image features are deleted, part of the annotation features are used as image features, and so on, to obtain the above-mentioned image features.
[0171] 103. Perform preset processing on the item image according to the image features to obtain the processing result.
[0172] In one example, the processing result includes any one or more of the following: advertisement click-through rate, ranking of search results, personalized recommendation information, item clustering results, and item matching results.
[0173] Exemplarily, after step 102, the obtained image features can express the image feature information of the object in the object picture and the annotation features of the object, and the obtained image features are relatively accurate; based on the image features obtained in step 102, the object picture can be subjected to a preset analysis or processing to generate a processing result.
[0174] In one example, the click-through rate of an advertisement reflects the degree of match between the user and the advertisement; an accurate estimate of the click-through rate of an advertisement can push advertisements suitable for the user to the user. The click-through rate of advertisements for item images can be calculated based on the image features to obtain the click-through rate of advertisements for the item images. For example, the click-through rate of advertisements is related to the item information (a), user information (u) and environmental information (c), that is, the click-through rate of advertisements CTR = f(a, u, c); wherein the item information includes the above-mentioned image features and other features, such as the number of good reviews for the item, the price of the item, etc.; the user information includes the user's browsing history, the user's click history, etc.; the environmental information includes the user's location information, the current time, etc.
[0175] In one example, after searching for an object image based on a keyword, retrieval results are obtained; then, the retrieval results of the object images can be sorted based on image features.
[0176] In one example, matching can be performed based on image features and pre-acquired user features to generate personalized recommendation information; and then the personalized recommendation information is pushed to the user.
[0177] In one example, the items can be clustered based on the image features of the images of the items, wherein the clustering algorithm can adopt an existing clustering algorithm; and then, the item clustering results are obtained, for example, the item clustering results of lipsticks are obtained, and the item clustering results of skirts are obtained.
[0178] In one example, different items can be matched based on the image features of each item image to obtain item matching results. For example, based on the image features of clothing item images, the item matching result obtained is "matching a shirt with a skirt", or the item matching result obtained is "matching a shirt with a necklace".
[0179] In this embodiment, the object picture can represent the image feature information, and the annotation information can represent the prior knowledge of the object in the object picture; the object picture and the annotation information are combined to obtain the image features of the object picture, and the obtained image features can express the image features and annotation features of the object. The extracted image features can accurately and diversely represent the features of the object, that is, accurate object features are obtained; then, the object picture is processed based on the image features to obtain a more accurate processing result.
[0180] Figure 5 A flowchart of another method for extracting and processing features of an object image provided in an embodiment of the present application, such as Figure 5 As shown, the method includes:
[0181] 201. Obtaining annotation information of a to-be-processed object image, wherein the annotation information represents annotation features of the object.
[0182] In one example, step 201 specifically includes: obtaining annotation information displayed on a display platform, wherein the display platform is a platform for displaying pictures of items.
[0183] Exemplarily, the executor of this embodiment is a terminal device, or a network device, or a feature extraction and processing device or equipment for object images, or other devices or equipment that can execute the method of this embodiment, and there is no limitation on this.
[0184] This step can be seen in Figure 1 The step 101 shown is not repeated any more.
[0185] And, in Figure 1 In step 101, the display platform is also introduced by way of example. The display platform can be a platform in the form of software, such as an e-commerce website, an application in a mobile terminal, etc.; the display platform can also be a platform in the form of hardware, such as a mobile terminal, a smart device with display and shopping functions, etc.
[0186] 202. Perform feature extraction on the object image to obtain a feature map of the object, wherein the feature map is used to represent image feature information of the object image.
[0187] For example, after obtaining the object image, the image features of the object image can be extracted to obtain the feature map of the object. In one example, since the image category and image information are unknown and need to be predicted, the feature map can be extracted based on the Convolutional Neural Networks (CNN) for image classification.
[0188] In one example, when an item picture is displayed on a display platform, the item picture is the main item picture; the main item picture is the picture with the largest display area on the display platform. Figure 6 The application scenario provided by the embodiment of the present application is shown in FIG. Figure 4 ,like Figure 6 As shown, the image of each item is displayed on the application. In order to facilitate users to view each item, for each item, the application will display the main image of each item; the main image of the item contains more image information and the image is larger, and thus image feature information can be provided for the main image of the item.
[0189] 203. Adjust the feature map according to the annotation information to obtain picture features, wherein the picture features include image feature information and annotation features of the object picture.
[0190] In one example, step 203 includes:
[0191] The first step is to determine the feature annotation corresponding to the annotation information according to the preset annotation information and the feature annotation library, wherein the feature annotation library includes feature annotations corresponding to different annotation information, and the feature annotation includes annotation channel information and annotation space information, wherein the annotation channel information is used to characterize the characteristics of each channel of the item category corresponding to the annotation information, and the annotation space information is used to characterize the characteristics of each space of the item category corresponding to the annotation information.
[0192] The second step is to adjust the feature map according to the feature annotation corresponding to the annotation information to obtain the image features.
[0193] In one example, the second step specifically includes: repeatedly executing the following process until the first preset condition is met: processing the acquired feature map according to the acquired labeled channel information to obtain a first feature map tensor, wherein the first feature map tensor has feature information of the labeled channel information and feature information of the acquired feature map; processing the first feature map tensor according to the acquired labeled space information to obtain a second feature map tensor, wherein the second feature map tensor has feature information of the labeled channel information, feature information of the labeled space information, and feature information of the acquired feature map; determining that the second feature map tensor is the acquired feature map; wherein the second feature map tensor obtained when the first preset condition is met is the image feature.
[0194] For example, according to Figure 1 As can be seen from the illustrated embodiments, since the item images may have annotation information, for example, in the field of e-commerce, the item images are all configured or have annotation information added to them. The annotation information contains a large amount of prior knowledge closely related to the image features of the item images.
[0195] If image features are extracted based only on item images, the annotation features of item images will be ignored. For example, in the field of e-commerce, item images are configured or have annotation information added; if only item images, such as the main image of an item, are analyzed, the annotation features of the item images will be ignored, for example, the item category annotation, link annotation, text description, etc. attached to the item image will be ignored; thus, the image features of the item images cannot be accurately extracted, which limits the accuracy of feature extraction of item images.
[0196] For example, if we analyze the click-through rate of an advertisement of an item, we only analyze the item image and extract features based on the item image. This will ignore the item's labeling information, and the obtained features will be inaccurate, which will further lead to a lower accuracy rate in the predicted advertisement click-through rate.
[0197] Based on the above analysis, the obtained feature map can be adjusted according to the annotation features to obtain the picture features, so that the obtained picture features contain the image feature information and annotation features of the object picture.
[0198] In one example, a feature annotation library may be stored, and the feature annotation library includes feature annotations corresponding to different annotation information; the feature annotations include annotation channel information and annotation space information.
[0199] The annotated channel information represents the characteristics of each channel of the item category.
[0200] The first way to annotate channel information: the channel is the channel of the image, and the channel feature is the color channel feature of the image. The image channel is divided into single channel, three channels, four channels, etc. Single channel, which is commonly known as grayscale image, each pixel has only one value; three channels: that is, the color image seen, each pixel has three values, such as RGB value; four channels, that is, adding transparency to the three-channel image. It can be seen that each item category has different characteristics in each channel.
[0201] For example, for shoes, high heels have different features in each color channel, sports shoes have different features in each color channel, and skateboard shoes have different features in each color channel.
[0202] The second way to annotate channel information: Different channels represent different types of image features. Feature types include contour, color, size ratio, etc. For example, some channels represent contours, some channels represent colors, and some channels represent size ratios.
[0203] The labeled spatial information represents the characteristics of each space of the item category.
[0204] The first way to mark spatial information: Space refers to the various parts of an object; the characteristics of different spaces are descriptions of the characteristics of the object in different parts. In one example, the object can be divided into the upper part, lower part, left part, and right part, thereby dividing the object into four spaces; the upper features, lower features, left features, and right features can be described for the object. In another example, the object is divided into a nine-square grid, and the nine spaces are used to describe the characteristics of the object.
[0205] The second way to annotate spatial information: Space refers to the various parts of the object image; the characteristics of different spaces are descriptions of the characteristics of the object image in different parts. In one example, in another example, the object image is divided into the upper part, lower part, left part, and right part, thereby dividing the object image into four spaces; the upper features, lower features, left features, and right features can be described for the object image. In another example, the object image is divided into a nine-square grid, and the nine spaces are used to describe the characteristics of the object.
[0206] For example, for a skirt, the upper features, lower features, left features, and right features of a dress are different, and the upper features, lower features, left features, and right features of a skirt are also different; moreover, the upper features of a dress are different from the upper features of a skirt, the lower features of a dress are different from the lower features of a skirt, the left features of a dress are different from the left features of a skirt, and the right features of a dress are different from the right features of a skirt.
[0207] Since the feature annotation library includes feature annotations corresponding to different annotation information, the feature annotations corresponding to the current annotation information can be queried based on the feature annotation library; there is no need to regenerate the feature annotations, which can speed up the image feature extraction and image processing.
[0208] Then, since feature annotation represents the prior knowledge of the object image, in order not to lose this important feature, feature annotation can be used to adjust the image feature information, that is, feature annotation is used to adjust the feature map; then, the image feature with image feature information and annotation features can be obtained.
[0209] In one example, when feature annotation is used to adjust a feature map, the following process can be used: the annotated channel information in the feature annotation expresses the channel feature, and the annotated channel information is first used to adjust the feature map so that the feature map has feature information with the annotated channel information, thereby obtaining a first feature map tensor; the annotated spatial information in the feature annotation expresses the spatial feature, and the annotated spatial information is used to adjust the feature map so that feature information with the annotated spatial information is added to the feature map, thereby obtaining a second feature map tensor; it is determined whether a first preset condition is currently met; wherein the first preset condition is, for example, that the maximum number of cycles is reached, or that the second feature map tensor currently obtained is the same or similar to the second feature map tensor obtained last time; if it is determined that the first preset condition is met, it is determined that the second feature map tensor currently obtained is a picture feature carrying image feature information and annotated features.
[0210] If it is determined that the first preset condition is not met, the second feature map tensor currently obtained is processed as a new feature map; optionally, if it is determined that the first preset condition is not met, the obtained annotated channel information and annotated space information can be adjusted, for example, the information in the annotated channel information and the annotated space information is randomly adjusted locally. Then, according to the annotated channel information, the annotated channel information is added to the new feature map to obtain a new first feature map tensor; according to the annotated space information, the annotated space information is added to the new first feature map tensor to obtain a new second feature map tensor; if it is determined that the first preset condition is not met, the second feature map tensor currently obtained is processed as a new feature map, and so on, and the above process is repeated; if it is determined that the first preset condition is met, it is determined that the second feature map tensor currently obtained is a picture feature carrying image feature information and annotated features, and the picture feature can be represented by a vector φ(I).
[0211] 204. Perform preset processing on the item image according to the image features to obtain a processing result.
[0212] For example, this step can be referred to Figure 1 Step 103 shown is not repeated any more.
[0213] In this embodiment, on the basis of the above embodiment, the annotation information can represent the prior knowledge of the object in the object picture, and the annotation information includes annotation channel information and annotation space information. The annotation channel information and annotation space information can be used to adjust the image feature information to obtain the image feature; the obtained image feature can express the image feature and annotation feature of the object, and the extracted image feature can accurately and diversely represent the features of the object, that is, obtain accurate object features. Furthermore, based on the image features that can express the annotation channel information, annotation space information and image feature information, the object picture is processed, for example, the prediction of the click-through rate of advertisements, object clustering, etc., and the object picture can be accurately processed.
[0214] Figure 7 A flowchart of another method for extracting and processing features of an object image provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the method includes:
[0215] 301. Obtain a to-be-trained feature map of the to-be-trained picture, wherein the to-be-trained picture and the object picture belong to the same object category, and the to-be-trained feature map is used to represent image feature information of the to-be-trained picture.
[0216] Exemplarily, the executor of this embodiment is a terminal device, or a network device, or a feature extraction and processing device or equipment for object images, or other devices or equipment that can execute the method of this embodiment, and there is no limitation on this.
[0217] Before extracting and processing features of the object images to be processed, it is necessary to first establish feature annotations corresponding to different object categories, that is, to obtain feature annotations corresponding to different annotation information; thereby establishing a feature annotation library.
[0218] according to Figure 5 From the illustrated embodiment, it can be known that the feature annotation includes annotated channel information and annotated space information. The annotated channel information represents the features of each channel of the item category, and the annotated space information represents the features of each space of the item category.
[0219] Before obtaining the feature annotation library, it is necessary to use the training images for training, and then obtain the feature annotations in the feature annotation library. Then, according to the training method, the feature annotations are established in advance, so that when processing the object images, the obtained feature annotations can be directly used to process the feature map of the object images, thereby improving the accuracy of feature extraction.
[0220] First, multiple training images are obtained from the server or locally. In order to obtain feature annotations corresponding to different item categories, training images belonging to the same item category can be obtained. For example, each training image of item category A is obtained, each training image of item category B is obtained, and each training image of item category C is obtained.
[0221] Furthermore, in order to obtain the annotation features of the object image to be processed in step 303 , it is necessary to obtain each to-be-trained image of the object category to which the object image to be processed in step 303 belongs.
[0222] The image to be trained is input into a preset model, for example, into a CNN model, and image feature information of the image to be trained is output, that is, a feature map to be trained of the image to be trained is obtained, and the feature map to be trained includes the image feature information of the image to be trained.
[0223] Furthermore, in order to obtain the annotation features of different item categories, the to-be-trained images of the same item category may be input into the preset model in batches to obtain the to-be-trained feature maps of each to-be-trained image in each item category.
[0224] In order to obtain the annotation features of the object image to be processed in step 303, it is necessary to input each to-be-trained image that belongs to the same object category as the to-be-processed object image into a preset model to obtain a to-be-trained feature map of the to-be-trained image.
[0225] In the subsequent step 302 , for ease of explanation, the feature graphs to be trained of the images to be trained that belong to the same item category as the image to be processed in step 303 are taken as examples for introduction.
[0226] 302. Train a preset training model according to the feature map to be trained, the initial annotation channel information, and the initial annotation space information to obtain feature annotations corresponding to the annotation information.
[0227] Exemplarily, initial annotation channel information and initial annotation space information are pre-set randomly; each feature map to be trained is input into a preset training model respectively, and the initial annotation channel information and the initial annotation space information are also input into the preset training model, and then the preset training model is trained, and the initial annotation channel information and the initial annotation space information are trained at the same time; the feature annotation corresponding to the annotation information is obtained, that is, the feature annotation corresponding to the item category is obtained.
[0228] Among them, the preset training model can be a neural network model, for example, a CNN network model.
[0229] In one example, Figure 8A flowchart of step 302 in another method for extracting and processing features of an object image provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, step 302 specifically includes the following steps 3021-3025.
[0230] 3021. Repeat the following steps until the second preset condition is reached.
[0231] Exemplarily, a second preset condition is preset, and the second preset condition may be a maximum number of cycles; or the second preset condition may be that the annotated channel information obtained in step 3024 is the same or similar to the annotated channel information obtained last time, and the annotated space information obtained in step 3024 is the same or similar to the annotated space information obtained last time. Steps 3021 to 3025 are repeatedly executed until the second preset condition is met.
[0232] 3022. Process the acquired feature map to be trained according to the initial annotated channel information and the initial annotated space information to obtain a third feature map tensor, wherein the third feature map tensor has feature information of the annotated channel information, feature information of the annotated space information, and feature information of the acquired feature map to be trained.
[0233] Exemplarily, according to the initial annotated channel information and the initial annotated space information, the currently acquired feature map to be trained is processed so that the feature map to be trained has feature information annotated with the channel information and feature information annotated with the space information, thereby obtaining a third feature map tensor.
[0234] In one example, step 3022 specifically includes the following first step and second step:
[0235] The first step is to process the acquired feature map to be trained according to the initial annotated channel information to obtain a fourth feature map tensor, wherein the fourth feature map tensor has feature information of the annotated channel information and feature information of the acquired feature map to be trained.
[0236] Among them, the first step specifically includes: compressing the spatial dimension information in the feature map to be trained to obtain the first feature information and the second feature information of the feature map to be trained, wherein the first feature information represents the channel dimension information after noise suppression, and the second feature information represents the channel dimension information after smoothing; splicing the initial annotated channel information with the first feature information to obtain the third feature information, and the third feature information is the channel dimension information with the annotated channel information after noise suppression; and splicing the initial annotated channel information with the second feature information to obtain the fourth feature information, and the fourth feature information is the channel dimension information with the annotated channel information after smoothing; removing the preset channel information in the third feature information, and removing the preset channel information in the fourth feature information, wherein the influence factor of the preset channel information is less than the preset factor; determining the channel attention information according to the third feature information with the preset channel information removed and the fourth feature information with the preset channel information removed, wherein the channel attention information represents the channel dimension information with the annotated channel information after smoothing and noise suppression; performing dimension processing on the channel attention information to obtain the processed channel attention information, wherein the dimension of the processed channel attention information and the dimension of the feature map to be trained are the same; combining the feature map to be trained with the channel attention information to obtain a fourth feature map tensor.
[0237] Exemplarily, first, the annotated channel information is added to the feature map to be trained. The annotated channel information and the feature map to be trained can be input into a preset training model, and then the feature map to be trained is processed according to the annotated channel information, and the feature information of the annotated channel information is added to the feature map to be trained; at this time, a fourth feature map tensor is obtained.
[0238] In one example, when obtaining the fourth feature map tensor, first, the feature map to be trained may have spatial dimension information and channel dimension information, the spatial dimension information includes the features of each channel of the feature map to be trained, and the channel dimension information includes the features of each space of the feature map to be trained.
[0239] The first way of channel dimension information: the channel is the channel of the image, and the channel feature is the color channel feature of the image. Or, the second way of channel dimension information: different channels represent different types of image features.
[0240] The first way of spatial dimension information: space refers to the various parts of an object; different spatial features are descriptions of the features of the object at different parts. Or, the second way of spatial dimension information: space refers to the various parts of an object image; different spatial features are descriptions of the features of the object image at different parts.
[0241] Since the spatial dimension information of the feature graph to be trained has a lot of feature content. The spatial dimension information of the feature graph to be trained can be compressed, and then the spatial dimension information in the feature graph to be trained is compressed, or part of the spatial dimension information in the feature graph to be trained is compressed to obtain the first feature information and the second feature information. Both the first feature information and the second feature information can be represented by vectors; the first feature information is a maximum vector, and the first feature information represents the channel dimension information after noise suppression; the second feature information is a flat vector, and the second feature information represents the channel dimension information after smoothing. For example, Fig. 9 A schematic diagram of the processing process of annotating channel information provided in an embodiment of the present application, such as Fig. 9 As shown, the first feature information is a C-dimensional Maxpooling vector, and the second feature information is a C-dimensional Avgpooling vector, where C is an integer greater than or equal to 1. For example, F is a feature map to be trained, and the dimension of the feature map to be trained F is C*H*W, where C, H, and W are all integers greater than or equal to 1; the spatial dimension information of F is compressed to obtain the first feature information MaxP(F) and the second feature information AvgP(F). Among them, Maxpooling is a way to take the maximum value, which is a method for compressing the feature map tensor; Avgpooling is a way to take the average value, which is a method for compressing the feature map tensor.
[0242] Then, the annotated channel information is concatenated with the first feature information to obtain the third feature information, thereby adding the annotated channel information to the first feature information in the feature map to be trained, that is, the third feature information is the channel dimension information with the annotated channel information after noise suppression. For example, the annotated channel information is The labeled channel information is a vector, where k represents the kth type of labeled channel information, that is, k represents the labeled channel information of the kth item category, and C is the dimension of the labeled channel information; Fig. 9 As shown, the channel information will be marked Combined with the first feature information MaxP(F), the third feature information is obtained Among them, MLP is a multi-layer perceptron, a basic deep neural network structure, which can complete the splicing of the above information based on MLP.
[0243] At the same time, the annotated channel information is concatenated with the second feature information to obtain the fourth feature information, thereby adding the annotated channel information to the second feature information in the feature map to be trained, that is, the fourth feature information is the smoothed channel dimension information with the annotated channel information. For example, the annotated channel information is like Fig. 9 As shown, the channel information will be marked Combined with the second feature information AvgP(F), the fourth feature information is obtained
[0244] Thus, according to the labeled channel information, the first feature information and the second feature information of the feature map to be trained are affected.
[0245] Then, the third feature information has multiple channel information, each of which has an influence factor, and the influence factor represents the importance of the channel information; the fourth feature information has multiple channel information, each of which has an influence factor, and the influence factor represents the importance of the channel information; the channel information whose influence factor in the third feature information is less than the preset factor can be removed, and the channel information whose influence factor in the fourth feature information is less than the preset factor can be removed. For example, the third feature information and the fourth feature information can be processed by a fully connected layer processing method, that is, the third feature information and the fourth feature information can be processed by a fully connected processing method; the fully connected processing method is a voting process, and the fully connected processing method can strengthen some channel information of the third feature information, weaken some channel information of the third feature information, and strengthen some channel information of the fourth feature information, and weaken some channel information of the fourth feature information.
[0246] The third feature information with the preset channel information removed and the fourth feature information with the preset channel information removed are combined to obtain channel attention information. It can be seen that the channel attention information represents the channel dimension information with the annotated channel information after smoothing and suppressing noise. For example, Fig. 9 As shown, the third feature information Fourth characteristic information Transformed into two C-dimensional vectors through the fully connected layer, the two C-dimensional vectors are added together to obtain a C-dimensional channel attention vector, that is, a channel attention information is obtained Among them, Sigmoid / σ is a nonlinear transformation method that can map a real number to the interval from -1 to 1.
[0247] Then, since the dimension of the channel attention information is different from the dimension of the feature map to be trained, the channel attention information needs to be dimensionally processed so that the dimension of the processed channel attention information is the same as the dimension of the feature map to be trained. For example, the channel attention information is broadcasted so that the processed channel attention information The dimension of is C*H*W, and the dimension of the feature map to be trained is also C*H*W.
[0248] Next, the feature map to be trained is combined with the channel attention information to generate the fourth feature map tensor. For example, Fig. 9As shown, the feature map to be trained is multiplied by the channel attention information to obtain the fourth feature map tensor
[0249] Through the above method, the spatial dimension information in the feature map to be trained is compressed, which makes it easier to process the channel dimension information in the feature map to be trained, and then the splicing and other processing are completed in sequence, so that the labeled channel information is added to the feature map to be trained, and the fourth feature map tensor that can reflect the item update information and content is obtained.
[0250] The second step is to process the fourth feature map tensor according to the initial annotation space information to obtain the third feature map tensor.
[0251] Among them, the second step specifically includes: compressing the channel dimension information in the fourth feature map tensor to obtain the fifth feature information and the sixth feature information of the feature map to be trained, wherein the fifth feature information represents the spatial dimension information after noise suppression, and the sixth feature information represents the spatial dimension information after smoothing; splicing the initial annotated spatial information, the fifth feature information, and the sixth feature information to obtain the seventh feature information, wherein the seventh feature information is the spatial dimension information with annotated spatial information; removing the preset spatial information in the seventh feature information, wherein the influence factor of the preset spatial information is less than the preset factor, and obtaining the spatial attention information, wherein the spatial attention information represents the spatial dimension information with annotated spatial information after smoothing and noise suppression; performing dimension processing on the spatial attention information to obtain the processed spatial attention information, wherein the dimension of the processed spatial attention information and the dimension of the feature map to be trained are the same; combining the fourth feature map tensor with the spatial attention information to obtain the third feature map tensor.
[0252] Exemplarily, after the first step above, the fourth feature map tensor is obtained, and the labeled space information needs to be added to the feature map to be trained. The labeled space information can also be input into the preset training model, and then the fourth feature map tensor is processed according to the labeled space channel information, and the feature information of the labeled space information is added to the fourth feature map tensor; at this time, the labeled channel information and the labeled space information can be added to the feature map to be trained to obtain the third feature map tensor.
[0253] In one example, when obtaining the third feature map tensor, first, the feature map to be trained may have spatial dimension information and channel dimension information, the spatial dimension information includes the features of each channel of the feature map to be trained, and the channel dimension information includes the features of each space of the feature map to be trained; after the above first step, the fourth feature map tensor obtained also has spatial dimension information and channel dimension information. Then when processing the fourth feature map tensor, it is also necessary to compress the channel dimension information of the fourth feature map tensor, and then compress the channel dimension information of the fourth feature map tensor, or compress part of the channel dimension information of the fourth feature map tensor to obtain the fifth feature information and the sixth feature information. Both the fifth feature information and the sixth feature information can be represented by vectors; the fifth feature information is a maximum vector, and the fifth feature information represents the spatial dimension information after noise suppression; the sixth feature information is a flat vector, and the sixth feature information represents the spatial dimension information after smoothing. For example, Fig.10 A schematic diagram of the processing process of marking spatial information provided in the embodiment of the present application, such as Fig.10 As shown, the fifth feature information is the Maxpooling matrix of WH dimensions, and the sixth feature information is the Avgpooling matrix of WH dimensions. For example, F is the feature map to be trained, the dimension of the feature map to be trained F is C*H*W, and the fourth feature map tensor is F ′ , the fourth feature map tensor F ′ The dimension is C*H*W; C, H, W are all integers greater than or equal to 1; for the fourth feature map tensor F ′ The channel dimension information is compressed to obtain the fifth feature information MaxP (F ′ ), the sixth characteristic information AvgP(F ′ ).
[0254] Then, the labeled spatial information, the fifth feature information, and the sixth feature information are concatenated to obtain the seventh feature information, thereby adding the labeled spatial information to the feature map to be trained. The seventh feature information is the spatial dimension information with the labeled spatial information. Marking space information Perform zoom processing to obtain the enlarged annotation space information The labeling channel information is a vector, where k represents the kth labeling channel information, that is, k represents the labeling channel information of the kth item category; S is the dimension of the labeling channel information, S = W*H; it can be seen that the labeling space information And the enlarged annotation space information The dimensions of are all WH; Fig.10 As shown, the enlarged annotation space information Fifth characteristic information MaxP(F ′), the sixth characteristic information AvgP(F ′ ) are spliced to obtain the seventh feature information.
[0255] Thus, according to the labeled space information, the fifth feature information and the sixth feature information of the feature map to be trained are affected.
[0256] Then, the seventh feature information has multiple channel information, each of which has an influence factor, which represents the importance of the channel information; the channel information whose influence factor in the seventh feature information is less than the preset factor can be removed. For example, the seventh feature information can be processed by using a 7*7 convolution kernel transformation method; the convolution kernel transformation method is a voting process, and the convolution kernel transformation method can strengthen some channel information of the seventh feature information and weaken some channel information of the seventh feature information.
[0257] At this point, the spatial attention information can be obtained, where the spatial attention information represents the spatial dimension information with labeled spatial information after smoothing and suppressing noise. Fig.10 As shown, the fifth feature information MaxP(F ′ ), the sixth characteristic information AvgP(F ′ ), spliced with the enlarged annotation space information Then, after the 7*7 convolution kernel transformation, a WH-dimensional spatial attention information is obtained. The spatial attention information is a spatial attention matrix; Fig.10 The Conv in is the convolution layer, that is, Conv represents the convolution kernel transformation.
[0258] Then, since the dimension of the spatial attention information is different from the dimension of the feature map to be trained, the spatial attention information needs to be dimensionally processed so that the dimension of the processed spatial attention information is the same as the dimension of the feature map to be trained. For example, the spatial attention information is broadcasted so that the processed spatial attention information The dimension of is C*H*W, and the dimension of the feature map to be trained is also C*H*W.
[0259] Next, the fourth feature map tensor is combined with the spatial attention information to generate the third feature map tensor. For example, Fig.10 As shown, the fourth feature map tensor is multiplied by the spatial attention information to obtain the third feature map tensor
[0260] Through the above method, the channel dimension information in the feature map to be trained is compressed, which makes it easier to process the spatial dimension information in the feature map to be trained, and then complete the splicing and other processing in sequence, so that the labeled spatial information is added to the feature map to be trained, and the third feature map tensor that can reflect the item update information and content is obtained.
[0261] 3023. Use the estimation model to perform estimation processing on the third feature map tensor to obtain an estimation value, wherein the estimation value represents estimation information after the third feature map tensor is subjected to preset processing.
[0262] For example, after the above two adjustments of the channel and the spatial dimension, the third feature map tensor obtained already contains the labeled features. The third feature map tensor can be used as the feature map to be trained, as the feature map of the next cycle of the preset training model. However, before the next cycle, it is first determined whether the cycle needs to be performed.
[0263] The estimation model corresponding to the preset processing can be used to perform estimation processing on the third feature map tensor to obtain an estimated value. For example, a model for predicting the click-through rate of advertisements is used to perform estimation processing on the third feature map tensor to obtain an estimated value of the click-through rate of advertisements. For another example, a model for predicting the category of an image is used to perform category estimation processing on the third feature map tensor to obtain an estimated value of the category. For another example, a clustering model is used to perform clustering processing on the third feature map tensor to obtain a clustering result of the image.
[0264] 3024. If the second preset condition is not met, the initial annotation channel information and the initial annotation space information are adjusted according to the estimated value to obtain adjusted annotation channel information and adjusted annotation space information. The adjusted annotation channel information is determined as the initial annotation channel information, the adjusted annotation space information is determined as the initial annotation space information, and the third feature map tensor is determined as the feature map to be trained.
[0265] The annotation channel information corresponding to the annotation information is the annotation channel information obtained when the second preset condition is met; and the annotation space information corresponding to the annotation information is the annotation space information obtained when the second preset condition is met.
[0266] In one example, "adjusting the initial annotation channel information and the initial annotation space information according to the estimated value" in step 3024 may include: determining a loss value according to the estimated value and the preset value, wherein the loss value represents the difference between the estimated value and the preset value; if the loss value is greater than or equal to a preset threshold, adjusting the initial annotation channel information and the initial annotation space information.
[0267] Exemplarily, since the labeled channel information and the labeled space information need to be reset in the next cycle of the preset training model, the initial labeled channel information and the initial labeled space information need to be optimized. A second preset condition is set, and when it is determined that the second preset condition is not met, it is determined to optimize the initial labeled channel information and the initial labeled space information, for example, randomly adjusting the labeled channel information and the labeled space information.
[0268] In one example, the second preset condition may be that the loss value is less than a preset threshold; and the above-mentioned estimated value may be used to optimize the initial annotation channel information and the initial annotation space information. In step 3023, the estimation model corresponding to the preset processing performs estimation processing on the third feature map tensor to obtain an estimated value; and a standard preset value corresponds to the preset processing; the difference between the estimated value and the preset value may be determined to obtain the loss value; when it is determined that the loss value is greater than or equal to the preset threshold, it is determined that the initial annotation channel information and the initial annotation space information need to be adjusted, and it is determined that the next cycle of the preset training model needs to be performed.
[0269] In another example, the second preset condition may be that the number of cycles is greater than the maximum number of cycles. When it is determined that the number of cycles is less than or equal to the maximum number of cycles, it is determined that the initial annotation channel information and the initial annotation space information need to be adjusted, and it is determined that the next cycle of the preset training model needs to be performed. It can be seen that the annotation channel information is Label space information Together with the parameters in the preset training model, it is iteratively optimized through the back-propagation algorithm.
[0270] Furthermore, when the second preset condition is not met, the adjusted annotation channel information is determined as the initial annotation channel information, the adjusted annotation space information is determined as the initial annotation space information, and the third feature map tensor is determined as the feature map to be trained. Thus, the feature map to be trained can be input into the next cycle of the preset training model, that is, 3021-3024 are repeatedly executed.
[0271] When the second preset condition is not met, the cycle of the preset training model can be ended, and the annotation channel information and the annotation space information corresponding to the annotation information are obtained.
[0272] For example, Fig.11 An example diagram of the processing of annotating channel information and annotating space information provided in the embodiment of the present application is shown in FIG. Fig.11As shown, based on the object image, a feature map F to be trained can be obtained; then, the feature map F to be trained is input into the preset training model; according to the labeled channel information, the feature map F to be trained is processed to obtain a fourth feature map tensor F′; then, according to the initial labeled space information, the fourth feature map tensor F′ is processed to obtain a third feature map tensor F″. If the second preset condition is not met, the labeled channel information and the labeled space information are adjusted, and the adjusted labeled channel information and the adjusted labeled space information are used as the labeled channel information and the labeled space information in the next cycle of the preset training model, respectively, and the third feature map tensor F″ is used as the feature map F to be trained in the next cycle of the preset training model. If the second preset condition is not met, the loop process of the preset training model is stopped, and it is determined that the labeled channel information and the labeled space information corresponding to the labeled information are obtained.
[0273] 303. Obtaining annotation information of the image of the object to be processed, wherein the annotation information represents annotation features of the object.
[0274] In one example, the annotation information has feature annotation, which includes annotation channel information and annotation space information, wherein the annotation channel information is used to characterize the features of each channel of the object category corresponding to the annotation information, and the annotation space information is used to characterize the features of each space of the object category corresponding to the annotation information.
[0275] For example, this step can be referred to Figure 5 The step 201 shown is not repeated any more.
[0276] 304. Determine the image features of the object image according to the annotation information and the object image, wherein the image features include image feature information and annotation features of the object image.
[0277] For example, this step can be referred to Figure 5 Steps 202 and 203 are shown and will not be described in detail.
[0278] 305. Perform preset processing on the item image according to the image features to obtain a processing result.
[0279] For example, this step can be referred to Figure 5 Step 204 is shown and will not be described in detail.
[0280] In this embodiment, based on the above embodiment, the preset training model is trained according to the feature map to be trained, the initial annotation channel information and the initial annotation space information to obtain feature annotations corresponding to the annotation information. For example, the annotation channel information and the annotation space information are iteratively optimized through the back propagation algorithm. Feature annotations corresponding to different item categories can be obtained, and the feature annotations include the annotation channel information and the annotation space information, wherein each annotation channel information is used to characterize the features of each channel of each item category, and each annotation space information is used to characterize the features of each space of each item category. Then, based on the obtained feature annotations corresponding to the annotation information, the image feature information is adjusted to obtain the picture feature; the obtained picture feature can express the image feature and the annotation feature of the item, and the extracted picture feature can accurately and diversely characterize the features of the item, that is, accurate item features are obtained. Then, based on the picture features that can express the annotation channel information, the annotation space information and the image feature information, the item picture is accurately processed.
[0281] Fig.12 A flowchart of another method for extracting and processing features of an object image provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, the method includes:
[0282] 401. Obtain an item picture displayed on a display platform, and obtain labeling information of the item picture displayed on the display platform, wherein the display platform is a platform for displaying item pictures.
[0283] Exemplarily, the executor of this embodiment is a terminal device, or a network device, or a feature extraction and processing device or equipment for object images, or other devices or equipment that can execute the method of this embodiment, and there is no limitation on this.
[0284] The display platform displays pictures of items, and in order to facilitate users to view pictures, the display platform will also set and display annotation information of the item pictures.
[0285] Display platforms include, but are not limited to, e-commerce web pages, applications in mobile terminals, smart devices with display and shopping functions, etc., where smart devices are, for example, smart TVs, smart refrigerators, etc. In addition, the display locations of item images include, but are not limited to, search result lists, recommended result lists, and advertising spaces, etc., where advertising spaces are, for example, native ads inserted in search and recommended result lists, other advertising spaces, etc.
[0286] The annotation information can be found in Figure 1 The description of step 101 is omitted here.
[0287] 402. Determine the image features of the object image according to the annotation information and the object image, wherein the image features include image feature information and annotation features of the object image.
[0288] For example, this step can be referred to Figure 1 The description of step 102 is omitted here.
[0289] 403. Perform preset processing on the item image according to the image features, obtain the processing result, and display the processing result on the display platform.
[0290] For example, this step can be referred to Figure 1 The description of step 103 is omitted. In addition, in this step, after the processing result is obtained, the processing result can be directly displayed on the display platform.
[0291] In one example, the click-through rate of an advertisement reflects the degree of match between the user and the advertisement. Based on the image features, the click-through rate of the advertisement of the item image can be calculated to obtain the click-through rate of the advertisement of the item image. The click-through rate of the advertisement is displayed in the item image on the display platform to facilitate users to view the click-through rate of the advertisement of the item image.
[0292] In another example, personalized recommendation information can be generated based on matching between image features and pre-acquired user features; and then the personalized recommendation information is displayed and pushed on the display platform.
[0293] In one example, different items can be matched based on the image features of each item image to obtain item matching results; then, the item matching results are displayed and pushed on a display platform.
[0294] In this embodiment, the item picture and annotation information displayed on the display platform are obtained. The item picture can represent the image feature information, and the annotation information can represent the prior knowledge of the item in the item picture; the item picture and the annotation information are combined to obtain the image features of the item picture, and the obtained image features can express the image features and annotation features of the item. The extracted image features can accurately and diversely represent the features of the item, that is, accurate item features are obtained; then, the item picture is processed based on the image features to obtain a relatively accurate processing result. The processing result is displayed on the display platform for users to view the processing result.
[0295] Fig.13 A schematic diagram of a device for extracting and processing features of an object image provided in an embodiment of the present application is shown in FIG. Fig.13 As shown, the device comprises:
[0296] The first acquisition unit 31 is used to acquire the annotation information of the object image to be processed, wherein the annotation information represents the annotation features of the object.
[0297] The determination unit 32 is used to determine the image features of the object image according to the annotation information and the object image, wherein the image features include the image feature information and the annotation features of the object image.
[0298] The first processing unit 33 is used to perform preset processing on the object image according to the image features to obtain a processing result.
[0299] In one example, the annotation information includes any one or more of the following: item category information, related link information, and item detailed information; wherein the item category information includes at least one category level of the item.
[0300] In one example, the processing result includes any one or more of the following: advertisement click-through rate, ranking of search results, personalized recommendation information, item clustering results, and item matching results.
[0301] For example, this embodiment can refer to the above method embodiment, and its principles and technical effects are similar and will not be described in detail.
[0302] Fig.14 A schematic diagram of the structure of another device for extracting and processing features of an object image provided in an embodiment of the present application, Fig.13 Based on the embodiment shown, Fig.14 As shown, in the device, the determination unit 32 includes:
[0303] An extraction module 321 is used to extract features from the object image to obtain a feature map of the object, wherein the feature map is used to represent image feature information of the object image;
[0304] The adjustment module 322 is used to adjust the feature map according to the annotation information to obtain the image features.
[0305] In one example, the adjustment module 322 includes:
[0306] The determination submodule 3221 is used to determine the feature annotation corresponding to the annotation information based on the preset annotation information and the feature annotation library, wherein the feature annotation library includes feature annotations corresponding to different annotation information, and the feature annotation includes annotation channel information and annotation space information, wherein the annotation channel information is used to characterize the characteristics of each channel of the item category corresponding to the annotation information, and the annotation space information is used to characterize the characteristics of each space of the item category corresponding to the annotation information.
[0307] The adjustment submodule 3222 is used to adjust the feature map according to the feature annotation corresponding to the annotation information to obtain the image features.
[0308] In one example, the adjustment submodule 3222 is specifically used for:
[0309] Repeat the following process until the first preset condition is met: according to the acquired labeled channel information, the acquired feature map is processed to obtain a first feature map tensor, wherein the first feature map tensor has feature information of the labeled channel information and feature information of the acquired feature map; according to the acquired labeled space information, the first feature map tensor is processed to obtain a second feature map tensor, wherein the second feature map tensor has feature information of the labeled channel information, feature information of the labeled space information, and feature information of the acquired feature map; determine that the second feature map tensor is the acquired feature map; wherein the second feature map tensor obtained when the first preset condition is met is the image feature.
[0310] In one example, the first acquisition unit 31 is specifically used to: acquire the annotation information displayed on the display platform, wherein the display platform is a platform for displaying pictures of objects.
[0311] For example, this embodiment can refer to the above method embodiment, and its principles and technical effects are similar and will not be described in detail.
[0312] Fig.15 A schematic diagram of the structure of another device for extracting and processing features of an object image provided in an embodiment of the present application, Fig.13 Based on the embodiment shown, Fig.15 As shown, in the device, the annotation information has feature annotation, and the feature annotation includes annotation channel information and annotation space information, wherein the annotation channel information is used to characterize the features of each channel of the item category corresponding to the annotation information, and the annotation space information is used to characterize the features of each space of the item category corresponding to the annotation information.
[0313] The device provided in this embodiment also includes:
[0314] The second acquisition unit 41 is used to acquire a to-be-trained feature map of the to-be-trained picture, wherein the to-be-trained picture and the object picture belong to the same object category, and the to-be-trained feature map is used to represent image feature information of the to-be-trained picture.
[0315] The second processing unit 42 is used to train the preset training model according to the feature map to be trained, the initial annotation channel information and the initial annotation space information to obtain feature annotations corresponding to the annotation information.
[0316] In one example, the second processing unit 42 includes:
[0317] The execution module 421 is used to repeatedly execute the following modules until a second preset condition is met.
[0318] The first processing module 422 is used to process the acquired feature map to be trained according to the initial annotated channel information and the initial annotated space information to obtain a third feature map tensor, wherein the third feature map tensor has feature information of the annotated channel information, feature information of the annotated space information, and feature information of the acquired feature map to be trained.
[0319] The second processing module 423 is used to use the estimation model to perform estimation processing on the third feature map tensor to obtain an estimation value, wherein the estimation value represents estimation information after the third feature map tensor is subjected to preset processing.
[0320] The third processing module 424 is used to adjust the initial annotation channel information and the initial annotation space information according to the estimated value to obtain adjusted annotation channel information and adjusted annotation space information if the second preset condition is not met; and determine the adjusted annotation channel information as the initial annotation channel information, determine the adjusted annotation space information as the initial annotation space information, and determine the third feature map tensor as the feature map to be trained; wherein the annotation channel information corresponding to the annotation information is the annotation channel information obtained when the second preset condition is met; and the annotation space information corresponding to the annotation information is the annotation space information obtained when the second preset condition is met.
[0321] In one example, the first processing module 422 includes:
[0322] The first processing submodule 4221 is used to process the acquired feature map to be trained according to the initial annotated channel information to obtain a fourth feature map tensor, wherein the fourth feature map tensor has feature information of the annotated channel information and feature information of the acquired feature map to be trained.
[0323] The second processing submodule 4222 is used to process the fourth feature map tensor according to the initial annotation space information to obtain the third feature map tensor.
[0324] In one example, the first processing submodule 4221 is specifically used to:
[0325] Compress the spatial dimension information in the feature map to be trained to obtain the first feature information and the second feature information of the feature map to be trained, wherein the first feature information represents the channel dimension information after noise suppression, and the second feature information represents the channel dimension information after smoothing; splice the initial annotated channel information with the first feature information to obtain the third feature information, which is the channel dimension information with annotated channel information after noise suppression; and splice the initial annotated channel information with the second feature information to obtain the fourth feature information, which is the channel dimension information with annotated channel information after smoothing; remove the preset channel information in the third feature information, and remove the preset channel information in the fourth feature information, wherein the influence factor of the preset channel information is less than the preset factor; determine the channel attention information according to the third feature information with the preset channel information removed and the fourth feature information with the preset channel information removed, wherein the channel attention information represents the channel dimension information with the annotated channel information after smoothing and noise suppression; combine the feature map to be trained with the channel attention information to obtain a fourth feature map tensor.
[0326] In one example, the first processing submodule 4221 is also used to perform dimension processing on the channel attention information before combining the feature map to be trained with the channel attention information to obtain the fourth feature map tensor, so as to obtain the processed channel attention information, wherein the dimension of the processed channel attention information and the dimension of the feature map to be trained are the same.
[0327] In one example, the second processing submodule 4222 is specifically configured to:
[0328] Compress the channel dimension information in the fourth feature map tensor to obtain the fifth feature information and the sixth feature information of the feature map to be trained, wherein the fifth feature information represents the spatial dimension information after noise suppression, and the sixth feature information represents the spatial dimension information after smoothing; concatenate the initial annotated spatial information, the fifth feature information, and the sixth feature information to obtain the seventh feature information, wherein the seventh feature information is the spatial dimension information with annotated spatial information; remove the preset spatial information in the seventh feature information, wherein the influence factor of the preset spatial information is less than the preset factor, and obtain the spatial attention information, wherein the spatial attention information represents the spatial dimension information with the annotated spatial information after smoothing and noise suppression; combine the fourth feature map tensor with the spatial attention information to obtain the third feature map tensor.
[0329] In one example, the second processing sub-module 4222 is also used to perform dimension processing on the spatial attention information before combining the fourth feature map tensor with the spatial attention information to obtain the third feature map tensor, so as to obtain the processed spatial attention information, wherein the dimension of the processed spatial attention information and the dimension of the feature map to be trained are the same.
[0330] In one example, the third processing module 424 is specifically configured to:
[0331] A loss value is determined according to the estimated value and the preset value, wherein the loss value represents the difference between the estimated value and the preset value; if the loss value is greater than or equal to a preset threshold, the initial annotation channel information and the initial annotation space information are adjusted.
[0332] For example, this embodiment can refer to the above method embodiment, and its principles and technical effects are similar and will not be described in detail.
[0333] Fig.16 It is a block diagram of a computer device according to an exemplary embodiment. The device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0334] Computer device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0335] The processing component 802 generally controls the overall operation of the computer device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0336] The memory 804 is configured to store various types of data to support operations on the computer device 800. Examples of such data include instructions for any application or method operating on the computer device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0337] The power supply component 806 provides power to the various components of the computer device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the computer device 800.
[0338] The multimedia component 808 includes a screen that provides an output interface between the computer device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the computer device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0339] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the computer device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0340] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0341] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the computer device 800. For example, the sensor assembly 814 can detect the open / closed state of the computer device 800, the relative positioning of components, such as the display and keypad of the computer device 800, and the sensor assembly 814 can also detect the position change of the computer device 800 or a component of the computer device 800, the presence or absence of user contact with the computer device 800, the orientation or acceleration / deceleration of the computer device 800, and the temperature change of the computer device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0342] The communication component 816 is configured to facilitate wired or wireless communication between the computer device 800 and other devices. The computer device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0343] In an exemplary embodiment, the computer device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0344] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of a computer device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0345] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a computer device, enables the computer device to execute the above-mentioned feature extraction and processing method of object images.
[0346] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0347] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for extracting and processing features of an object image, characterized in that: include: Acquire the annotation information of the image of the object to be processed, wherein the annotation information represents the annotation features of the object; Based on the annotation information, determine the annotation channel information and the annotation space information; the annotation channel information is used to characterize the characteristics of each channel of the item category corresponding to the annotation information; the annotation space information is used to characterize the characteristics of each space of the item category corresponding to the annotation information; Processing the feature map according to the annotated channel information to obtain a first feature map tensor, wherein the feature map is obtained by extracting features from the item image; the first feature map tensor contains feature information of the annotated channel information and feature information of the feature map; According to the labeled spatial information, the first feature map tensor is processed to obtain a second feature map tensor; the second feature map tensor has feature information labeled with channel information, feature information labeled with spatial information, and feature information of the feature map; and the second feature map tensor is determined to be a new feature map; Repeat the above process, and use the second feature map tensor obtained when the first preset condition is met as the image feature of the object image to be processed; the image feature includes the image feature information of the object image and the annotation feature; The item image is processed in a preset manner according to the image features to obtain a processing result.
2. The method according to claim 1, characterized in that: Also includes: Feature extraction is performed on the object image to obtain a feature map of the object, wherein the feature map is used to characterize image feature information of the object image.
3. The method according to claim 2, characterized in that The step of determining the annotation channel information and the annotation space information based on the annotation information includes: According to preset annotation information and a feature annotation library, annotation channel information and annotation space information corresponding to the annotation information are determined, wherein the feature annotation library includes feature annotations corresponding to different annotation information.
4. The method according to claim 1, characterized in that: Get the annotation information of the item image to be processed, including: The annotation information displayed on the display platform is obtained, wherein the display platform is a platform for displaying the item picture.
5. The method according to any one of claims 1 to 4, characterized in that: Also includes: Obtaining a to-be-trained feature map of a to-be-trained picture, wherein the to-be-trained picture and the object picture belong to the same object category, and the to-be-trained feature map is used to characterize image feature information of the to-be-trained picture; According to the feature map to be trained, the initial annotation channel information and the initial annotation space information, a preset training model is trained to obtain feature annotations corresponding to the annotation information.
6. The method according to claim 5, characterized in that According to the feature map to be trained, the initial annotation channel information and the initial annotation space information, a preset training model is trained to obtain feature annotations corresponding to the annotation information, including: Repeat the following steps until the second preset condition is reached: According to the initial annotated channel information and the initial annotated space information, the acquired feature map to be trained is processed to obtain a third feature map tensor, wherein the third feature map tensor has feature information of the annotated channel information, feature information of the annotated space information, and feature information of the acquired feature map to be trained; Using the estimation model to perform estimation processing on the third feature map tensor to obtain an estimation value, wherein the estimation value represents estimation information after the third feature map tensor is subjected to the preset processing; If the second preset condition is not met, the initial labeled channel information and the initial labeled space information are adjusted according to the estimated value to obtain adjusted labeled channel information and adjusted labeled space information; and the adjusted labeled channel information is determined as the initial labeled channel information, the adjusted labeled space information is determined as the initial labeled space information, and the third feature map tensor is determined as the feature map to be trained; The annotation channel information corresponding to the annotation information is the annotation channel information obtained when the second preset condition is met; and the annotation space information corresponding to the annotation information is the annotation space information obtained when the second preset condition is met.
7. The method according to claim 6, characterized in that According to the initial annotation channel information and the initial annotation space information, the acquired feature map to be trained is processed to obtain a third feature map tensor, including: According to the initial annotated channel information, the acquired feature map to be trained is processed to obtain a fourth feature map tensor, wherein the fourth feature map tensor has feature information of the annotated channel information and feature information of the acquired feature map to be trained; The fourth feature map tensor is processed according to the initial labeled space information to obtain the third feature map tensor.
8. The method according to claim 7, characterized in that According to the initial annotated channel information, the acquired feature map to be trained is processed to obtain the fourth feature map tensor, including: Compressing the spatial dimension information in the feature map to be trained to obtain first feature information and second feature information of the feature map to be trained, wherein the first feature information represents the channel dimension information after noise suppression, and the second feature information represents the channel dimension information after smoothing; The initial annotated channel information is concatenated with the first feature information to obtain third feature information, where the third feature information is the channel dimension information with the annotated channel information after noise suppression; and the initial annotated channel information is concatenated with the second feature information to obtain fourth feature information, where the fourth feature information is the channel dimension information with the annotated channel information after smoothing; Removing the preset channel information from the third feature information, and removing the preset channel information from the fourth feature information, wherein the influence factor of the preset channel information is less than the preset factor; Determine channel attention information according to the third feature information from which the preset channel information is removed and the fourth feature information from which the preset channel information is removed, wherein the channel attention information represents the channel dimension information having the annotated channel information after smoothing and suppressing noise; The feature map to be trained is combined with the channel attention information to obtain the fourth feature map tensor.
9. The method according to claim 8, characterized in that Before combining the feature map to be trained with the channel attention information to obtain the fourth feature map tensor, the method further includes: The channel attention information is dimensionally processed to obtain processed channel attention information, wherein the dimension of the processed channel attention information and the dimension of the feature map to be trained are the same.
10. The method according to claim 7, characterized in that Processing the fourth feature map tensor according to the initial annotation space information to obtain the third feature map tensor includes: Compressing the channel dimension information in the fourth feature map tensor to obtain fifth feature information and sixth feature information of the feature map to be trained, wherein the fifth feature information represents the spatial dimension information after noise suppression, and the sixth feature information represents the spatial dimension information after smoothing; The initial annotated space information, the fifth feature information, and the sixth feature information are concatenated to obtain seventh feature information, wherein the seventh feature information is space dimension information with the annotated space information; Removing the preset spatial information from the seventh feature information, wherein the influence factor of the preset spatial information is less than the preset factor, to obtain spatial attention information, wherein the spatial attention information represents the spatial dimension information with the annotated spatial information after smoothing and suppressing noise; The fourth feature map tensor is combined with the spatial attention information to obtain the third feature map tensor.
11. The method according to claim 10, characterized in that Before combining the fourth feature map tensor with the spatial attention information to obtain the third feature map tensor, the method further includes: The spatial attention information is dimensionally processed to obtain processed spatial attention information, wherein the dimension of the processed spatial attention information and the dimension of the feature map to be trained are the same.
12. The method according to claim 6, characterized in that The initial annotation channel information and the initial annotation space information are adjusted according to the estimated value, including: Determine a loss value according to the estimated value and the preset value, wherein the loss value represents the difference between the estimated value and the preset value; If the loss value is greater than or equal to a preset threshold, the initial annotation channel information and the initial annotation space information are adjusted.
13. The method according to any one of claims 1 to 4, characterized in that: The annotation information includes any one or more of the following: item category information, related link information, and item detailed information; wherein the item category information includes at least one category level of the item; The processing results include any one or more of the following: advertisement click-through rate, ranking of search results, personalized recommendation information, item clustering results, and item matching results.
14. A method for extracting and processing features of an object image, characterized in that: include: Acquire an item picture displayed on a display platform, and acquire annotation information of the item picture displayed on the display platform, wherein the display platform is a platform for displaying the item picture; Based on the annotation information, determine the annotation channel information and the annotation space information; the annotation channel information is used to characterize the characteristics of each channel of the item category corresponding to the annotation information; the annotation space information is used to characterize the characteristics of each space of the item category corresponding to the annotation information; Processing the feature map according to the annotated channel information to obtain a first feature map tensor, wherein the feature map is obtained by extracting features from the item image; the first feature map tensor contains feature information of the annotated channel information and feature information of the feature map; According to the labeled spatial information, the first feature map tensor is processed to obtain a second feature map tensor; the second feature map tensor has feature information labeled with channel information, feature information labeled with spatial information, and feature information of the feature map; and the second feature map tensor is determined to be a new feature map; Repeat the above process, and use the second feature map tensor obtained when the first preset condition is met as the image feature of the object image; wherein the image feature includes the image feature information and the annotation feature of the object image; The item image is processed in a preset manner according to the image features to obtain a processing result, and the processing result is displayed on the display platform.
15. A device for extracting and processing features of an object image, characterized in that: include: A first acquisition unit is used to acquire the annotation information of the object image to be processed, wherein the annotation information represents the annotation features of the object; a determining unit, configured to determine, based on the annotation information, the annotation channel information and the annotation space information; the annotation channel information is used to characterize the features of each channel of the item category corresponding to the annotation information; the annotation space information is used to characterize the features of each space of the item category corresponding to the annotation information; the feature map is processed according to the annotation channel information to obtain a first feature map tensor, the feature map is obtained by extracting features from the item image; the first feature map tensor has feature information of the annotation channel information and feature information of the feature map; the first feature map tensor is processed according to the annotation space information to obtain a second feature map tensor; the second feature map tensor has feature information of the annotation channel information, feature information of the annotation space information, and feature information of the feature map; the second feature map tensor is determined to be a new feature map; the above process is repeatedly performed, and the second feature map tensor obtained when the first preset condition is met is used as the image feature of the item image to be processed; the image feature includes the image feature information of the item image and the annotation feature; The first processing unit is used to perform preset processing on the object image according to the image features to obtain a processing result.
16. A computer device, characterized in that: include: Memory, processor; Memory; a memory for storing instructions executable by the processor; The processor is configured to execute the method for extracting and processing the object image as described in any one of claims 1 to 13, or to implement the method for extracting and processing the object image as described in claim 14.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the feature extraction and processing method for an object image as described in any one of claims 1 to 13, or to implement the feature extraction and processing method for an object image as described in claim 14.
