Image processing method and device, electronic equipment and storage medium

By acquiring image feature information from electronic devices and using a multi-layered algorithm structure for classification, the cumbersome problem of image searching and processing in image libraries is solved, achieving more efficient image management.

CN114579779BActive Publication Date: 2025-11-25VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210118684.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-08
Publication Date
2025-11-25
Estimated Expiration
2042-02-08

AI Technical Summary

Technical Problem

When electronic devices store a large number of images in their image libraries, the process of searching for and processing these images is cumbersome and time-consuming, and existing technologies lack flexibility and efficiency.

Method used

By acquiring the first feature information of the image, extracting feature information using a multi-layer algorithm structure, and classifying it using a second algorithm structure, different processing is applied to different images according to the image category to obtain scores for accurate management.

Benefits of technology

It improves the flexibility and efficiency of electronic devices in image processing, allowing users to quickly find the images they need to process, reducing tedious and time-consuming operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114579779B_ABST
    Figure CN114579779B_ABST
Patent Text Reader

Abstract

The application discloses an image processing method and device, electronic equipment and storage medium, and belongs to the technical field of artificial intelligence. The method comprises the following steps: acquiring first feature information of M images, wherein the first feature information of each image is used for indicating an image category to which the image belongs, M is a positive integer; processing the M images by at least one second algorithm structure according to the first feature information of the M images to obtain scores of the M images, each second algorithm structure corresponds to an image category, and each second algorithm structure corresponds to at least one image belonging to the same image category in the M images; and the score of each image is used for indicating the image quality of the image in the image category corresponding to the image; and performing image processing on the M images according to the scores of the M images.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of artificial intelligence, and particularly relates to an image processing method and device, electronic equipment and storage medium. BACKGROUND

[0002] At present, after an electronic device performs photographing, the electronic device can save a photographed picture to a gallery application program. When the electronic device saves a large number of pictures, the pictures occupy a large amount of storage space of the electronic device, and the gallery application program contains some pictures with poor photographing quality. Generally, a user can perform corresponding operations on the pictures stored in the gallery application program according to the user's own needs.

[0003] However, because there are a large number of pictures in the gallery application program, the user needs to sequentially search for pictures to be processed from all the pictures in the gallery application program (for example, the user manually flips pages to search for pictures to be deleted), which leads to cumbersome and time-consuming operations of the user searching for and processing the pictures. As such, the electronic device has poor flexibility and efficiency in image processing. SUMMARY

[0004] Embodiments of the present application provide an image processing method and device, electronic equipment and storage medium, which can solve the problem of poor flexibility and efficiency of the electronic device in image processing.

[0005] In a first aspect, an image processing method is provided, which includes: obtaining first feature information of M images, the first feature information of each image being used to indicate an image category to which the image belongs, M being a positive integer; processing the M images by at least one second algorithm structure according to the first feature information of the M images to obtain scores of the M images, each second algorithm structure corresponding to an image category, each second algorithm structure corresponding to at least one image belonging to the same image category in the M images, the score of each image being used to indicate an image quality of the image in the image category corresponding to the image; and performing image processing on the M images according to the scores of the M images.

[0006] In a second aspect, an image processing apparatus is provided. The image processing apparatus comprises an obtaining module and a processing module. The obtaining module is configured to obtain first feature information of M images, the first feature information of each image being used to indicate a category of the image, and M being a positive integer. The processing module is configured to process the M images by using at least one second algorithm structure according to the first feature information of the M images, to obtain scores of the M images, each second algorithm structure corresponding to one category of images, and each second algorithm structure corresponding to at least one image belonging to the same category of images in the M images, and the score of each image being used to indicate image quality of the image in the category of images corresponding to the image. The processing module is further configured to perform image processing on the M images according to the scores of the M images.

[0007] In a third aspect, an electronic device is provided. The electronic device comprises a processor and a memory. The memory stores programs or instructions executable on the processor. The programs or instructions, when executed by the processor, implement the steps of the method according to the first aspect.

[0008] In a fourth aspect, a readable storage medium is provided. The readable storage medium stores programs or instructions. The programs or instructions, when executed by a processor, implement the steps of the method according to the first aspect.

[0009] In a fifth aspect, a chip is provided. The chip comprises a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to execute programs or instructions to implement the method according to the first aspect.

[0010] In a sixth aspect, a computer program product is provided. The computer program product is stored in a storage medium. The computer program product is executed by at least one processor to implement the method according to the first aspect.

[0011] In this embodiment, the electronic device can output each of the M images to a second algorithm structure that matches the image category based on the first feature information of the M images. That is, the electronic device can classify the M images according to the feature information of the M images and output each of the M images to the second algorithm structure corresponding to the category. This allows at least one second algorithm structure to perform different processing on images of different categories according to the category to which the M images belong, and obtain the scores of the M images. Based on the scores of the M images, the image quality of the M images can be accurately determined. Thus, the M images can be processed according to their image quality to achieve accurate and effective management of the M images. This avoids the need for users to search for the images to be processed sequentially from the image library application of the electronic device, which is cumbersome and time-consuming. Therefore, the solution of this application improves the flexibility and efficiency of image processing of the electronic device. Attached Figure Description

[0012] Figure 1 This is one of the schematic diagrams of an image processing method provided in an embodiment of this application;

[0013] Figure 2 This is one of the structural diagrams of a first algorithm structure provided in the embodiments of this application;

[0014] Figure 3 This is a second schematic diagram of a first algorithm structure provided in an embodiment of this application;

[0015] Figure 4 This is the third schematic diagram of a first algorithm structure provided in the embodiments of this application;

[0016] Figure 5 This is a schematic diagram of a second algorithm structure provided in an embodiment of this application;

[0017] Figure 6 This is a schematic diagram of the structure of an image processing device provided in an embodiment of this application;

[0018] Figure 7 This is one of the hardware structure diagrams of an electronic device provided in the embodiments of this application;

[0019] Figure 8 This is a second schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] With reference to the drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts are within the scope of the present application.

[0021] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally a category and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / ", generally indicates that the objects before and after are in an "or" relationship.

[0022] The image processing method provided by the embodiments of the present application will be described in detail below with reference to the drawings, specific embodiments and application scenarios.

[0023] With the continuous development of mobile intelligent terminals, the configuration of the camera of electronic devices is also increasing, and the pixels of the camera of electronic devices are also increasing. Now, the size of the photo obtained through the camera of the electronic device is generally several megabytes or more than ten megabytes, and a video can reach tens of megabytes or several gigabytes (G). After the electronic device is used for a period of time, a large number of images will exist in the electronic device. If the user does not perform a deletion operation on the stored images, the images will occupy a large amount of storage space of the electronic device, and it will also become very difficult for the user to find the images. In the related art, the electronic device can use a similarity score to search the stored images, so as to obtain the images searched as a deletion candidate set, so that the user can find the images to be deleted in the deletion candidate set. However, in the above method, the electronic device uses the same scoring standard to screen different categories of pictures, which causes the electronic device to not have the ability to screen the pictures to be deleted according to the personal aesthetic and scene characteristics of the user. Therefore, the flexibility and efficiency of the electronic device in image processing are poor.

[0024] In the embodiment of the present application, the electronic device can obtain the first feature information of the M images in the electronic device through the first algorithm structure, and determine the second algorithm structure matching the image category of each image from at least one second algorithm structure to obtain the scores of the M images, so that the electronic device can process the M images according to the scores of the M images. In the present scheme, since the electronic device outputs each image in the M images to the second algorithm structure matching the image category according to the first feature information of the M images, that is, the electronic device can classify the M images according to the feature information of the M images and output each image in the M images to the second algorithm structure of the corresponding category, so that the at least one second algorithm structure can process different categories of images differently according to the category to which the M images belong to, to obtain the scores of the M images, so that the electronic device can process (such as sorting or adding a mark) the M images according to the corresponding scores of the M images, so that the user can quickly find the image to be deleted, avoiding the user to find the image to be processed from the gallery application of the electronic device, resulting in that the operation of the user to find the image to be processed is tedious and time-consuming. Therefore, the present application improves the flexibility and efficiency of the electronic device in processing images.

[0025] The embodiment of the present application provides an image processing method, Figure 1 A flowchart of an image processing method provided by the embodiment of the present application is shown. As shown in Figure 1 The image processing method provided by the embodiment of the present application can include the following steps 201 to 203.

[0026] Step 201, the electronic device obtains the first feature information of M images.

[0027] In the embodiment of the present application, the first feature information of each image in the above-mentioned M images respectively indicates an image category to which the image belongs, and M is a positive integer.

[0028] In the embodiment of the present application, the electronic device can perform auditing on the target video to which the M images belong by obtaining the first feature information of the M images.

[0029] It should be noted that the image described in the embodiment of the present application is a general description, that is, the image can be understood as a picture or a video.

[0030] Optionally, in the embodiment of the present application, the above-mentioned M images can be images stored in the gallery application in the electronic device; or the above-mentioned M images can be images in a communication application; or the above-mentioned M images can be images sent by other users; or the above-mentioned M images can be images taken by the user.

[0031] Optionally, in embodiments of the present application, the first feature information can include at least one of image brightness information, image semantic information, image content information, image composition information, image color temperature information, image resolution information, and the like. The specific determination can be made according to actual use requirements, and embodiments of the present application are not limited.

[0032] Optionally, in embodiments of the present application, the step 201 can be implemented by the following step 201a.

[0033] In step 201a, the electronic device obtains first feature information of M images in the electronic device through a first algorithm structure.

[0034] Optionally, in embodiments of the present application, the first algorithm structure can be any one of ResNet algorithm structure, LeNet algorithm structure, AlexNet algorithm structure, VGG algorithm structure, NiN algorithm structure, GooLeNet algorithm structure, DenseNet algorithm structure, and the like. The specific determination can be made according to actual use requirements, and embodiments of the present application are not limited.

[0035] Optionally, in embodiments of the present application, the electronic device can perform classification processing on the M images to obtain at least one group of classified images, and input the at least one group of classified images into the first algorithm structure, so as to obtain the first feature information of each group of classified images.

[0036] Optionally, in embodiments of the present application, the electronic device can classify the M images according to content information to obtain at least one group of classified images; or the electronic device can classify the M images according to user preference information to obtain at least one group of classified images; or the electronic device can classify the M images according to user browsing frequency information to obtain at least one group of classified images; or the electronic device can classify the M images according to usage frequency information to obtain at least one group of classified images.

[0037] Optionally, in embodiments of the present application, the first algorithm structure includes L-layer algorithm structure, L is an integer greater than 1. The step 201a can be implemented by the following step 201a1 and step 201b1.

[0038] In step 201a1, the electronic device sequentially performs feature extraction on each image in the M images through the L-layer algorithm structure to obtain L sets of feature information.

[0039] In embodiments of the present application, the L-layer algorithm structure and the L sets of feature information correspond one-to-one, each set of feature information in the L sets of feature information includes second feature information of the M images, and the second feature information of the M images included in each set of feature information is different.

[0040] It can be understood that each layer of the L-layer algorithm structure is based on the output of the previous layer and is then processed again. That is, through the extraction of feature information layer by layer, L different sets of feature information are finally obtained. Thus, the shallow algorithm structure obtains easily distinguishable image representation information, while the deep algorithm structure obtains abstract and difficult-to-distinguish semantic information.

[0041] In this embodiment of the application, the electronic device can extract features from each of the M images through the i-th layer algorithm structure in the L-layer algorithm structure to obtain the feature information set corresponding to the i-th layer first algorithm structure, thereby obtaining L feature information sets, i = 1, 2, 3...L.

[0042] It can be understood that an electronic device can extract features from each of the M images using the first layer of the L-layer algorithm structure, thereby obtaining a feature information set corresponding to the first layer of the algorithm structure. Based on the feature extraction in the first layer of the algorithm structure, the electronic device can extract features from each of the M images again using the second layer of the algorithm structure, thereby obtaining a feature information set corresponding to the second layer of the algorithm structure. That is, the feature information of each image in the M images extracted by each layer of the algorithm structure is different. This process continues until the last layer of the algorithm structure (i.e., the L-th layer of the algorithm structure) is reached, obtaining a feature information set corresponding to the L-th layer of the algorithm structure, thus obtaining L feature information sets.

[0043] For example, such as Figure 2 The diagram shows a schematic representation of the first algorithm structure provided in this embodiment. Electronic devices can utilize a 4-layer ResNet algorithm structure (…). Figure 2 (represented by 10 in the text) For each of the M images, feature extraction is performed. The first layer of the ResNet algorithm, S1, extracts the sharpness information set 11 for each image. The second layer, S2, extracts the composition information set 12 for each image. The third layer, S3, extracts the color temperature information set 13 for each image. The fourth layer, S4, extracts the semantic information set 14 for each image, thus obtaining 4 feature information sets.

[0044] Optionally, in this embodiment of the application, each layer of the L-layer algorithm structure includes a convolution algorithm structure and a pooling algorithm structure. Step 201a1 can be specifically implemented through steps 201a11 and 201a12 as described below.

[0045] Step 201a11, for each layer algorithm structure in the L-layer algorithm structure, the electronic device performs convolution processing on each image in the M images through the convolution algorithm structure of the layer algorithm structure, to obtain M convolution vectors.

[0046] In the embodiments of the present application, each layer algorithm structure in the L-layer algorithm structure can divide each image in the M images into at least one square grid through the convolution algorithm structure, each square grid includes part of the image of each image, and the images in the at least one square grid are converted into vectors, thereby obtaining the convolution vectors of the M images.

[0047] It should be noted that each image in the M images contains at least one convolution vector, that is, one image can correspond to multiple convolution vectors.

[0048] Optionally, in the embodiments of the present application, the convolution processing can include any one of the following: general convolution, dilated convolution, transpose convolution and separable convolution.

[0049] Step 201a12, the electronic device performs pooling processing on the M convolution vectors through the pooling algorithm structure of the layer algorithm structure, to obtain a feature information set corresponding to the layer algorithm structure, to obtain L feature information sets.

[0050] It can be understood that the electronic device can perform convolution processing on each image in the M images through the convolution algorithm structure in the first layer algorithm structure of the L-layer algorithm structure, to obtain the convolution vectors of the M images corresponding to the first layer algorithm structure, and perform pooling processing on the convolution vectors of the M images, to obtain a feature information set corresponding to the first layer algorithm structure; on the basis of the convolution processing of the M images in the first layer algorithm structure, the second layer algorithm structure continues to perform convolution on the M images processed by the first layer algorithm structure, to obtain the convolution vectors of the M images corresponding to the second layer algorithm structure, and performs pooling processing on the convolution vectors of the M images, to obtain a feature information set corresponding to the second layer algorithm structure, and so on, until the last layer algorithm structure (i.e., the Lth layer algorithm structure), to obtain the feature information set corresponding to the Lth layer algorithm structure, thereby obtaining L feature information sets.

[0051] Optionally, in the embodiments of the present application, the pooling processing can be any one of the following: maximum pooling processing or average pooling processing. The actual use requirements can be determined, and the embodiments of the present application are not limited.

[0052] Exemplarily, in combination with Figure 2 For example, in combination with Figure 3As shown, each algorithm structure in the 4-layer ResNet algorithm structure includes a convolution algorithm structure 15 and a pooling algorithm structure 16. The electronic device can perform convolution processing on each of the M images through the convolution algorithm structure in the first-layer algorithm structure to obtain a convolution vector of the M images corresponding to the first-layer algorithm structure, and perform pooling processing on the convolution vector of the M images to obtain a feature information set corresponding to the first-layer algorithm structure. On the basis of the convolution processing of the M images by the first-layer algorithm structure, the second-layer algorithm structure continues to perform convolution on the M images processed by the first-layer algorithm structure to obtain a convolution vector of the M images corresponding to the second-layer algorithm structure, and performs pooling processing on the convolution vector of the M images to obtain a feature information set corresponding to the second-layer algorithm structure. On the basis of the convolution processing of the M images by the second-layer algorithm structure, the third-layer algorithm structure continues to perform convolution on the M images processed by the second-layer algorithm structure to obtain a convolution vector of the M images corresponding to the second-layer algorithm structure, and performs pooling processing on the convolution vector of the M images to obtain a feature information set corresponding to the second-layer algorithm structure. On the basis of the convolution processing of the M images by the third-layer algorithm structure, the fourth-layer algorithm structure continues to perform convolution on the M images processed by the third-layer algorithm structure to obtain a convolution vector of the M images corresponding to the second-layer algorithm structure, and performs pooling processing on the convolution vector of the M images to obtain a feature information set corresponding to the second-layer algorithm structure, thereby obtaining L feature information sets.

[0053] In the embodiments of the present application, the electronic device can obtain a convolution vector of each of the M images according to the convolution algorithm structure, and select a convolution vector that best expresses the feature information of each image from the convolution vectors corresponding to the image, thereby reducing the computing power consumption of the electronic device, and thus improving the efficiency of the electronic device in processing images.

[0054] In step 201b1, the electronic device performs fusion processing on the L feature information sets to obtain first feature information of the M images.

[0055] In the embodiments of the present application, after the electronic device obtains the L feature information sets through the L-layer first structure, the electronic device can perform splicing processing on the L feature information sets to obtain first feature information of the M images.

[0056] For example, in combination with Figure 3 For example, in combination with Figure 4As shown, after the electronic device obtains the four sets of feature information, the electronic device can perform splicing processing on the four sets of feature information to obtain the first feature information 17; assuming that the length of the set of feature information obtained by the first layer algorithm structure in the four-layer first algorithm structure is 16, the length of the set of feature information obtained by the second layer algorithm structure is 16, the length of the set of feature information obtained by the third layer algorithm structure is 16, and the length of the set of feature information obtained by the fourth layer algorithm structure is 176, then the length of the first feature information is 224.

[0057] In the embodiments of the present application, the electronic device can obtain a set of feature information through each layer of algorithm structure, and for L layers of algorithm structure, the electronic device can obtain L sets of feature information and perform splicing processing on the L sets of feature information to obtain the first feature information, that is, the first feature information contains the shallow feature information and the deep feature information extracted by the L layers of algorithm structure, thereby avoiding the electronic device only obtaining the deep feature information (such as semantic information) of the image and losing the shallow feature information (such as image quality information) of the image itself, so that the accuracy of the electronic device processing the image is improved.

[0058] In step 202, the electronic device processes the M images according to the first feature information of the M images through at least one second algorithm structure to obtain scores of the M images.

[0059] In the embodiments of the present application, each second algorithm structure in the at least one second algorithm structure corresponds to one image category respectively, each second algorithm structure corresponds to at least one image belonging to the same image category in the M images, and the score of each image is used to indicate the image quality of one image in the image category corresponding to the one image.

[0060] In the embodiments of the present application, the electronic device can determine the second algorithm structure matching the image category of each image from the set of preset second algorithm structures according to the first feature information of the M images, so as to score the image quality of each image through the second algorithm structure matching the image category of each image to obtain the scores of the M images.

[0061] It can be understood that each of the at least one second algorithm structure corresponds to an image category, that is, the at least one second algorithm structure has different processing manners for different categories of images. For example, assuming that the category of one of the at least one second algorithm structure is food, in the second algorithm structure, it is necessary to pay attention to whether the color temperature of the image is warm and whether the color saturation is bright. The warmer the color tone of an image in the current second algorithm structure and the brighter the color, the higher the score of the image. Assuming that the category of one of the at least one second algorithm structure is landscape, in the second algorithm structure, it is necessary to pay attention to whether the color tone of the image is cold and the sharpness. The cooler the color temperature of an image in the current second algorithm structure and the higher the sharpness, the higher the score of the image.

[0062] Optionally, in the embodiment of the present application, if the score obtained by each algorithm structure in the at least one second algorithm structure is less than the preset score, it is considered that each of the M images is of a category, so that the electronic device can combine the at least one second algorithm into one second algorithm structure.

[0063] Optionally, in the embodiment of the present application, each of the at least one second algorithm structure includes a feature weighting layer algorithm structure, a fully connected layer algorithm structure and a linear transformation layer algorithm structure. The above step 202 can be implemented by the following steps 202a to 202c.

[0064] Step 202a, the electronic device determines a second algorithm structure matching the image category of each image from the preset second algorithm structure set according to the first feature information of the M images, to obtain at least one second algorithm structure.

[0065] In the embodiment of the present application, in the case that the image category of each image matches one of the preset second algorithm structure set, the electronic device can output the image to the corresponding second algorithm structure.

[0066] Step 202b, for each of the at least one second algorithm structure, the electronic device performs weighted sum processing on the first feature information of at least one image corresponding to one second algorithm structure, the convolution vector corresponding to the Lth algorithm structure in the L-layer algorithm structure, and the feature information set corresponding to the Lth algorithm structure, to obtain a first vector.

[0067] In the embodiments of this application, for one of the at least one second algorithm structure, the electronic device can perform weighted sum processing on the first feature information of at least one image corresponding to the one second algorithm structure, the convolution vector corresponding to the Lth algorithm structure in the L-layer algorithm structure, and the feature information set corresponding to the Lth algorithm structure, to obtain a first vector corresponding to the one second algorithm structure. For each of the at least one second algorithm structure, the same processing manner is used to obtain a first vector corresponding to each second algorithm structure.

[0068] It can be understood that each second algorithm structure needs to perform weighted sum processing on the image corresponding to each second algorithm structure, so as to obtain a first vector corresponding to each second algorithm structure.

[0069] Exemplarily, after the electronic device inputs the M images into the corresponding second algorithm structure, the feature weighting layer algorithm structure of each layer of the second algorithm structure can perform 4 times of weighted sum processing on the images in the layer. The vector length of the image obtained by the first time of weighted sum processing is 112, the vector length of the image obtained by the second time of weighted sum processing is 56, the vector length of the image obtained by the third time of weighted sum processing is 28, and the vector length of the image obtained by the fourth time of weighted sum processing is 14 (i.e. the first vector). The vector obtained by each time of weighted sum processing contains the semantic feature of the image and the quality feature of the image.

[0070] In step 202c, the electronic device performs linear transformation processing on the first vector through the full connection layer algorithm structure and the linear transformation layer algorithm structure of one second algorithm structure, to obtain a score of at least one image corresponding to the one second algorithm structure, so as to obtain scores of the M images.

[0071] It can be understood that for a first second algorithm structure in the at least one second algorithm, the electronic device can output a first vector in the first second algorithm structure to a linear transformation layer through a full connection layer. The linear transformation layer can perform linear transformation processing on the first vector to obtain a score of at least one image corresponding to the first second algorithm structure. For a second second algorithm structure in the at least one second algorithm, the electronic device can output a first vector in the second second algorithm structure to a linear transformation layer through a full connection layer. The linear transformation layer can perform linear transformation processing on the first vector to obtain a score of at least one image corresponding to the second second algorithm structure. Similarly, until the last second algorithm structure obtains a score of at least one image corresponding to the last second algorithm structure, so that the electronic device can obtain scores of the M images.

[0072] Optionally, in the embodiments of this application, the linear transformation processing can include any one of the following: identity transformation, number multiplication transformation, or linear transformation, etc. The specific manner can be determined according to actual use requirements, and the embodiments of this application are not limited.

[0073] Exemplarily, as shown in the following table, for one second algorithm structure 18, the second algorithm structure includes a feature weighting layer algorithm structure 19, a full connection layer algorithm structure 20 and a linear transformation layer algorithm structure 21, the feature weighting layer algorithm structure 19 includes first feature information X of at least one image corresponding to each second algorithm structure, a convolution vector W corresponding to an Lth algorithm structure in the L-layer algorithm structure and a feature information set B corresponding to the Lth algorithm structure, so that the electronic device can obtain a first vector corresponding to the second algorithm structure according to the first feature information of at least one image corresponding to each second algorithm structure, the convolution vector corresponding to the Lth algorithm structure in the L-layer algorithm structure and the feature information set corresponding to the Lth algorithm structure, and perform linear transformation processing on the first vector through the full connection layer algorithm structure 20 and the linear transformation layer algorithm structure 21 to obtain a score 22 of at least one image corresponding to the second algorithm structure. Figure 5 Figure 5 Figure 5 Figure 5 Figure 5

[0074] In the embodiment of the present application, the electronic device can process the first feature information of at least one image corresponding to each second algorithm structure, the convolution vector corresponding to the Lth algorithm structure in the L-layer algorithm structure and the feature information set corresponding to the Lth algorithm structure through the feature weighting layer algorithm structure, the full connection layer algorithm structure and the linear transformation layer algorithm structure, so that each second algorithm structure can focus on the image features that should be emphasized under the current category, that is, different evaluation methods are used under different categories, so that the flexibility of the electronic device in processing images is improved.

[0075] In step 203, the electronic device performs image processing on the M images according to the scores of the M images.

[0076] In the embodiment of the present application, the electronic device can perform sorting, deletion or marking processing on the M images according to the scores of the M images.

[0077] It can be understood that since the scores of the M images can represent the image quality of the M images under their respective image categories, the electronic device can accurately determine whether there is an image with poor image quality in the M images through the scores of the M images, so as to facilitate the user to manage the M images.

[0078] Optionally, the above step 203 can be implemented through the following step 203a or step 203b or step 203c in the embodiment of the present application.

[0079] ​​​​​Step 203a, the electronic device sorts the M images according to the scores of the M images.

[0080] In the embodiment of the present application, the electronic device can sort the M images in a first order according to the score of each image in the M images.

[0081] Alternatively, in the embodiment of the present application, the first order can be any one of the following: sorting each image in the M images in ascending order (for example, from large to small); or sorting each image in the M images in descending order (for example, from small to large). The actual use requirements can be determined, and the embodiment of the present application is not limited.

[0082] In the embodiment of the present application, the electronic device can sort the M images according to the scores of the M images, so that the user can quickly find the image to be deleted, and thus the efficiency of the electronic device processing images is improved.

[0083] Step 203b, the electronic device deletes N images in the M images according to the scores of the M images.

[0084] In the embodiment of the present application, the N images are images in the M images whose scores are less than or equal to a preset threshold, and N is a positive integer less than or equal to M.

[0085] In the embodiment of the present application, the electronic device can delete the images in the M images whose scores are less than or equal to the preset threshold.

[0086] It can be understood that when the N images in the M images are less than or equal to the preset threshold, the electronic device can determine that the image quality of the N images is poor, and thus the electronic device can delete the N images, thereby simplifying the process of the user finding the image to be deleted.

[0087] Alternatively, in the embodiment of the present application, before the electronic device deletes the images whose scores are less than or equal to the preset threshold, the electronic device can display prompt information to the user to prompt whether the images whose scores are less than or equal to the preset threshold are deleted.

[0088] In the embodiment of the present application, the electronic device can directly delete the N images below the preset threshold, thereby avoiding the situation that when there are many images in the electronic device, the user needs to manually find the image to be deleted, which leads to the operation of the user finding the image to be deleted being tedious and time-consuming, and thus the efficiency of the electronic device processing images is improved. Step 203c, the electronic device marks K images in the M images according to the scores of the M images.

[0089] In the embodiments of the present application, the K images are images with scores less than or equal to a preset threshold in the M images, or images with scores greater than the preset threshold in the M images, and K is a positive integer less than or equal to M.

[0090] In the embodiments of the present application, the electronic device can add a target mark on the images with scores less than or equal to a preset threshold in the M images, or add the target mark on the images with scores greater than the preset threshold in the M images, to prompt the user to quickly find the images to be deleted.

[0091] Optionally, in the embodiments of the present application, the target mark can be any one of an expression mark, a text mark, a special symbol mark, a pattern mark, and the like. The specific implementation can be determined according to actual use requirements, and the embodiments of the present application are not limited.

[0092] In the embodiments of the present application, the electronic device can add a mark on at least one image with a score less than or equal to a preset threshold in the M images, that is, add a mark on an image with low image quality, to prompt the user to delete the image, or add a mark on at least one image with a score greater than the preset threshold in the M images, that is, add a mark on an image with high image quality, to prompt the user that the image is an image to be retained. In this way, when the user searches for the image to be deleted, the user can quickly determine whether to perform an image deletion operation according to the mark, thereby improving the flexibility of the electronic device in processing images. In the embodiments of the present application, the electronic device can sort, delete, or add a mark to the M images according to the scores, thereby prompting the user to quickly find the image to be deleted, and improving the efficiency of the electronic device in processing images.

[0093] The embodiments of the present application provide an image processing method. Since the electronic device can output each image in the M images to a second algorithm structure matching the image category according to the first feature information of the M images, that is, the electronic device can classify the M images according to the feature information of the M images and output each image in the M images to a second algorithm structure of a corresponding category, so that at least one second algorithm structure can process different categories of images differently according to the categories to which the M images belong, obtain scores of the M images, accurately determine the image quality of the M images according to the scores of the M images, and process the M images according to the image quality of the M images, to achieve accurate and effective management of the M images, thereby avoiding the user from sequentially searching for the image to be processed in the gallery application of the electronic device, and avoiding the user from performing tedious and time-consuming operations to search for the image to be processed. Therefore, the scheme of the present application improves the flexibility and efficiency of the electronic device in processing images.

[0094] Optionally, before the step 201, the image processing method provided in the embodiment of the present application further includes the following steps 401-403.

[0095] In step 401, the electronic device performs feature extraction processing on the group of images of the target category by using a preset multi-head regression model to obtain feature information of the group of images.

[0096] In the embodiment of the present application, the group of images includes reference images, negative example images, and positive example images.

[0097] In the embodiment of the present application, the electronic device can perform convolution and pooling processing on the group of images of the target category to obtain the feature information of the group of images.

[0098] Optionally, in the embodiment of the present application, the electronic device can perform image recognition processing on the group of images of the target category by using an artificial intelligence (AI) image recognition to obtain the feature information of the group of images.

[0099] Optionally, in the embodiment of the present application, the target category can be any one of the following: a food category, a human culture category, a scenery category, or an animal category, etc. The specific category can be determined according to actual use requirements, and the embodiment of the present application does not make any limitation.

[0100] Optionally, in the embodiment of the present application, the negative example image can be an image deleted by a user in a group of similar images, or an image that does not belong to the same category as the reference image.

[0101] Optionally, in the embodiment of the present application, the positive example image can be an image retained by a user in a group of similar images, or an image that belongs to the same category as the reference image.

[0102] In step 402, the electronic device performs weighting and processing on the feature information of each image in the group of images by using the preset multi-head regression model to obtain a score of the group of images.

[0103] In the embodiment of the present application, the electronic device can perform weighting and processing on the feature information of each image in the group of images by using a feature weighting layer algorithm structure to obtain a first vector, and output the first vector to a linear transformation layer algorithm structure by using a fully connected layer algorithm structure. The linear transformation layer algorithm structure can perform linear transformation processing on the first vector to obtain the score of the group of images.

[0104] In step 403, the electronic device optimizes the score of the negative example image in the group of images and the score of the reference image, and optimizes the score of the positive example image in the group of images and the score of the reference image by using the preset loss function, updates the parameters in the preset multi-head regression model, and obtains the second algorithm structure corresponding to the target category.

[0105] In the embodiments of the present application, after the loss function is determined by the loss function algorithm, the electronic device can train the parameters of the multi-head regression model. When a group of images (reference images, positive example images, and negative example images) with target category labels are input, the scores corresponding to the reference images, the positive example images, and the negative example images are obtained. The optimization target is to narrow the gap between the reference images and the positive example images, and to widen the gap between the reference images and the negative example images. Based on the optimizer carrying the loss function, the parameters in the multi-head regression model are updated by backward propagation of the parameters, so as to obtain the second algorithm structure corresponding to the target category.

[0106] In the embodiments of the present application, the preset loss function algorithm is specifically:

[0107]

[0108] wherein, L q is the preset loss function, q is the reference image, k + is the positive example image of q, k i is the negative example image of q, the numerator calculates the dot product between the reference image and the positive example image, and the denominator calculates the dot product between the reference image and the negative example.

[0109] It should be noted that the value of the numerator in the above preset loss function algorithm is greater than the value of the denominator, that is, the score part is greater, that is, the value after the-log transformation is smaller.

[0110] Optionally, in the embodiments of the present application, the electronic device updating the parameters in the multi-head regression model includes at least one of the following: convolution parameters, weighted sum parameters, fully connected layer parameters, and linear transformation layer parameters.

[0111] Optionally, in the embodiments of the present application, the above optimizer can be any one of the following: an adam optimizer, a Keras optimizer, or a Momentum optimizer. The specific selection can be determined according to actual use requirements, and the embodiments of the present application are not limited.

[0112] In the embodiments of the present application, the electronic device can fine-tune the multi-head regression model through the user's deletion behavior. The images selected by the user to be retained are input as positive examples into the corresponding regression head, and the images deleted by the user are input as negative examples into the corresponding regression head. The difference between the reference image, the positive example image, and the negative example image is adjusted through a preset loss function, so as to adjust the parameters in the multi-head regression model to obtain a second algorithm structure corresponding to the target category. In this way, the comparative learning focuses on learning the common characteristics between the same images and the differences between the different images. It is not necessary to consider the cumbersome details in the related images, but only to learn to distinguish the images at the abstract semantic level. Therefore, the electronic device can optimize the multi-head regression model more simply, and at the same time, the learning ability of the second algorithm structure is strengthened and the generalization ability of the multi-head regression model is improved. In this way, the accuracy of the electronic device in processing images is improved.

[0113] It should be noted that the image processing method provided in the embodiments of the present application can be executed by an image processing device. In the embodiments of the present application, the image processing device is taken as an example to execute the image processing method, and the image processing device provided in the embodiments of the present application is described.

[0114] Figure 6 A possible structure schematic diagram of the image processing device involved in the embodiments of the present application is shown. As shown in the figure, Figure 6 The image processing device 70 can include an acquisition module 71 and a processing module 72.

[0115] The acquisition module 71 is configured to acquire first feature information of M images, and the first feature information of each image is used to indicate an image category to which the image belongs, and M is a positive integer. The processing module 72 is configured to process the M images by at least one second algorithm structure according to the first feature information of the M images, obtain scores of the M images, each second algorithm structure corresponds to an image category, each second algorithm structure corresponds to at least one image belonging to the same image category in the M images, and each score of the image is used to indicate the image quality of the image in the image category corresponding to the image; and perform image processing on the M images according to the scores of the M images.

[0116] In a possible implementation, the acquisition module 71 is specifically configured to acquire the first feature information of the M images in the electronic device by the first algorithm structure.

[0117] In a possible implementation, the first algorithm structure includes an L-layer algorithm structure, L being an integer greater than 1; the obtaining module 71 is specifically configured to sequentially perform feature extraction on each of the M images by the L-layer algorithm structure, to obtain L sets of feature information, the L-layer algorithm structure corresponding to the L sets of feature information in a one-to-one manner, each set of feature information including second feature information of the M images and the second feature information of the M images included in each set of feature information being different; and perform fusion processing on the L sets of feature information, to obtain the first feature information of the M images.

[0118] In a possible implementation, each algorithm structure in the L-layer algorithm structure includes a convolution algorithm structure and a pooling algorithm structure. The obtaining module 71 is specifically configured to, for each algorithm structure in the L-layer algorithm structure, perform convolution processing on each of the M images by the convolution algorithm structure of the algorithm structure, to obtain M convolution vectors; and perform pooling processing on the M convolution vectors by the pooling algorithm structure of the algorithm structure, to obtain a set of feature information corresponding to the algorithm structure, to obtain the L sets of feature information.

[0119] In a possible implementation, each second algorithm structure in the at least first second algorithm structure includes a feature weighting layer algorithm structure, a fully connected layer algorithm structure, and a linear transformation layer algorithm structure; the obtaining module 71 is specifically configured to determine, according to the first feature information of the M images, a second algorithm structure matching the image category of each image from the preset set of second algorithm structures, to obtain the at least one second algorithm structure; and for each second algorithm structure in the at least one second algorithm structure, perform weighted sum processing on the first feature information of at least one image corresponding to the second algorithm structure, the convolution vector corresponding to the Lth algorithm structure in the L-layer algorithm structure, and the set of feature information corresponding to the Lth algorithm structure by the feature weighting layer algorithm structure of the second algorithm structure, to obtain a first vector; and perform linear transformation processing on the first vector by the fully connected layer algorithm structure and the linear transformation layer algorithm structure of the second algorithm structure, to obtain a score of the at least one image corresponding to the second algorithm structure, to obtain the scores of the M images.

[0120] In a possible implementation, the processing module 72 is specifically configured to sort the M images according to the sizes of the scores of the M images, or delete N images from the M images according to the scores of the M images, the N images being images with scores less than or equal to a preset threshold in the M images, and N being a positive integer less than or equal to M, or mark K images from the M images according to the scores of the M images, the K images being images with scores less than or equal to the preset threshold in the M images, or images with scores greater than the preset threshold in the M images, and K being a positive integer less than or equal to M.

[0121] In a possible implementation, before the obtaining module 71 obtains the first feature information of the M images in the electronic device by using the first algorithm structure, the image processing apparatus 70 provided in the embodiment of the present application further includes an extracting module and an updating module. The extracting module is configured to perform feature extraction processing on a group of images of a target category by using a preset multi-head regression model, to obtain feature information of the group of images, the group of images including a reference image, a negative example image, and a positive example image. The processing module 72 is further configured to perform weighting and processing on the feature information of each image in the group of images by using the preset multi-head regression model, to obtain scores of the group of images. The updating module is configured to perform optimization processing on the score of the negative example image and the score of the reference image in the group of images by using a preset loss function, and perform optimization processing on the score of the positive example image and the score of the reference image in the group of images, to update parameters in the preset multi-head regression model, to obtain a second algorithm structure corresponding to the target category.

[0122] The image processing apparatus provided in the embodiment of the present application can output each of the M images to the second algorithm structure matching the category of the image according to the first feature information of the M images, that is, the image processing apparatus can classify the M images according to the feature information of the M images, and output each of the M images to the second algorithm structure corresponding to the category, so that at least one second algorithm structure can perform different processing on images of different categories according to the categories to which the M images belong, to obtain scores of the M images, to accurately determine the image quality of the M images according to the scores of the M images, and thus process the M images according to the image quality of the M images, to achieve accurate and effective management of the M images, and avoid the need for the user to sequentially search for pictures requiring processing from the gallery application of the image processing apparatus, which leads to tedious and time-consuming operations of the user to search for pictures requiring processing. Therefore, the scheme of the present application improves the flexibility and efficiency of the image processing apparatus in image processing.

[0123] The image processing apparatus in the embodiments of the present application can be an apparatus, or a component, an integrated circuit, or a chip in an electronic device. The apparatus can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The present application is not limited in this regard.

[0124] The image processing apparatus in the embodiments of the present application can be an apparatus with an operating system. The operating system can be an Android operating system, an ios operating system, or other possible operating systems, and the present application is not limited in this regard.

[0125] The image processing apparatus provided in the embodiments of the present application can implement the method embodiments, and each process of the method embodiments is not repeated here to avoid repetition. Figures 1 to 6 The image processing apparatus provided in the embodiments of the present application can implement the method embodiments, and each process of the method embodiments is not repeated here to avoid repetition.

[0126] Optionally, as shown in Figure 7 The present application also provides an electronic device 90, which includes a processor 91 and a memory 92, and the memory 92 stores programs or instructions executable on the processor 91. When the programs or instructions are executed by the processor 91, each step of the above-mentioned image processing method embodiments is implemented, and the same technical effects are achieved. To avoid repetition, each step is not repeated here.

[0127] It should be noted that the electronic device in the embodiments of the present application includes the above-mentioned mobile electronic device and non-mobile electronic device.

[0128] Figure 8 To implement the hardware structure of an electronic device according to an embodiment of the present application.

[0129] The electronic device 100 includes, but is not limited to, a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110, etc.

[0130] Those skilled in the art can understand that the electronic device 100 can also include a power supply (such as a battery) for powering various components, which can be logically connected to the processor 110 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than shown, or combine certain components, or different component arrangements, which will not be described here.

[0131] The processor 110 is configured to obtain first feature information of M images, the first feature information of each image being used to indicate an image category to which the image belongs, M being a positive integer; and process the M images according to the first feature information of the M images through at least one second algorithm structure to obtain scores of the M images, each second algorithm structure corresponding to an image category, each second algorithm structure corresponding to at least one image belonging to the same image category in the M images, and the score of each image being used to indicate image quality of the image in the image category corresponding to the image; and perform image processing on the M images according to the scores of the M images.

[0132] The electronic device provided in the embodiments of the present application can output each image in the M images to the second algorithm structure matching the image category according to the first feature information of the M images, that is, the electronic device can classify the M images according to the feature information of the M images and output each image in the M images to the second algorithm structure of the corresponding category, so that the at least one second algorithm structure can perform different processing on images of different categories according to the categories to which the M images belong, obtain scores of the M images, accurately determine the image quality of the M images according to the scores of the M images, and perform processing on the M images according to the image quality of the M images, so as to realize accurate and effective management of the M images, avoid the user from sequentially searching for the pictures requiring processing from the gallery application of the electronic device, and thus avoid the user from performing tedious and time-consuming operations to search for the pictures requiring processing. Therefore, the scheme of the present application improves the flexibility and efficiency of the electronic device in processing images.

[0133] Optionally, in the embodiments of the present application, the processor 110 is specifically configured to obtain the first feature information of the M images in the electronic device through the first algorithm structure.

[0134] Optionally, in the embodiments of the present application, the first algorithm structure comprises an L-layer algorithm structure, L being an integer greater than 1. The processor 110 is specifically configured to sequentially perform feature extraction on each of the M images through the L-layer algorithm structure to obtain L sets of feature information, the L-layer algorithm structure corresponding to the L sets of feature information in a one-to-one manner, each set of feature information comprising second feature information of the M images and each set of feature information comprising different second feature information of the M images; and perform fusion processing on the L sets of feature information to obtain the first feature information of the M images.

[0135] Optionally, in the embodiments of the present application, each layer of the algorithm structure comprises a convolution algorithm structure and a pooling algorithm structure. The processor 110 is specifically configured to, for each layer of the algorithm structure in the L-layer algorithm structure, perform convolution processing on each of the M images through the convolution algorithm structure of the layer of the algorithm structure to obtain M convolution vectors; and perform pooling processing on the M convolution vectors through the pooling algorithm structure of the layer of the algorithm structure to obtain a set of feature information corresponding to the layer of the algorithm structure, so as to obtain the L sets of feature information.

[0136] Optionally, in the embodiments of the present application, each second algorithm structure comprises a feature weighting layer algorithm structure, a fully connected layer algorithm structure and a linear transformation layer algorithm structure. The processor 110 is specifically configured to determine, according to the first feature information of the M images, a second algorithm structure matching the image category of each image from the preset second algorithm structure set to obtain at least one second algorithm structure; and for each second algorithm structure in the at least one second algorithm structure, perform weighted sum processing on the first feature information of at least one image corresponding to the second algorithm structure, the convolution vector corresponding to the Lth layer of the algorithm structure in the L-layer algorithm structure and the set of feature information corresponding to the Lth layer of the algorithm structure through the feature weighting layer algorithm structure of the second algorithm structure to obtain a first vector; and perform linear transformation processing on the first vector through the fully connected layer algorithm structure and the linear transformation layer algorithm structure of the second algorithm structure to obtain a score of at least one image corresponding to the second algorithm structure, so as to obtain the scores of the M images.

[0137] Optionally, in the embodiments of the present application, the processor 110 is specifically configured to sort the M images according to the sizes of the scores of the M images; or delete N images in the M images according to the scores of the M images, the N images being images in the M images whose scores are less than or equal to a preset threshold, N being a positive integer less than or equal to M; or mark K images in the M images according to the scores of the M images, the K images being images in the M images whose scores are less than or equal to a preset threshold or images in the M images whose scores are greater than the preset threshold, K being a positive integer less than or equal to M.

[0138] Optionally, in the embodiment of the present application, the processor 110 is further configured to, before obtaining the first feature information of the M images in the electronic device through the first algorithm structure, perform feature extraction processing on a group of images of the target category through a preset multi-head regression model to obtain feature information of the group of images, the group of images including a reference image, a negative example image and a positive example image; perform weighting and processing on the feature information of each image in the group of images through the preset multi-head regression model to obtain scores of the group of images; and perform optimization processing on the score of the negative example image and the score of the reference image in the group of images through a preset loss function, and perform optimization processing on the score of the positive example image and the score of the reference image in the group of images to update parameters in the preset multi-head regression model to obtain a second algorithm structure corresponding to the target category.

[0139] The electronic device provided in the embodiment of the present application can realize each process realized by the method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.

[0140] The beneficial effects of various implementation manners in the embodiment can refer to the beneficial effects of the corresponding implementation manners in the method embodiments, and details are not described herein to avoid repetition.

[0141] It should be understood that, in the embodiment of the present application, the input unit 104 can include a graphics processing unit (GPU) 1041 and a microphone 1042. The graphics processing unit 1041 processes image data of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 can include a display panel 1061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 can include a touch detection device and a touch controller. The other input devices 1072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), a trackball, a mouse, a joystick, and the like, which are not described herein.

[0142] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 109 can include a volatile memory or a non-volatile memory, or the memory 109 can include both a volatile memory and a non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 109 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.

[0143] The processor 110 can include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 110.

[0144] The embodiments of the present application also provide a readable storage medium, the readable storage medium stores programs or instructions, the programs or instructions are executed by a processor to realize various processes of the above-mentioned method embodiments, and the same technical effects can be achieved. To avoid repetition, details are not described here.

[0145] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0146] The embodiment of the present application further provides a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions, realizes various processes of the above method embodiments, and can achieve the same technical effects. To avoid repetition, details are not described here.

[0147] It should be understood that the chip mentioned in the embodiment of the present application can also be referred to as a system level chip, a system chip, a chip system or a system on chip, etc.

[0148] The embodiment of the present application provides a computer program product, which is stored in a storage medium, and is executed by at least one processor to realize various processes of the above image processing method embodiments and can achieve the same technical effects. To avoid repetition, details are not described here.

[0149] It should be noted that in this paper, the term "include", "contain" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to the order of the functions shown or discussed, but can also include the functions performed in a substantially simultaneous manner or in the opposite order according to the functions involved, for example, the described method can be performed in an order different from the described order, and various steps can also be added, omitted or combined. In addition, the features described with reference to some examples can be combined in other examples.

[0150] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned example methods can be realized by means of software and a necessary general hardware platform, and of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a computer software product in essence or in the form of a part that contributes to the prior art, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.

[0151] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative and not restrictive. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.

Claims

1. An image processing method, characterized by, The method comprises: obtaining first feature information of M images, the first feature information of each image being used for indicating an image category to which the image belongs, M being a positive integer; processing the M images according to the first feature information of the M images through at least one second algorithm structure, each second algorithm structure corresponding to an image category, each second algorithm structure corresponding to at least one image belonging to the same image category in the M images, and a score of each image being used for indicating image quality of the image in the image category corresponding to the image; performing image processing on the M images according to the scores of the M images; each second algorithm structure comprises a feature weighting layer algorithm structure, a fully connected layer algorithm structure and a linear transformation layer algorithm structure; the processing of the M images according to the first feature information of the M images through at least one second algorithm structure comprises: determining, according to the first feature information of the M images, a second algorithm structure matching the image category of each image from a preset second algorithm structure set to obtain the at least one second algorithm structure; for each second algorithm structure in the at least one second algorithm structure, performing weighting and processing on the first feature information of at least one image corresponding to the second algorithm structure, a convolution vector corresponding to an Lth algorithm structure in L algorithm structures and a feature information set corresponding to the Lth algorithm structure through the feature weighting layer algorithm structure of the second algorithm structure to obtain a first vector, the first feature information being obtained by fusion processing on L feature information sets, the L feature information sets being obtained by feature extraction on the M images through the L algorithm structures; performing linear transformation processing on the first vector through the fully connected layer algorithm structure and the linear transformation layer algorithm structure of the second algorithm structure to obtain a score of at least one image corresponding to the second algorithm structure, so as to obtain the scores of the M images.

2. The method of claim 1, wherein, the obtaining of the first feature information of the M images comprises: performing feature extraction on each of the M images through the L algorithm structures in sequence to obtain L feature information sets, the L algorithm structures corresponding to the L feature information sets in a one-to-one manner, each feature information set comprising second feature information of the M images and the second feature information of the M images comprised in each feature information set being different; performing fusion processing on the L feature information sets to obtain the first feature information of the M images.

3. The method of claim 2, wherein, each algorithm structure comprises a convolution algorithm structure and a pooling algorithm structure; the performing of feature extraction on each of the M images through the L algorithm structures comprises: for each algorithm structure in the L algorithm structures, performing convolution processing on each of the M images through a convolution algorithm structure of the algorithm structure to obtain M convolution vectors; The M convolution vectors are processed by a pooling algorithm structure of the one-layer algorithm structure to obtain one feature information set corresponding to the one-layer algorithm structure, so as to obtain the L feature information sets.

4. The method of claim 1, wherein, The image processing of the M images according to the scores of the M images comprises: The M images are sorted according to the sizes of the scores of the M images; Or, According to the scores of the M images, N images in the M images are deleted, the N images are images with scores less than or equal to a preset threshold in the M images, and N is a positive integer less than or equal to M; Or, According to the scores of the M images, K images in the M images are marked, the K images are images with scores less than or equal to a preset threshold in the M images, or images with scores greater than a preset threshold in the M images, and K is a positive integer less than or equal to M.

5. The method of claim 1, wherein, Before the first feature information of the M images is obtained, the method further comprises: A set of images of a target category are processed by a preset multi-head regression model to obtain feature information of the set of images, the set of images comprising a reference image, a negative example image and a positive example image; The feature information of each image in the set of images is processed by the preset multi-head regression model to obtain scores of the set of images; The scores of the negative example image and the scores of the reference image in the set of images are optimized by a preset loss function, and the scores of the positive example image and the scores of the reference image in the set of images are optimized to update parameters in the preset multi-head regression model to obtain a second algorithm structure corresponding to the target category.

6. An image processing apparatus characterized by comprising: The image processing device comprises an acquisition module and a processing module. The acquisition module is configured to acquire first feature information of M images, the first feature information of each image being used to indicate an image category to which the image belongs, and M being a positive integer. The processing module is configured to process the M images by at least one second algorithm structure according to the first feature information of the M images to obtain scores of the M images, each second algorithm structure corresponding to an image category, each second algorithm structure corresponding to at least one image belonging to the same image category in the M images, and each score of an image being used to indicate image quality of the image in the image category corresponding to the image, and to process the M images according to the scores of the M images. Each second algorithm structure comprises a feature weighting layer algorithm structure, a fully connected layer algorithm structure and a linear transformation layer algorithm structure. The processing module is specifically configured to determine, according to the first feature information of the M images, a second algorithm structure matched with the image category of each image from a preset second algorithm structure set respectively, to obtain the at least one second algorithm structure; and for each second algorithm structure in the at least one second algorithm structure, perform weighting and processing on the first feature information of at least one image corresponding to one second algorithm structure, a convolution vector corresponding to an Lth algorithm structure in the L-layer algorithm structure, and a feature information set corresponding to the Lth algorithm structure by a feature weighting layer algorithm structure of the one second algorithm structure, to obtain a first vector; the first feature information is obtained by fusion processing on L feature information sets, and the L feature information sets are obtained by feature extraction on the M images by the L-layer algorithm structure; and perform linear transformation processing on the first vector by a full connection layer algorithm structure and a linear transformation layer algorithm structure of the one second algorithm structure, to obtain a score of at least one image corresponding to the one second algorithm structure, to obtain the scores of the M images.

7. The apparatus of claim 6, wherein, The acquisition module is specifically configured to sequentially perform feature extraction on each image in the M images by the L-layer algorithm structure, to obtain L feature information sets, the L-layer algorithm structure is in one-to-one correspondence with the L feature information sets, each feature information set includes second feature information of the M images, and the second feature information of the M images included in each feature information set is different; and perform fusion processing on the L feature information sets, to obtain first feature information of the M images.

8. The apparatus of claim 7, wherein, Each layer algorithm structure includes a convolution algorithm structure and a pooling algorithm structure; The acquisition module is specifically configured to, for each layer algorithm structure in the L-layer algorithm structure, perform convolution processing on each image in the M images by a convolution algorithm structure of one layer algorithm structure, to obtain M convolution vectors; and perform pooling processing on the M convolution vectors by a pooling algorithm structure of the one layer algorithm structure, to obtain one feature information set corresponding to the one layer algorithm structure, to obtain the L feature information sets.

9. The apparatus of claim 6, wherein, The processing module is specifically configured to sort the M images according to the sizes of the scores of the M images; or delete N images in the M images according to the scores of the M images, the N images are images in the M images with scores less than or equal to a preset threshold, and N is a positive integer less than or equal to M; Or, mark K images in the M images according to the scores of the M images, the K images are images in the M images with scores less than or equal to a preset threshold, or images in the M images with scores greater than the preset threshold, and K is a positive integer less than or equal to M.

10. The apparatus of claim 6, wherein, Before the acquisition module acquires the first feature information of the M images, the image processing device further includes an extraction module and an update module; The extraction module is configured to perform feature extraction processing on a group of images of the target category by using a preset multi-head regression model to obtain feature information of the group of images, the group of images including a reference image, a negative example image, and a positive example image. The processing module is further configured to perform weighting and processing on the feature information of each image in the group of images by using the preset multi-head regression model to obtain scores of the group of images. The updating module is configured to perform optimization processing on the score of the negative example image and the score of the reference image in the group of images and perform optimization processing on the score of the positive example image and the score of the reference image in the group of images by using a preset loss function to update parameters in the preset multi-head regression model to obtain a second algorithm structure corresponding to the target category.

11. An electronic device, comprising: A processor, a memory, and a program or instructions stored on the memory and executable on the processor are included, and the program or instructions are executed by the processor to implement the steps of the image processing method according to any one of claims 1 to 5.

12. A readable storage medium, characterized by, A program or instructions are stored on the readable storage medium, and the program or instructions are executed by the processor to implement the steps of the image processing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Quality evaluation method, and quality evaluation model training method and device

    CN112950580A

  • Image processing method and device, electronic equipment and storage medium

    CN113762032A