Image aesthetic quality evaluation method, device, storage medium and electronic device
By obtaining and standardizing the center coordinates of the image object, and searching for the score in the aesthetic quality evaluation table, the problem of high complexity of image aesthetic quality evaluation in the existing technology is solved, and the reliability and practicality of the evaluation are improved.
Patent Information
- Application Number
- CN202111085107.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-16
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-09-16
AI Technical Summary
The existing image aesthetic quality evaluation algorithms are highly complex and difficult to effectively evaluate the image aesthetic quality in daily life scenarios in practical applications. Moreover, the existing data sets are small in size or the scores are not comprehensive, making it difficult to meet actual needs.
By obtaining the object center coordinates of the target image, standardizing them, and searching for the corresponding score in the pre-generated aesthetic quality evaluation table, the image aesthetic quality evaluation process is simplified.
It reduces the complexity of image aesthetic quality evaluation, improves the reliability and practicality of the evaluation, and can quickly obtain the aesthetic quality score of the image.
Smart Images

Figure CN113838017B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to an image aesthetic quality evaluation method, device, storage medium and electronic device. Background Art
[0002] The aesthetic quality of an image is an important indicator for evaluating the visual appeal of an image. In addition to factors such as color and lighting, the position of objects in the image and their spatial relationships, that is, the composition of the image, also play an important role in evaluating the visual appeal of an image. If the shape and color of the object are kept intact and only its spatial position is changed, the aesthetic quality of the image will also change greatly. Summary of the invention
[0003] The embodiments of the present application provide a method, device, storage medium and electronic device for evaluating the aesthetic quality of an image, which reduces the complexity of estimating the aesthetic quality of an image and improves the reliability and practicality of evaluating the aesthetic quality of an image. The technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides a method for evaluating image aesthetic quality, the method comprising:
[0005] Get the object center coordinates of the target image;
[0006] Determining the standardized coordinates corresponding to the center coordinates of the object based on the first length and width of the target image and the second length and width of the pre-generated aesthetic quality evaluation table;
[0007] The aesthetic quality score corresponding to the target image is searched in the aesthetic quality evaluation table based on the standardized coordinates, and the aesthetic quality evaluation table includes an aesthetic quality score corresponding to at least one standardized coordinate.
[0008] In a second aspect, an embodiment of the present application provides an image aesthetic quality evaluation device, the device comprising:
[0009] An object coordinate acquisition module is used to obtain the object center coordinates of the target image;
[0010] An object coordinate standardization module, used to determine the standardized coordinates corresponding to the center coordinates of the object based on the first length and width of the target image and the second length and width of the pre-generated aesthetic quality evaluation table;
[0011] A score search module is used to search the aesthetic quality score corresponding to the target image in the aesthetic quality evaluation table based on the standardized coordinates, wherein the aesthetic quality evaluation table includes an aesthetic quality score corresponding to at least one standardized coordinate.
[0012] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0013] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0014] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0015] According to the embodiment of the present application, since the pre-generated aesthetic quality evaluation table includes at least one aesthetic quality score corresponding to a standardized coordinate, the aesthetic quality score of the target image can be found in the aesthetic quality evaluation table by converting the object center coordinates of the target image into standardized coordinates, thereby reducing the complexity of estimating the aesthetic quality of the image and improving the reliability and practicality of aesthetic quality evaluation of the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 This is a system architecture diagram of an image aesthetic quality evaluation method provided in an embodiment of the present application;
[0018] Figure 2 It is a flowchart of an image aesthetic quality evaluation method provided in an embodiment of the present application;
[0019] Figure 3 is an example schematic diagram of identifying a target object in a target image provided by an embodiment of the present application;
[0020] Figure 4 is an example schematic diagram of a coordinate axis of a frame provided in an embodiment of the present application;
[0021] Figure 5 It is a flowchart of an image aesthetic quality evaluation method provided in an embodiment of the present application;
[0022] Figure 6 is an example schematic diagram of selecting a target object in a target image provided by an embodiment of the present application;
[0023] Figure 7is a structural schematic diagram of an image aesthetic quality evaluation device provided in an embodiment of the present application;
[0024] Figure 8 is a structural schematic diagram of an image aesthetic quality evaluation device provided in an embodiment of the present application;
[0025] Fig. 9 It is a structural diagram of an evaluation form generation module provided in an embodiment of the present application;
[0026] Fig.10 It is a structural schematic diagram of an evaluation table generating unit provided in an embodiment of the present application;
[0027] Fig.11 is a structural diagram of a sample coordinate acquisition module provided in an embodiment of the present application;
[0028] Fig.12 is a structural schematic diagram of an image deletion unit provided in an embodiment of the present application;
[0029] Fig.13 is a structural diagram of a sample coordinate acquisition module provided in an embodiment of the present application;
[0030] Fig.14 is a structural schematic diagram of an object coordinate acquisition module provided in an embodiment of the present application;
[0031] Fig.15 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0033] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0034] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0035] Existing algorithms for evaluating the visual attractiveness of images can be divided into two categories: traditional algorithms and deep learning algorithms, depending on the feature extraction method.
[0036] Traditional algorithms use photographic rules and manually designed features to evaluate images, but they are limited by expert knowledge and the ability to express features. Even some photographic knowledge is difficult to express mathematically.
[0037] Deep learning algorithms use deep learning technology to learn aesthetic features from data sets and evaluate images. Deep learning algorithms have more advantages than traditional algorithms, but current open source data training cannot meet the requirements. On the one hand, the existing data sets that only evaluate composition are relatively small in size and cannot meet the needs of practical applications, while large aesthetic data sets are scored comprehensively rather than only for image composition; on the other hand, most of the images in the data sets are taken by photographers, and the shooting scenes are more out of touch with daily life. It is difficult to apply these data for training to daily life. These two problems make it difficult for deep learning algorithms to meet the needs of practical applications.
[0038] Based on this, an embodiment of the present application provides a method for evaluating image aesthetic quality. The aesthetic quality score of the target image can be obtained by directly obtaining the object center coordinates of the target image and standardizing the object center coordinates. Then, the score in the coordinates corresponding to the standardized coordinates is searched in a pre-generated aesthetic quality evaluation table, thereby improving the reliability and practicality of image aesthetic quality evaluation.
[0039] The present application is described in detail below with reference to specific embodiments.
[0040] See also Figure 1, is a system architecture diagram of an image aesthetic quality evaluation method provided in an embodiment of the present application. It includes a target image, a target image with standardized coordinates, and an aesthetic quality evaluation table. The target image is an image that the user wants to evaluate the aesthetic quality of, the target image with standardized coordinates is a target image with the object center coordinates calculated and standardized, and the aesthetic quality evaluation table is a table recording the scores corresponding to each standardized coordinate.
[0041] When evaluating the aesthetic quality of a target image, an object recognition algorithm is first used to identify the target object in the image, and the target object is marked with a bounding box. The object center coordinates of the target object are calculated and standardized, and finally the corresponding aesthetic quality score is found in the aesthetic quality evaluation table based on the standardized coordinates.
[0042] The above method obtains the aesthetic quality score of the target image by looking up the coordinates corresponding to the standardized coordinates of the target image in the aesthetic quality evaluation table, and converts the aesthetic quality evaluation process of the target image into a table lookup process, thereby improving the reliability and practicality of aesthetic quality evaluation of the image.
[0043] The above method can be run on an image aesthetic quality evaluation device, which can be a mobile terminal, including but not limited to: a smart interactive tablet, a personal computer, a tablet computer, a handheld device, a computing device or other processing device connected to a wireless modem, etc. In different networks, the user terminal can be called different names, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), 5G network or terminal equipment in future evolution network, etc.
[0044] See also Figure 2 , is a flow chart of an image aesthetic quality evaluation method provided in an embodiment of the present application. The present application embodiment is described by taking a mobile terminal as an example, and the image aesthetic quality evaluation method may include the following steps:
[0045] S101, obtaining the object center coordinates of the target image;
[0046] The object recognition algorithm is used to identify whether there is a target object in the target image. If the target object is recognized, the object center coordinates of the target object are further obtained. The target image can be any image that the user wants to evaluate the aesthetic quality, and the size and content of the target image are not limited. For example, the image size can be 1920*1080, or 720*540, etc. The target object can be any object, such as a portrait, an animal, a book, etc.
[0047] In order to obtain the object center coordinates, a feasible method is to mark the target object with a frame, so that only the center coordinates of the frame need to be calculated and the center coordinates of the frame can be used as the object center coordinates. The object center coordinates can be the coordinates of the intersection of the horizontal midline and the vertical midpoint line of the target object.
[0048] Specifically, a feasible method is as follows Figure 3 As shown, the target object in the target image is identified by an object recognition algorithm, a frame is used to mark the target object, and based on a vertex coordinate of the frame (such as the coordinates (x, y) of the upper left corner), the horizontal side length w of the frame, and the vertical side length h of the frame, the center coordinates (c1, c2) of the frame are calculated as the center coordinates of the object. The frame is not limited to a rectangular frame, and a circular, triangular, or other shaped frame may also be used.
[0049] To calculate the center coordinates of the border, a feasible method is to use formula (1) to calculate the center coordinates of the border. If the border is Figure 4 In the coordinate axis shown, the coordinates of the border are (x, y), x is the horizontal coordinate of the upper left corner of the border, y is the vertical coordinate of the upper left corner of the border, w is the horizontal length of the border, h is the vertical length of the border, and the coordinates of the center of the object are (c1, c2).
[0050]
[0051] S102, determining the standardized coordinates corresponding to the center coordinates of the object based on the first length and width of the target image and the second length and width of the pre-generated aesthetic quality evaluation table;
[0052] After determining the first length and width of the target image and the second length and width of the pre-generated aesthetic quality evaluation table, the center coordinates of the object are converted into standardized coordinates based on the ratio of the first length and width to the second length and width, that is, the center coordinates of the object are converted into coordinates under another size to obtain corresponding standardized coordinates.
[0053] One feasible method is to use formula (2) to standardize the object center coordinates. For example, if the first length and width of the target image is 1920*1080, the second length and width of the aesthetic quality evaluation table is 255*255, and the object center coordinates are (294, 216), then the standardized coordinates are (51, 51).
[0054]
[0055] Among them, c1, c2 are the horizontal and vertical coordinates of the object center coordinates, W, H are the length and width of the target image, K, L are the length and width of the aesthetic quality evaluation table, that is, the number of rows and columns, c′1, c′2 are the horizontal and vertical coordinates of the standardized coordinates, respectively.
[0056] Among them, the standardized coordinates can be coordinates adapted to the aesthetic quality evaluation table, and each standardized coordinate can find the corresponding coordinate in the aesthetic quality evaluation table. After the center coordinates of the object are converted into standardized coordinates, the corresponding coordinates can be found in the aesthetic quality evaluation table, and then the data in the standardized coordinates can be obtained.
[0057] Among them, the first length and width of the target image can be the length and width of the target image itself, for example, the first length and width can be 1920*1080, 720*540, which is based on the actual length and width of the target image and is not limited in the embodiment of the present application.
[0058] Among them, the second length and width of the aesthetic quality evaluation table can be the length and width of the aesthetic quality evaluation table. For example, the second length and width can be 255*255, which means that the aesthetic quality evaluation table has 255 rows and 255 columns. The second length and width are not limited and can be adjusted in the process of pre-generating the aesthetic quality evaluation table.
[0059] Among them, the aesthetic quality evaluation table can be a pre-generated table, in which the scores corresponding to each coordinate are filled. For example, the score corresponding to the coordinate (1, 1) in the table is 0.2, the score corresponding to the coordinate (2, 2) is 0.7, the score corresponding to the coordinate (2, 3) is 0.6, and the remaining coordinates are all 0. Then the aesthetic quality evaluation table is a table as shown in Table 1.
[0060] Table 1
[0061] 0.2 0 0 … 0 0.7 0 … 0 0.6 0 … … … … …
[0062] S103, searching, in the aesthetic quality evaluation table based on the standardized coordinates, for an aesthetic quality score corresponding to the target image, wherein the aesthetic quality evaluation table includes an aesthetic quality score corresponding to at least one standardized coordinate;
[0063] After obtaining the standardized coordinates of the target image, the corresponding coordinates are found in the aesthetic quality evaluation table based on the standardized coordinates, and then the scores corresponding to the coordinates are obtained. The obtained scores are the aesthetic quality scores of the target image.
[0064] For example, the aesthetic quality evaluation table is shown in Table 2. The standardized coordinates of the target image are (2, 2). Then, find the coordinate (2, 2), that is, the position of the 2nd row and the 2nd column, in the aesthetic quality evaluation table, and obtain the score of 0.8 for the coordinate. Then, the aesthetic quality score of the target image is 0.8.
[0065] It should be noted that when comparing the aesthetic quality evaluation of images, the comparison is based on the ranking of the scores, so there is no need to limit the specific numerical values of the scores. For example, if the aesthetic quality score of image a is 0.6 and the aesthetic quality score of image b is 0.8, then the aesthetic quality of image b is better than that of image a.
[0066] Table 2
[0067] 0.1 0.5 0.1 … 0.2 0.8 0.5 … 0.2 0.6 0.1 … … … … …
[0068] Through the embodiments of the present application, the aesthetic quality score of the target image can be directly searched in a pre-generated aesthetic quality evaluation table, which greatly reduces the calculation time and improves the reliability and practicality of the algorithm for evaluating the aesthetic quality of the image.
[0069] See also Figure 5 , which is a flow chart of a method for evaluating image aesthetic quality provided in an embodiment of the present application.
[0070] The present application embodiment is described by taking a mobile terminal as an example. The image aesthetic quality evaluation method may include the following steps:
[0071] S201, selecting an image set containing a target object from an image data set;
[0072] Using an object recognition algorithm, at least one image containing a target object is identified from an image dataset and stored in an image collection.
[0073] Among them, the image data set can be any data set that stores at least one image. In the embodiment of the present application, the Aesthetic Visual Analysis Dataset (AVA Dataset) can be used. AVA Dataset is a data set for aesthetic quality assessment, in which the amount of image data is very large. Each image has a series of scores, and each image has no less than 78 people's votes of 0 to 9 points as annotations. In addition, each image has a semantic-level label, of which there are 60 categories of semantic-level labels, and images can be classified according to the labels, such as portraits, landscapes, etc.
[0074] The user rating may be a score given by at least one user to the image in terms of aesthetic quality, and the rating standard may be a user's personal subjective evaluation of the image.
[0075] S202, traversing each image in the image set;
[0076] The images in the image set are traversed one by one. The traversal order is not limited. The images can be traversed one by one in the order of their names or in the order in which they enter the image set.
[0077] It should be noted that only after the currently traversed image completes step S203, the next image is traversed.
[0078] S203, obtaining scores of multiple users on the currently traversed image, and performing weighted averaging on the scores to obtain a user score of the image;
[0079] Get multiple users' ratings of the currently traversed image, and perform weighted average on the ratings to eliminate rating noise caused by differences in aesthetics between users. A feasible method is to perform weighted average based on the proportion of users with each score to obtain the user rating of the image.
[0080] For example, a total of 10 people rated the currently traversed image. The scores and the corresponding number of people are 1 person with 3 points, 3 people with 5 points, 3 people with 6 points, 2 people with 7 points, and 1 person with 8 points. The remaining score range is 0. The user rating of the image is 5.8 points.
[0081] S204, until the traversal ends;
[0082] After all images have been traversed and the corresponding user ratings have been obtained, the image traversal step is terminated, and the images after traversal and their corresponding user ratings replace the images before traversal and their ratings and are stored in the image collection.
[0083] S205, based on the user score of each image in the image set, delete the images in the image set whose user scores are lower than a score threshold, to obtain at least one sample image;
[0084] Obtain a user score for each image in the image set. For a specific acquisition method, refer to steps S202, S203, and S204. Based on the obtained user score for each image, delete images in the image set whose user scores are lower than a score threshold, and retain images whose user scores are higher than the score threshold, to obtain an image set including at least one sample image, wherein the corresponding user scores of the sample images in the image set all exceed the score threshold.
[0085] For example, if there are 5 images in the image collection, and the user ratings of the 5 images are 6, 7, 9, 2, and 4 respectively, and the rating threshold is 5 points, then the images with ratings of 2 and 4 will be deleted, and the remaining images in the image collection will be the images with user ratings of 6, 7, and 9.
[0086] The scoring threshold may be a value determined after multiple verifications, and the scoring threshold is used as a minimum requirement standard line for determining image quality.
[0087] S206, identifying a target object in the sample image and marking the target object with a frame;
[0088] The target object in the target image is identified by the object recognition algorithm. If the target object is identified, a border is used to mark the target object. A feasible method is as follows Figure 3 As shown, after the target object in the target image is identified by the object recognition algorithm, a frame is used to mark the target object, and the coordinates (x, y) of the upper left corner, the horizontal side length w of the frame, and the vertical side length h of the frame are obtained.
[0089] If multiple target objects are identified in the target image when using an object recognition algorithm, the target object with the largest proportion is selected as the target object. The criterion for the largest proportion can be the largest area among all target objects, or the target object with the largest horizontal or vertical span. A feasible method is as follows Figure 6 As shown, the object with the largest area is selected as the target object and marked with a bounding box.
[0090] It should be noted that if the target object in the target image is not detected when the object recognition algorithm is used to identify the target object in the target image, it is assumed that the target object does not exist in the target image, and there is no need to perform subsequent steps on the current image.
[0091] The method of marking the target object is not limited to a square frame, and images of shapes such as a circle or a triangle may also be used to mark the target object.
[0092] S207, calculating the center coordinates of the frame as the sample center coordinates of the sample image;
[0093] For details, please refer to step S101, which will not be described in detail here.
[0094] S208, creating an initial aesthetic quality evaluation table of the second length and width;
[0095] Create a table whose length and width are the second length and width, and use this table as an initial aesthetic quality evaluation table. The initial aesthetic quality evaluation table is used to record the aesthetic quality score of the image.
[0096] Among them, the initial values in the table are not limited. In order to reduce the error in the subsequent determination of the aesthetic quality score of the image, the initial values are generally set to the same value; the second length and width of the table are also not limited, and can be set according to specific needs. For example, the second length and width are both set to 5, and the initial values are both 0. Then the initial aesthetic quality evaluation table is shown in Table 3, which is a table with 5 rows, 5 columns, and 0 contents.
[0097] Table 3
[0098] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[0099] S209, determining the standardized coordinates corresponding to the center coordinates of each sample image based on the third length and width of each sample image and the second length and width of the pre-created initial aesthetic quality evaluation table;
[0100] The third length and width of the sample image are the length and width of the sample image.
[0101] After obtaining the third length and width of the sample image, the standardized coordinates corresponding to the sample center coordinates are determined based on the ratio of the third length and width to the second length and width of the created initial aesthetic quality evaluation table. The specific determination method can be found in step S102 and will not be described here.
[0102] S210, determining the same standardized coordinates among the standardized coordinates corresponding to the center coordinates of the samples, and superimposing the user scores of the sample images corresponding to the same standardized coordinates;
[0103] After determining the standardized coordinates corresponding to the sample center coordinates of the sample image, determine the sample images whose corresponding standardized coordinates in each sample center coordinate are the same coordinates, and superimpose the user scores of the images with the same coordinates. For example, there are 4 sample images whose standardized coordinates corresponding to the sample center coordinates are (59, 74), and the user scores of the 4 sample images are 5, 7, 6, and 8, respectively. Then, the score at the standardized coordinate (59, 74) is 5+7+6+8, which is 31.
[0104] S211, adding the superimposed user scores and the user scores of the sample images corresponding to the different standardized coordinates in the standardized coordinates corresponding to the center coordinates of the sample to the positions corresponding to the standardized coordinates in the initial aesthetic quality evaluation table, respectively, to generate a transition aesthetic quality evaluation table;
[0105] The superimposed user ratings and the user ratings of the corresponding sample images with different standardized coordinates are added to the corresponding positions in the initial aesthetic quality evaluation table based on the standardized coordinates, thereby generating a transition aesthetic quality evaluation table. For example, the superimposed user rating corresponding to the standardized coordinate (2,2) is 31, the user rating corresponding to the standardized coordinate (1,2) is 7, and the other standardized coordinates are all 0, thus obtaining the transition aesthetic quality evaluation table shown in Table 4.
[0106] It should be noted that the transition aesthetic quality evaluation table is a table with added scores but not processed. The transition aesthetic quality evaluation table can also be used to determine the aesthetic quality score of the image. However, since the unprocessed table may have a huge gap in normal scores, or a large number of coordinates may have a score of 0, in order to improve the computational efficiency of the embodiment of the present application, the aesthetic quality evaluation table with added scores but not yet processed is used as the transition aesthetic quality evaluation table to provide a data basis for subsequently obtaining a clearer and more concise aesthetic quality evaluation table.
[0107] Table 4
[0108]
[0109]
[0110] S212, performing Gaussian smoothing and normalization processing on each score in the transition aesthetic quality evaluation table to generate an aesthetic quality evaluation table;
[0111] After obtaining the completed transition aesthetic quality evaluation table, in order to make the table look more intuitive and specific, and to more clearly see the aesthetic quality score of the image when querying the aesthetic quality score of the image in the subsequent query, the scores in the transition aesthetic quality evaluation table are Gaussian smoothed and normalized to generate the aesthetic quality evaluation table. When performing Gaussian smoothing, 3*3 or 5*5 can be selected for smoothing, and there is no limit on the array length.
[0112] Among them, the Gaussian smoothing process is to smooth the scores in the transition aesthetic quality evaluation table, so that the gap between the data in the table is smoother than that of the unprocessed table.
[0113] Among them, normalization is to more clearly see the relative high and low scores when querying the aesthetic quality evaluation table, so as to facilitate the judgment of the aesthetic quality of the image.
[0114] S213, identifying a target object in the target image, and marking the target object with a frame;
[0115] For details, please refer to step S206, which will not be described in detail here.
[0116] S214, calculating the center coordinates of the frame as the object center coordinates of the target image;
[0117] For details, please refer to step S101, which will not be described in detail here.
[0118] S215, determining the standardized coordinates corresponding to the center coordinates of the object based on the first length and width of the target image and the second length and width of the pre-generated aesthetic quality evaluation table;
[0119] For details, please refer to step S102, which will not be described in detail here.
[0120] S216, searching the aesthetic quality score corresponding to the target image in the aesthetic quality evaluation table based on the standardized coordinates, the aesthetic quality evaluation table including an aesthetic quality score corresponding to at least one standardized coordinate;
[0121] For details, please refer to step S103, which will not be described in detail here.
[0122] Through the technical solution provided in the embodiment of the present application, images with high user scores are screened out from the image data set for generating an aesthetic quality evaluation table, so that the aesthetic quality evaluation of the images has higher reliability and recognition; the user scores are added to the initial aesthetic quality evaluation table and the aesthetic quality evaluation table is obtained through training, thereby obtaining a concise and clear aesthetic quality evaluation table; and the aesthetic quality score of the target image can be found in the aesthetic quality evaluation table after converting the object center coordinates of the target image into standardized coordinates, thereby reducing the complexity of estimating the aesthetic quality evaluation of the image and improving the reliability and practicality of the aesthetic quality evaluation of the image.
[0123] See also Figure 7 , which shows a schematic diagram of the structure of an image aesthetic quality evaluation device provided by an exemplary embodiment of the present application. The image aesthetic quality evaluation device can be implemented in whole or in part as a terminal by software, hardware or a combination of both. The device 1 includes an object coordinate acquisition module 11, an object coordinate standardization module 12 and a score search module 13.
[0124] The object coordinate acquisition module 11 is used to acquire the object center coordinates of the target image;
[0125] An object coordinate standardization module 12, configured to determine the standardized coordinates corresponding to the center coordinates of the object based on the first length and width of the target image and the second length and width of the pre-generated aesthetic quality evaluation table;
[0126] The score search module 13 is used to search the aesthetic quality score corresponding to the target image in the aesthetic quality evaluation table based on the standardized coordinates, and the aesthetic quality evaluation table includes an aesthetic quality score corresponding to at least one standardized coordinate.
[0127] Optional, such as Figure 8 As shown, the device 1 also includes:
[0128] The sample coordinate acquisition module 14 is used to acquire at least one sample image and acquire the sample center coordinates of each sample image;
[0129] An evaluation table creation module 15 is used to create an initial aesthetic quality evaluation table of the second length and width;
[0130] A sample coordinate standardization module, used for determining the standardized coordinates corresponding to the center coordinates of each sample based on the third length and width of each sample image and the second length and width of the pre-created initial aesthetic quality evaluation table;
[0131] The evaluation table generating module 16 is used to obtain the user scores corresponding to each of the sample images, train the initial aesthetic quality evaluation table based on the standardized coordinates corresponding to the center coordinates of each of the sample images and the user scores corresponding to each of the sample images, and generate an aesthetic quality evaluation table.
[0132] Optional, such as Fig. 9 As shown, the evaluation form generating module 16 includes:
[0133] A rating superposition unit 161 is used to determine the same standardized coordinates among the standardized coordinates corresponding to the center coordinates of the samples, and to superimpose the user ratings of the sample images corresponding to the same standardized coordinates;
[0134] The evaluation table generating unit 162 is used to add the superimposed user scores and the user scores of each sample image corresponding to different standardized coordinates in the standardized coordinates corresponding to the sample center coordinates to the positions corresponding to each standardized coordinate in the initial aesthetic quality evaluation table, so as to generate an aesthetic quality evaluation table.
[0135] Optional, such as Fig.10 As shown, the evaluation table generating unit 162 includes:
[0136] The score adding subunit 1621 is used to add the superimposed user scores and the user scores of each sample image corresponding to different standardized coordinates in the standardized coordinates corresponding to the center coordinates of each sample to the positions corresponding to each standardized coordinate in the initial aesthetic quality evaluation table, respectively, to generate a transition aesthetic quality evaluation table;
[0137] The evaluation table generating subunit 1622 is used to perform Gaussian smoothing and normalization processing on each score in the transition aesthetic quality evaluation table to generate an aesthetic quality evaluation table.
[0138] Optional, such as Fig.11 As shown, the sample coordinate acquisition module 14 includes:
[0139] An image selection unit 141 is used to select an image set containing a target object from an image data set;
[0140] The image deleting unit 142 is configured to obtain a user score of each image in the image set, and delete images in the image set whose user scores are lower than a score threshold, to obtain at least one sample image.
[0141] Optional, such as Fig.12 As shown, the image deletion unit 142 includes:
[0142] An image traversal subunit 1421, configured to traverse each image in the image set;
[0143] The rating averaging subunit 1422 is used to obtain ratings of multiple users on the currently traversed image, and perform weighted averaging on the ratings to obtain a user rating of the image;
[0144] The traversal end subunit 1423 is used to wait until the traversal ends.
[0145] Optional, such as Fig.13 As shown, the sample coordinate acquisition module 14 further includes:
[0146] A sample marking unit 143, used to identify a sample object in the sample image and mark the sample object with a frame;
[0147] The coordinate calculation unit 144 is used to calculate the center coordinates of the frame as the sample center coordinates of the sample image.
[0148] Optional, such as Fig.14 As shown, the object coordinate acquisition module 11 includes:
[0149] An object marking unit 111 is used to identify a target object in the target image and mark the target object with a frame;
[0150] The coordinate calculation unit 112 is used to calculate the center coordinates of the frame as the object center coordinates of the target image.
[0151] It should be noted that the image aesthetic quality evaluation device provided in the above embodiment only uses the division of the above functional modules as an example when executing the image aesthetic quality evaluation method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the image aesthetic quality evaluation device provided in the above embodiment and the image aesthetic quality evaluation method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0152] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0153] Through the technical solution provided in the embodiment of the present application, an aesthetic quality evaluation table is generated, so that when a user wants to evaluate the aesthetic quality of a target image, he can directly obtain the aesthetic quality score of the target image by querying the aesthetic quality evaluation table, thereby reducing the time for obtaining the aesthetic quality score of the target image. In addition, the scoring data of the aesthetic quality evaluation table is obtained after being scored and processed by multiple people, and has high reliability and recognition. Combining the above technical solutions, the practicality and reliability of the algorithm for evaluating the aesthetic quality of images are improved.
[0154] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 1-Figure 6 The method steps of the embodiment shown in the figure can be found in the specific implementation process. Figure 1-Figure 6 The specific description of the illustrated embodiment will not be repeated here.
[0155] The present application also provides an electronic device, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor. Figure 1-Figure 6 The specific description of the illustrated embodiment will not be repeated here.
[0156] See also Fig.15 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.15 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .
[0157] The communication bus 1002 is used to realize the connection and communication between these components.
[0158] The user interface 1003 may include a display screen (Display) and a camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
[0159] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0160] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts of the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1001 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.
[0161] Among them, the memory 1005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. As Fig.15 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an image aesthetic quality assessment application.
[0162] exist Fig.15In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 1001 can be used to call the image aesthetic quality evaluation application stored in the memory 1005, and specifically perform the following operations:
[0163] Get the object center coordinates of the target image;
[0164] Determining the standardized coordinates corresponding to the center coordinates of the object based on the first length and width of the target image and the second length and width of the pre-generated aesthetic quality evaluation table;
[0165] The aesthetic quality score corresponding to the target image is searched in the aesthetic quality evaluation table based on the standardized coordinates, and the aesthetic quality evaluation table includes an aesthetic quality score corresponding to at least one standardized coordinate.
[0166] In one embodiment, the processor 1001 further performs the following operations before acquiring the object center coordinates of the target image:
[0167] Acquire at least one sample image, and acquire the sample center coordinates of each of the sample images;
[0168] Create an initial aesthetic quality evaluation table of the second length and width;
[0169] Determining the standardized coordinates corresponding to the center coordinates of each sample image based on the third length and width of each sample image and the second length and width of the pre-created initial aesthetic quality evaluation table;
[0170] The user scores corresponding to the sample images are obtained, and the initial aesthetic quality evaluation table is trained based on the standardized coordinates corresponding to the center coordinates of the samples and the user scores corresponding to the sample images to generate an aesthetic quality evaluation table.
[0171] In one embodiment, when the processor 1001 trains the initial aesthetic quality evaluation table based on the standardized coordinates corresponding to the center coordinates of each sample and the user score corresponding to each sample image to generate the aesthetic quality evaluation table, the processor 1001 specifically performs the following operations:
[0172] Determine the same standardized coordinates among the standardized coordinates corresponding to the center coordinates of the samples, and superimpose the user scores of the sample images corresponding to the same standardized coordinates;
[0173] The superimposed user scores and the user scores of each sample image corresponding to different standardized coordinates in the standardized coordinates corresponding to the sample center coordinates are respectively added to the positions corresponding to each standardized coordinate in the initial aesthetic quality evaluation table to generate an aesthetic quality evaluation table.
[0174] In one embodiment, when the processor 1001 generates the aesthetic quality evaluation table by adding the superimposed user scores and the user scores of each sample image corresponding to different standardized coordinates in the standardized coordinates corresponding to the center coordinates of each sample to the positions corresponding to each standardized coordinate in the initial aesthetic quality evaluation table, the processor 1001 specifically performs the following operations:
[0175] The superimposed user scores and the user scores of the sample images corresponding to the different standardized coordinates in the standardized coordinates corresponding to the center coordinates of the sample are respectively added to the positions corresponding to the standardized coordinates in the initial aesthetic quality evaluation table to generate a transition aesthetic quality evaluation table;
[0176] Gaussian smoothing and normalization are performed on each score in the transition aesthetic quality evaluation table to generate an aesthetic quality evaluation table.
[0177] In one embodiment, when acquiring at least one sample image, the processor 1001 specifically performs the following operations:
[0178] Select a set of images containing the target object from the image dataset;
[0179] A user score of each image in the image set is obtained, and images in the image set whose user score is lower than a score threshold are deleted to obtain at least one sample image.
[0180] In one embodiment, when the processor 1001 executes the acquisition of the user rating of each image in the image set, the processor 1001 specifically performs the following operations:
[0181] Traversing each image in the image set;
[0182] Obtain ratings of multiple users on the currently traversed image, and perform weighted averaging on the ratings to obtain a user rating of the image;
[0183] Until the traversal ends.
[0184] In one embodiment, when the processor 1001 acquires the sample center coordinates of each sample image, the processor 1001 specifically performs the following operations:
[0185] Identify the target object in the sample image and mark the target object with a frame;
[0186] The center coordinates of the frame are calculated as the sample center coordinates of the sample image.
[0187] In one embodiment, when the processor 1001 acquires the object center coordinates of the target image, the processor 1001 specifically performs the following operations:
[0188] Identify a target object in the target image and mark the target object with a frame;
[0189] The center coordinates of the frame are calculated as the center coordinates of the object of the target image.
[0190] In one embodiment, when the processor 1001 identifies the target object in the target image, the processor 1001 specifically performs the following operations:
[0191] If multiple target objects are identified in the target image, the target object with the largest proportion is selected.
[0192] Through the technical solution provided in the embodiment of the present application, an aesthetic quality evaluation table is generated, so that when a user wants to evaluate the aesthetic quality of a target image, he can directly obtain the aesthetic quality score of the target image by querying the aesthetic quality evaluation table, thereby reducing the time for obtaining the aesthetic quality score of the target image. In addition, the scoring data of the aesthetic quality evaluation table is obtained after being scored and processed by multiple people, and has high reliability and recognition. Combining the above technical solutions, the practicality and reliability of the algorithm for evaluating the aesthetic quality of images are improved.
[0193] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0194] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A method for evaluating image aesthetic quality. It is characterized in that include: Acquire at least one sample image, and acquire the sample center coordinates of each of the sample images; Create an initial aesthetic quality evaluation table of the second length and width; Determining the standardized coordinates corresponding to the center coordinates of each sample image based on the third length and width of each sample image and the second length and width of the pre-created initial aesthetic quality evaluation table; Obtaining user scores corresponding to the sample images, training the initial aesthetic quality evaluation table based on the standardized coordinates corresponding to the center coordinates of the samples and the user scores corresponding to the sample images, and generating an aesthetic quality evaluation table; Get the object center coordinates of the target image; Determining the standardized coordinates corresponding to the center coordinates of the object based on the first length and width of the target image and the second length and width of the pre-generated aesthetic quality evaluation table; The aesthetic quality score corresponding to the target image is searched in the aesthetic quality evaluation table based on the standardized coordinates, and the aesthetic quality evaluation table includes an aesthetic quality score corresponding to at least one standardized coordinate.
2. The method according to claim 1, It is characterized in that The training of the initial aesthetic quality evaluation table based on the standardized coordinates corresponding to the center coordinates of each sample and the user scores corresponding to each sample image to generate the aesthetic quality evaluation table includes: Determine the same standardized coordinates among the standardized coordinates corresponding to the center coordinates of the samples, and superimpose the user scores of the sample images corresponding to the same standardized coordinates; The superimposed user scores and the user scores of each sample image corresponding to different standardized coordinates in the standardized coordinates corresponding to the sample center coordinates are respectively added to the positions corresponding to each standardized coordinate in the initial aesthetic quality evaluation table to generate an aesthetic quality evaluation table.
3. The method according to claim 2, It is characterized in that The superimposed user scores and the user scores of each sample image corresponding to different standardized coordinates in the standardized coordinates corresponding to the center coordinates of each sample are added to the positions corresponding to each standardized coordinate in the initial aesthetic quality evaluation table to generate an aesthetic quality evaluation table, including: The superimposed user scores and the user scores of the sample images corresponding to the different standardized coordinates in the standardized coordinates corresponding to the center coordinates of the sample are respectively added to the positions corresponding to the standardized coordinates in the initial aesthetic quality evaluation table to generate a transition aesthetic quality evaluation table; Gaussian smoothing and normalization are performed on each score in the transition aesthetic quality evaluation table to generate an aesthetic quality evaluation table.
4. The method according to claim 1, It is characterized in that The obtaining of at least one sample image comprises: Select a set of images containing the target object from the image dataset; A user score of each image in the image set is obtained, and images in the image set whose user score is lower than a score threshold are deleted to obtain at least one sample image.
5. The method according to claim 4, It is characterized in that The obtaining of a user rating of each image in the image set comprises: Traversing each image in the image set; Obtain ratings of multiple users on the currently traversed image, and perform weighted averaging on the ratings to obtain a user rating of the image; Until the traversal ends.
6. The method according to claim 1, It is characterized in that The obtaining of the sample center coordinates of each of the sample images comprises: Identify the target object in the sample image and mark the target object with a frame; The center coordinates of the frame are calculated as the sample center coordinates of the sample image.
7. The method according to claim 1, It is characterized in that The obtaining of the object center coordinates of the target image includes: Identify a target object in the target image and mark the target object with a frame; The center coordinates of the frame are calculated as the center coordinates of the object of the target image.
8. The method according to claim 7, It is characterized in that The identifying the target object in the target image includes: If multiple target objects are identified in the target image, the target object with the largest proportion is selected.
9. An image aesthetic quality evaluation device, It is characterized in that include: A sample coordinate acquisition module, used to acquire at least one sample image and acquire the sample center coordinates of each sample image; An evaluation table creation module, used to create an initial aesthetic quality evaluation table of the second length and width; A sample coordinate standardization module, used for determining the standardized coordinates corresponding to the center coordinates of each sample based on the third length and width of each sample image and the second length and width of the pre-created initial aesthetic quality evaluation table; An evaluation table generating module, used for obtaining user scores corresponding to each of the sample images, training the initial aesthetic quality evaluation table based on the standardized coordinates corresponding to the center coordinates of each of the samples and the user scores corresponding to each of the sample images, and generating an aesthetic quality evaluation table; An object coordinate acquisition module is used to obtain the object center coordinates of the target image; An object coordinate standardization module, used to determine the standardized coordinates corresponding to the center coordinates of the object based on the first length and width of the target image and the second length and width of the pre-generated aesthetic quality evaluation table; A score search module is used to search the aesthetic quality score corresponding to the target image in the aesthetic quality evaluation table based on the standardized coordinates, wherein the aesthetic quality evaluation table includes an aesthetic quality score corresponding to at least one standardized coordinate.
10. A computer storage medium, It is characterized in that The computer storage medium has a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps as claimed in any one of claims 1 to 8.
11. An electronic device, It is characterized in that include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for the processor to load and execute the method steps as claimed in any one of claims 1 to 8.
