Image evaluation method and device, model training method and device, medium and equipment

Through image segmentation and feature evaluation models, the foreground objects and feature differences of extended images are automatically evaluated, which solves the problem of inefficient evaluation of extended images on e-commerce platforms and achieves efficient image quality evaluation.

CN118967680AActive Publication Date: 2024-11-15ALIPAY (HANGZHOU) INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411442056.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2024-11-15
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

In the prior art, the evaluation of extended images on e-commerce platforms mainly relies on manual operations, and is inefficient and cannot effectively improve the quality evaluation efficiency of extended images.

Method used

The image segmentation technology extracts the foreground objects in the original image and the extended image for comparison, and uses the pre-trained feature evaluation model to evaluate the feature difference of the image. Combining the foreground objects and feature evaluation results, the comprehensive evaluation results of the extended image are determined by combining the foreground objects and feature evaluation results. .

Benefits of technology

Automatic extended image evaluation is realized, evaluation efficiency is improved, image quality can be objectively reflected, and manual intervention is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967680A_ABST
    Figure CN118967680A_ABST
Patent Text Reader

Abstract

The invention provides an image evaluation method and device, a model training method and device, a medium and equipment, and the method comprises the steps: carrying out the image segmentation of an original image in response to an input original image and an extended image, and obtaining a segmented image of a first foreground object according with a preset object type, and carrying out image segmentation on the extended image to obtain a segmented image of a second foreground object conforming to a preset object type, performing image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object, and determining a foreground object evaluation result of the extended image; calling a pre-trained feature evaluation model to perform feature difference evaluation on the original image and the extended image, and determining a feature evaluation result of the extended image; and determining a comprehensive evaluation result of the extended image based on the foreground object evaluation result and the feature evaluation result. Based on the scheme of the invention, the efficiency of evaluating the extended image can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present specification relates to the field of computer technology, and more specifically, to an image evaluation method, model training method, device, medium and equipment in the field of computer technology. Background Art

[0002] With the rapid development of AIGC (Artificial Intelligence Generated Content) technology, its application scope is becoming increasingly wide. Users can easily use AIGC technology to generate diverse content to meet personalized and diversified needs. Especially in the field of e-commerce, merchants can use AIGC technology to create creative and attractive extended images based on the original images of products. These extended images usually incorporate rich background elements to enhance the display effect of products on e-commerce platforms.

[0003] However, before these extended images are applied to e-commerce platforms, an essential step is to evaluate their applicability to ensure that the quality of the extended images meets certain requirements. This evaluation process currently relies mainly on manual operations, which is inefficient. Summary of the invention

[0004] This specification provides an image evaluation method, a model training method, an apparatus, a medium and a device, which can improve the efficiency of extended image evaluation.

[0005] In a first aspect, an image evaluation method is provided, the method comprising: In response to the input original image and the extended image, the original image is segmented to obtain a segmented image of a first foreground object that meets the preset object type, and the extended image is segmented to obtain a segmented image of a second foreground object that meets the preset object type, wherein the extended image is generated by background extension based on the first foreground object in the original image; Performing image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object to determine a foreground object evaluation result of the extended image; Calling a pre-trained feature evaluation model to evaluate the feature difference between the original image and the extended image, and determining the feature evaluation result of the extended image; Based on the foreground object evaluation result and the feature evaluation result, a comprehensive evaluation result of the extended image is determined.

[0006] In combination with the first aspect, in some possible implementations, there is at least one first foreground object and at least one second foreground object; performing image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object to determine the foreground object evaluation result of the extended image includes: for each first foreground object in at least one first foreground object and each second foreground object in at least one second foreground object, respectively determining the pixel similarity between the segmented image of each first foreground object and the segmented image of each second foreground object; based on the pixel similarity between the segmented image of each first foreground object and the segmented image of each second foreground object, determining at least one segmented image group, wherein any one segmented image group in the at least one segmented image group includes a corresponding segmented image of the first foreground object and a segmented image of the second foreground object; respectively obtaining parameters of each segmented image group under a preset content comparison index; respectively obtaining parameters of each segmented image group under a preset layout analysis index; and determining the foreground object evaluation result of the extended image based on the parameters of each segmented image group under the preset content comparison index and the parameters under the preset layout analysis index.

[0007] In combination with the first aspect and the above-mentioned implementation manner, in some possible implementation manners, respectively obtaining parameters of each segmented image group under a preset content comparison index includes: traversing at least one segmented image group; for any target segmented image group in the at least one segmented image group traversed, if the preset content comparison index includes a peak signal-to-noise ratio index, obtaining a peak signal-to-noise ratio value of a segmented image of a target first foreground object in the target segmented image group, and a peak signal-to-noise ratio value of a segmented image of a target second foreground object in the target segmented image group; comparing the peak signal-to-noise ratio value of the segmented image of the target first foreground object with the peak signal-to-noise ratio value of the segmented image of the target second foreground object to determine the parameters of the target segmented image group under the peak signal-to-noise ratio index; if the preset content comparison index includes a multi-scale structural similarity index, obtaining the target segmented image group; The method comprises the steps of: obtaining a multi-scale structural similarity index value of a segmented image of a target first foreground object and a multi-scale structural similarity index value of a segmented image of a target second foreground object; comparing the multi-scale structural similarity index value of the segmented image of the target first foreground object and the multi-scale structural similarity index value of the segmented image of the target second foreground object, and determining parameters of the target segmented image group under the multi-scale structural similarity index indicator; if the preset content comparison indicator includes a foreground object area overlap rate indicator, obtaining the area of ​​the target first foreground object in the segmented image of the target first foreground object and the area of ​​the target second foreground object in the segmented image of the target second foreground object; and determining parameters of the target segmented image group under the foreground object area overlap rate indicator according to the comparison of the area of ​​the target first foreground object and the area of ​​the target second foreground object.

[0008] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the parameters of each segmented image group under the preset layout analysis index are respectively obtained, including: traversing at least one segmented image group; for any target segmented image group in the at least one segmented image group traversed, if the preset layout analysis index includes a display position index, obtaining the center pixel point of the target second foreground object in the segmented image of the target second foreground object in the target segmented image group; analyzing according to the center pixel point of the target second foreground object and the preset center pixel point reference range, and determining the parameters of the target segmented image group under the display position index; if the preset layout analysis index includes an area ratio index, obtaining the area ratio of the target second foreground object in the segmented image of the target second foreground object; analyzing according to the area ratio of the target second foreground object and the preset area ratio reference range, and determining the parameters of the target segmented image group under the area ratio index.

[0009] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, image segmentation is performed on the original image to obtain a segmented image of a first foreground object that conforms to a preset object type, and image segmentation is performed on the extended image to obtain a segmented image of a second foreground object that conforms to a preset object type, including: obtaining segmentation prompt information corresponding to the preset object type; inputting the segmentation prompt information and the original image into a pre-trained image segmentation model to obtain a segmented image of the first foreground object output by the image segmentation model; inputting the segmentation prompt information and the extended image into the image segmentation model to obtain a segmented image of the second foreground object output by the image segmentation model.

[0010] In a second aspect, a model training method is provided, the method comprising: Create an initial feature evaluation model; obtain an image pair sample set, wherein the image pair sample set includes multiple image pair samples with feature evaluation result annotation information, any target image pair sample in the multiple image pair samples includes an original image sample and an extended image sample, and the extended image sample is generated by background extension based on the foreground object in the original image sample; iteratively train the initial feature evaluation model based on the image pair sample set; if the preset convergence condition is met, determine the initial feature evaluation model as a pre-trained feature evaluation model.

[0011] In combination with the second aspect, in some possible implementations, the initial feature evaluation model includes an image feature extraction layer, a feature difference analysis layer and a feature evaluation layer; the image feature extraction layer is used to receive the input original image samples and extended image samples, and obtain the image feature matrix of the original image samples and the image feature matrix of the extended image samples respectively; the feature difference analysis layer is used to determine the feature difference information between the original image samples and the extended image samples based on the image feature matrix of the original image samples and the image feature matrix of the extended image samples; the feature evaluation layer is used to determine the feature evaluation result of the extended image sample based on the feature difference information between the original image samples and the extended image samples.

[0012] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the feature difference analysis layer is also used to extract the global feature vector of the original image sample from the image feature matrix of the original image sample, extract the global feature vector of the extended image sample from the image feature matrix of the extended image sample, and determine the feature difference information between the original image sample and the extended image sample based on the global feature vector of the original image sample and the global feature vector of the extended image sample.

[0013] In a third aspect, an image evaluation device is provided, the device comprising: a segmentation unit, configured to, in response to an input original image and an extended image, perform image segmentation on the original image to obtain a segmented image of a first foreground object that meets a preset object type, and perform image segmentation on the extended image to obtain a segmented image of a second foreground object that meets the preset object type, wherein the extended image is generated by performing background extension based on the first foreground object in the original image; A first evaluation unit, configured to perform image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object to determine an evaluation result of the foreground object of the extended image; The second evaluation unit is used to call a pre-trained feature evaluation model to evaluate the feature difference between the original image and the extended image, and determine the feature evaluation result of the extended image; The determination unit is used to determine the comprehensive evaluation result of the extended image based on the foreground object evaluation result and the feature evaluation result.

[0014] In a fourth aspect, a model training device is provided, the device comprising: A creation unit for creating an initial feature evaluation model; An acquisition unit is used to acquire an image pair sample set, wherein the image pair sample set includes a plurality of image pair samples with feature evaluation result annotation information, and any target image pair sample among the plurality of image pair samples includes an original image sample and an extended image sample, and the extended image sample is generated by background extension based on a foreground object in the original image sample; A training unit, used for iteratively training an initial feature evaluation model based on an image pair sample set; The determination unit is used to determine the initial feature evaluation model as a pre-trained feature evaluation model if a preset convergence condition is met.

[0015] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.

[0016] In a sixth aspect, an electronic device is provided, comprising: 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 steps of the above method.

[0017] In a seventh aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.

[0018] In the embodiments of the present specification: First, through image segmentation, the segmented image of the first foreground object and the segmented image of the second foreground object that meet the preset object type can be accurately extracted from the original image and the extended image, respectively. The segmented image of the first foreground object and the segmented image of the second foreground object are used to perform image comparison to determine the foreground object evaluation result. Secondly, the feature difference evaluation of the original image and the extended image is performed using a pre-trained feature evaluation model, which can objectively analyze the difference between the two at the feature level. This difference generally comes from the background diffusion in the process of generating the extended image, and further obtains a feature evaluation result that can reflect the image background difference. Using the foreground object evaluation result and the feature evaluation result, the comprehensive evaluation result of the extended image can be determined. The comprehensive evaluation result effectively reflects the quality of the extended image, and at the same time does not require manual intervention in the evaluation process, which effectively improves the efficiency of the extended image evaluation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a schematic diagram of an image evaluation scenario provided by an embodiment of this specification; Figure 2 It is a flowchart of an image evaluation method provided in an embodiment of this specification; Figure 3 is an example schematic diagram of an original image and an extended image provided in an embodiment of this specification; Figure 4 It is a flowchart of determining a foreground object evaluation result provided by an embodiment of this specification; Figure 5 is an example schematic diagram of segmenting an original image and an extended image provided in an embodiment of this specification; Figure 6 It is a flow chart of obtaining parameters of a segmented image group under a preset content comparison index provided by an embodiment of this specification; Figure 7 It is a flow chart of obtaining parameters of a segmented image group under a preset layout analysis index provided by an embodiment of this specification; Figure 8 is an example schematic diagram of the position and proportion of a second foreground object provided in an embodiment of this specification; Fig. 9 is an example schematic diagram of the position and proportion of a second foreground object provided in an embodiment of this specification; Fig.10 It is a flowchart of a model training method provided in an embodiment of this specification; Fig.11 is an example schematic diagram of a training feature analysis model provided in an embodiment of this specification; Fig.12 is an example schematic diagram of an image evaluation effect provided in an embodiment of this specification; Fig.13 is an example schematic diagram of an image evaluation effect provided in an embodiment of this specification; Fig.14 is a structural schematic diagram of an image evaluation device provided in an embodiment of this specification; Fig.15 It is a structural schematic diagram of a model training device provided in an embodiment of this specification; Fig.16 It is a structural schematic diagram of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0020] The technical solutions in this specification will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of this specification, unless otherwise specified, " / " means or, for example, A / C can mean A or C: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or C can mean: A exists alone, A and C exist at the same time, and C exists alone. In addition, in the description of the embodiments of this specification, "multiple" means two or more than two.

[0021] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0022] In related technologies, with the rapid development of AIGC technology, its application scope is becoming increasingly wide. Users can easily use advanced AIGC technology to generate diversified and high-quality content through algorithm models and deep learning frameworks to meet personalized and diversified needs. Especially in the field of e-commerce, merchants can use AIGC technology to expand the background of the product in the original image of the product through image generation algorithms and creative optimization strategies to create creative and highly eye-catching extended images. These extended images not only retain the core features of the product, but also incorporate rich background elements and visual effects, aiming to significantly improve the display effect of the product on the e-commerce platform and enhance users' willingness to buy.

[0023] However, before these extended images with background expansion are applied to e-commerce platforms for display, an essential step is to evaluate them. This evaluation process aims to ensure whether the extended images meet certain requirements. However, the current evaluation process mainly relies on manual operation, which not only requires a lot of manpower and time investment, but also has the problem of low efficiency.

[0024] In response to the above-mentioned problems of the related art, the main solutions provided by the embodiments of this specification are as follows: First, through image segmentation, the segmented image of the first foreground object and the segmented image of the second foreground object that meet the preset object type can be accurately extracted from the original image and the extended image respectively, and the foreground object evaluation result can be determined by performing image comparison using the segmented image of the first foreground object and the segmented image of the second foreground object. Secondly, by using a pre-trained feature evaluation model to evaluate the feature difference between the original image and the extended image, the difference between the two at the feature level can be objectively analyzed. This difference generally comes from the background diffusion in the process of generating the extended image, and further a feature evaluation result that can reflect the image background difference is obtained. Using the foreground object evaluation result and the feature evaluation result, the comprehensive evaluation result of the extended image can be determined. The comprehensive evaluation result effectively reflects the quality of the extended image, and at the same time, no manual intervention in the evaluation process is required, which effectively improves the efficiency of the extended image evaluation.

[0025] See also Figure 1 , Figure 1It is a scene diagram of an image evaluation provided by an embodiment of the present specification. Based on the scheme provided by the embodiment of the present specification, the user can generate an extended image by operating on the user side based on the original image. Then, the user side transmits the original image and the extended image to the server side, and the server side receives the input original image and the extended image. In response to the input original image and the extended image, the server side performs image segmentation on the original image to obtain a segmented image of a first foreground object that meets the preset object type, and performs image segmentation on the extended image to obtain a segmented image of a second foreground object that meets the preset object type; performs image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object, and determines the foreground object evaluation result of the extended image; calls a pre-trained feature evaluation model to perform feature difference evaluation on the original image and the extended image, and determines the feature evaluation result of the extended image; determines the comprehensive evaluation result of the extended image based on the foreground object evaluation result and the feature evaluation result. If the comprehensive evaluation result of the extended image indicates that the evaluation is passed, the server side returns the first evaluation result information to the client side, wherein the first evaluation result information is at least used to prompt the user that the extended image has passed the evaluation. If the comprehensive evaluation result of the extended image indicates that the evaluation fails, the server returns second evaluation result information to the client, wherein the second evaluation result information is at least used to prompt the user that the extended image fails the evaluation.

[0026] based on Figure 1 The scene shown is shown below. Figure 2 - Fig.13 , the image evaluation method provided in the embodiments of this specification is introduced in detail.

[0027] See also Figure 2 , is a flow chart of an image evaluation method provided in the embodiment of this specification. Figure 2 As shown, the method of the embodiment of this specification may include the following steps S102 to S108.

[0028] S102, in response to an input original image and an extended image, performing image segmentation on the original image to obtain a segmented image of a first foreground object that meets a preset object type, and performing image segmentation on the extended image to obtain a segmented image of a second foreground object that meets the preset object type, wherein the extended image is generated by background extension based on the first foreground object in the original image.

[0029] Specifically, in response to the input original image and the extended image, the extended image needs to be evaluated in terms of foreground objects and background features respectively to determine whether the extended image passes the evaluation.

[0030] In terms of foreground objects, it is first necessary to perform image segmentation on the original image to obtain a segmented image of a first foreground object that meets the preset object type, and to perform image segmentation on the extended image to obtain a segmented image of a second foreground object that meets the preset object type. Image segmentation is a technique that divides an image into multiple regions or objects so that each region or object can be processed or analyzed separately. In this step, special attention is paid to foreground objects that meet the preset object type. The preset object type can be any pre-defined object that needs to be identified and extracted in the original image and the extended image, such as goods, people, animals, vehicles, and other entities with specific characteristics or meanings.

[0031] For the original image, a segmented image of a first foreground object that meets the preset object type is accurately extracted through a preset image segmentation model or image segmentation algorithm. Similarly, for the extended image, a segmented image of a second foreground object that meets the preset object type can also be accurately extracted through a preset image segmentation model or image segmentation algorithm.

[0032] It should be noted that the segmented image of the first foreground object and the segmented image of the second foreground object may be resized to keep them consistent in size, so as to facilitate subsequent comparison and analysis.

[0033] It should be noted that the foreground object and the background are the two basic elements that constitute the image. The foreground object refers to the part of the image that is of main concern or interest. The background refers to the part of the image other than the foreground object, which constitutes the environment and context of the image.

[0034] In addition, the extended image is generated by background extension based on the first foreground object in the original image. In a possible implementation, the original image is processed by AIGC technology, specifically, the background of the first foreground object in the original image is extended to obtain the corresponding extended image. It can be understood that the background of the extended image is different from the background of the original image, because the background of the extended image is newly generated after being processed by AIGC technology, while the background of the original image is the unprocessed original background. In terms of technical principles, AIGC technology uses deep learning and computer vision algorithms to identify and segment the first foreground object in the original image. Through precise image segmentation technology, the foreground object can be separated from the original background and its shape, size, color and other features can be retained. Subsequently, AIGC technology generates a new background and merges it with the segmented foreground object to generate an extended image. It can be understood that the first foreground object in the original image corresponds one to one with the second foreground object in the extended image.

[0035] To visualize the relationship between the original image and the expanded image, see Figure 3, Figure 3 0011 and 0012. The background of the original image 0011 and 0012 is extended based on the background of the first foreground object 0011 and 0012 in the original image 001, and the extended image 002 can be obtained. In the extended image 002, the second foreground object 0021 corresponds to the first foreground object 0011, and the second foreground object 0022 corresponds to the first foreground object 0012. In addition, the original image 001 and the extended image 002 have differences in background.

[0036] S104: performing image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object to determine a foreground object evaluation result of the extended image.

[0037] Specifically, since the extended image is generated based on the original image, the second foreground object in the extended image corresponds to the first foreground object in the original image one-to-one. In the process of generating the extended image, the second foreground object may have certain deviations from the corresponding first foreground object in terms of content and layout. For example, compared with the corresponding first foreground object, the second foreground object generates some redundant content at the edge; for another example, compared with the corresponding first foreground object, the second foreground object is distorted in some pixels; for another example, compared with the corresponding first foreground object, the second foreground object is offset in position; for another example, compared with the corresponding first foreground object, the second foreground object changes in area.

[0038] Therefore, the segmented image of the first foreground object and the segmented image of the second foreground object can be compared from the two aspects of content and layout, and then the foreground object evaluation result of the extended image can be determined. It can be understood that the foreground object evaluation result of the extended image reflects the quality performance of the extended image in terms of the foreground object.

[0039] In one possible implementation, the foreground object evaluation result of the extended image is expressed in the form of a numerical value, and the size of the numerical value reflects the quality of the extended image in terms of the foreground object; in one possible implementation, the foreground object evaluation result of the extended image is expressed in the form of a state, and the state reflects the quality of the extended image in terms of the foreground object.

[0040] S106, calling a pre-trained feature evaluation model to evaluate the feature difference between the original image and the extended image, and determining a feature evaluation result of the extended image.

[0041] Specifically, in the process of generating the extended image, due to background diffusion, the background of the extended image will be different from that of the original image. These differences may be manifested in multiple aspects such as color distribution, texture pattern, brightness contrast, etc. In order to accurately evaluate these differences in the background, it is necessary to introduce a feature evaluation model that can deeply extract and analyze image features.

[0042] The feature evaluation model is a pre-trained model tool based on machine learning technology. It can learn the feature processing capabilities of images during the training process, analyze the feature difference information between the original image and the extended image, and establish a mapping relationship between the feature difference information and the feature evaluation results.

[0043] Specifically, the feature evaluation model receives the original image and the extended image as input, extracts the image feature information of the original image and the image feature information of the extended image, and represents the image feature information in an image feature matrix or other forms. Then, the feature evaluation model determines the feature difference information between the original image and the extended image based on the image feature information of the original image and the image feature information of the extended image. Then, the feature evaluation model determines the feature evaluation result of the extended image based on the feature difference information between the original image and the extended image.

[0044] In a possible implementation, the original image and the expanded image may be subjected to feature saliency processing before being input into the feature evaluation model. Feature saliency processing aims to enhance the key features in the image so that the feature evaluation model can more accurately capture and analyze the features of the original image and the expanded image. There are many ways to implement feature saliency processing. An optional method is to use image enhancement techniques, such as contrast enhancement and sharpening, to highlight the edges and details of the image, making the key features more prominent.

[0045] In a possible implementation, the feature evaluation result of the extended image is expressed in the form of a numerical value, and the size of the numerical value reflects the quality of the extended image in terms of background features; in a possible implementation, the feature evaluation result of the extended image is expressed in the form of a state, and the state reflects the quality of the extended image in terms of background features.

[0046] S108, determining a comprehensive evaluation result of the extended image based on the foreground object evaluation result and the feature evaluation result.

[0047] Specifically, based on the foreground object evaluation result and the feature evaluation result, the overall quality of the extended image is comprehensively evaluated, and a comprehensive evaluation result can be determined, which comprehensively reflects the quality of the extended image in terms of foreground object scheme and background features.

[0048] It should be noted that the foreground object evaluation results and feature evaluation results may be expressed in the form of numerical values ​​for easy comparison and analysis. The foreground object evaluation results and feature evaluation results may be expressed in the form of states, which supports logical judgment to obtain comprehensive evaluation results.

[0049] The following are examples of numeric representations: In one example, assume that the foreground object evaluation result of the extended image is 0.9 (numerically expressed, ranging from 0 to 1, 1 indicates that the foreground object is completely consistent), and the feature evaluation result of the extended image is 0.8 (also numerically expressed, ranging from 0 to 1, 1 indicates that the features are completely consistent). If the set threshold is 0.85, and the foreground object evaluation result and the feature evaluation result are considered to be equally important, then the comprehensive evaluation result can be calculated as (0.9+0.8) / 2=0.85. Since the comprehensive evaluation result is equal to the set threshold, it can be considered that the quality of the extended image meets the requirements and the evaluation passes. Conversely, if the comprehensive evaluation result is less than the set threshold, then it is considered that the quality of the extended image does not meet the requirements and the evaluation fails.

[0050] In one example, the foreground object evaluation result of the extended image is 0.7, and the feature evaluation result of the extended image is 0.6. If the set threshold is still 0.85, and it is considered that the foreground object evaluation result is more important than the feature evaluation result, the weight of the foreground object evaluation result can be set to 0.6, and the weight of the feature evaluation result can be set to 0.4. Then the calculated comprehensive evaluation result is 0.6*0.7+0.4*0.6=0.54. Since the comprehensive evaluation result is less than the set threshold, it can be considered that the quality of the extended image does not meet the requirements and the evaluation fails.

[0051] In one example, the fidelity requirement for the foreground object is high, and the weight of the foreground object evaluation result may be set to 0.9, and the weight of the feature evaluation result may be set to 0.1. Assume that the foreground object evaluation result of the extended image is 0.95 (numerically expressed), and the feature evaluation result is 0.5 (numerically expressed). Then the calculated comprehensive evaluation result is 0.9*0.95+0.1*0.5=0.895. If the set threshold is 0.9, then since the comprehensive evaluation result is less than the set threshold, it can be considered that the extended image still needs to be improved in terms of foreground object fidelity, although its foreground object evaluation result is already quite high. In this case, it can be determined that the evaluation fails.

[0052] The following are examples of how the status may be represented: In one example, assume that the foreground object evaluation result of the extended image is "evaluated passed" (indicating that the foreground object is completely consistent or meets the preset standard), and the feature evaluation result is "evaluated passed" (indicating that the feature is completely consistent or meets the preset standard). If the set comprehensive evaluation rule is "when both the foreground object evaluation result and the feature evaluation result are passed, the comprehensive evaluation result is passed", then it can be determined that the comprehensive evaluation result of the extended image is "evaluated passed".

[0053] In one example, the evaluation result of the foreground object of the extended image is "evaluation passed", but the feature evaluation result is "evaluation failed". If the set comprehensive evaluation rule is "when the foreground object evaluation result and the feature evaluation result are both passed, the comprehensive evaluation result is passed; otherwise, it is failed", then it can be determined that the comprehensive evaluation result of the extended image is "evaluation failed".

[0054] In one example, the fidelity requirement for the foreground object is high, and a more stringent comprehensive evaluation rule may be set. Assume that the foreground object evaluation result of the extended image is "evaluation passed", but the feature evaluation result is "evaluation failed". Even if the foreground object evaluation result is very good, due to the failure of the feature evaluation result, according to the set comprehensive evaluation rule "when the foreground object evaluation result and the feature evaluation result are both passed, the comprehensive evaluation result is passed; otherwise, it is failed", the comprehensive evaluation result of the extended image can still be determined as "evaluation failed".

[0055] In this embodiment, firstly, through image segmentation, the segmented image of the first foreground object and the segmented image of the second foreground object that meet the preset object type can be accurately extracted from the original image and the extended image, respectively. The segmented image of the first foreground object and the segmented image of the second foreground object can be used for image comparison to determine the foreground object evaluation result. Secondly, the feature difference evaluation of the original image and the extended image is performed using a pre-trained feature evaluation model, which can objectively analyze the difference between the two at the feature level. This difference generally comes from the background diffusion in the process of generating the extended image, and further obtains a feature evaluation result that can reflect the image background difference. Using the foreground object evaluation result and the feature evaluation result, the comprehensive evaluation result of the extended image can be determined. The comprehensive evaluation result effectively reflects the quality of the extended image, and at the same time, no manual intervention in the evaluation process is required, which effectively improves the efficiency of the extended image evaluation.

[0056] See also Figure 4 , provides a flow chart of determining a foreground object evaluation result for an embodiment of the present application. Among them, each of the first foreground object and the second foreground object is at least one. Figure 4 As shown, the method of the embodiment of the present application may include the following steps S202 to S210, and steps S202 to S210 may be used as Figure 2The refinement of step S104 in the illustrated embodiment.

[0057] S202, for each first foreground object in the at least one first foreground object and each second foreground object in the at least one second foreground object, respectively determine pixel similarities between a segmented image of each first foreground object and a segmented image of each second foreground object; S204, determining at least one segmented image group based on pixel similarities between the segmented images of each first foreground object and the segmented images of each second foreground object, wherein any one of the at least one segmented image group includes a corresponding segmented image of the first foreground object and a segmented image of the second foreground object; S206, respectively obtaining parameters of each segmented image group under a preset content comparison index; S208, respectively obtaining parameters of each segmented image group under a preset layout analysis index; S210 , determining a foreground object evaluation result of the extended image based on parameters of each segmented image group under a preset content comparison index and parameters under a preset layout analysis index.

[0058] Specifically, there may be one or more first foreground objects in the original image, and the number of second foreground objects in the extended image is greater than or equal to the number of first foreground objects in the original image. There are two reasons why the number of first foreground objects in the original image and second foreground objects in the extended image may not correspond: On the one hand, the extended image is generated by performing background extension based on the first foreground object in the original image. During the background extension process, objects that are not in the original image may appear in the background of the extended image. For example, there is only one first foreground object in the original image, which is a desk lamp. By performing background extension based on the desk lamp in the original image, an extended image can be obtained. The content in the extended image shows a desk lamp placed on a table, and the table is the content that is not in the original image. It can be understood that the table and the desk lamp in the extended image are both potential second foreground objects, depending on the definition of the preset object type.

[0059] On the other hand, the image segmentation of the original image and the extended image is guided by the preset object type. Based on the above example, assuming that the first foreground object and the second foreground object are limited by the preset object type "electrical appliance", then the first foreground object in the original image has only one table lamp, and the second foreground object in the extended image also has only one table lamp; assuming that the first foreground object and the second foreground object are limited by the preset object type "commodity", then the first foreground object in the original image has only one table lamp, and the second foreground object in the extended image has a table lamp and a table. In other words, the segmented image of the second foreground object in the extended image will be more than the segmented image of the first foreground object in the original image, and the redundant segmented images of the second foreground object in the extended image will not participate in the subsequent image comparison (for example, the segmented image of "table" in the above example does not participate in the subsequent image comparison).

[0060] Based on the above reasons, before performing image comparison, it is necessary to determine the one-to-one correspondence between the first foreground object in the original image and the second foreground object in the extended image. Specifically, for each first foreground object in the at least one first foreground object and each second foreground object in the at least one second foreground object, the pixel similarity between the segmented image of each first foreground object and the segmented image of each second foreground object is determined respectively.

[0061] Specifically, the similarity between the two segmented images can be quantified by using pixel difference calculation methods in image processing technology, such as mean square error (MSE) or structural similarity (SSIM). Through such comparison, the pixel similarity between the segmented image of any first foreground object and the segmented image of any second foreground object can be obtained, and the pixel similarity is expressed in the form of a numerical value.

[0062] Next, at least one segmented image group needs to be determined. Here, a segmented image group is composed of a corresponding segmented image of a first foreground object and a segmented image of a second foreground object. When determining the segmented image group, the image groups can be sorted according to the pixel similarity, and the first foreground object segmented image and the second foreground object segmented image with the highest similarity are selected to form a segmented image group, and so on, until all the first foreground objects and the second foreground objects are assigned to the corresponding segmented image groups.

[0063] Then, parameters of each segmented image group under the preset content comparison index are obtained respectively. The parameters under the preset content comparison index reflect the quality of the segmented image of the second foreground object at the content level, and indirectly reflect the quality of the extended image at the content level.

[0064] Next, the parameters of each segmented image group under the preset layout analysis index are obtained respectively. The parameters under the preset layout analysis index reflect the quality of the segmented image of the second foreground object at the layout level, and indirectly reflect the quality of the extended image at the layout level.

[0065] Finally, the foreground object evaluation result of the extended image is determined based on the parameters of each segmented image group under the preset content comparison index and the parameters under the preset layout analysis index.

[0066] In one possible implementation, corresponding weights may be set for the parameters under the preset content comparison index, and corresponding weights may be set for the parameters under the preset layout analysis index, respectively. The parameters under the preset content comparison index and the parameters under the preset layout analysis index may be weightedly summed to obtain a comprehensive numerical value as an evaluation result of the foreground object of the extended image.

[0067] In a possible implementation, a first parameter threshold and a second parameter threshold may be obtained respectively. If the parameter under the preset content comparison index is greater than or equal to the first parameter threshold, then it is determined that the extended image has passed the evaluation at the content level of the foreground object; if the parameter under the preset content comparison index is less than the first parameter threshold, then it is determined that the extended image has failed the evaluation at the content level of the foreground object. If the parameter under the preset layout analysis index is greater than or equal to the second parameter threshold, then it is determined that the extended image has passed the evaluation at the layout level of the foreground object; if the parameter under the preset layout analysis index is less than the second parameter threshold, then it is determined that the extended image has failed the evaluation at the layout level of the foreground object. If the extended image has passed the evaluation at both the content level of the foreground object and the layout level of the foreground object, then it is determined that the evaluation result of the foreground object of the extended image is in the state of "evaluation passed"; if the extended image has failed the evaluation at either the content level of the foreground object or the layout level of the foreground object, then it is determined that the evaluation result of the foreground object of the extended image is in the state of "evaluation failed".

[0068] To understand the image segmentation process in this embodiment, please refer to Figure 5 , Figure 5 This is an example schematic diagram of segmenting an original image and an extended image provided in an embodiment of this specification.

[0069] The original image 001 includes a first foreground object 0011 and a first foreground object 0012. The background is extended based on the first foreground object 0011 and the first foreground object 0012 in the original image 001 to obtain an extended image 002. In the extended image 002, the second foreground object 0021 corresponds to the first foreground object 0011, and the second foreground object 0022 corresponds to the first foreground object 0012. Then, after image segmentation, a segmented image 0031 of the first foreground object 0011, a segmented image 0032 of the first foreground object 0012, a segmented image 0033 of the second foreground object 0021, and a segmented image 0034 of the second foreground object 0022 can be obtained. After analysis and processing, the pixel similarity between the segmented image 0031 of the first foreground object 0011 and the segmented image 0033 of the second foreground object 0021, the pixel similarity between the segmented image 0031 of the first foreground object 0011 and the segmented image 0034 of the second foreground object 0022, the pixel similarity between the segmented image 0032 of the first foreground object 0012 and the segmented image 0033 of the second foreground object 0021, and the pixel similarity between the segmented image 0032 of the first foreground object 0012 and the segmented image 0034 of the second foreground object 0022 can be obtained. Then, based on the comparison of the above pixel similarities, the segmented image 0031 of the first foreground object 0011 and the segmented image 0033 of the second foreground object 0021 can be divided into the same segmented image group, and the segmented image 0032 of the first foreground object 0012 and the segmented image 0034 of the second foreground object 0022 can be divided into the same segmented image group.

[0070] In this embodiment, firstly, by comparing the pixel similarity of the foreground objects in the original image and the extended image, the corresponding first foreground object and the second foreground object can be accurately determined, thereby forming a segmented image group. Secondly, by using the preset content comparison index and the preset layout analysis index, the extended image is comprehensively evaluated at the two levels of content and layout. This dual evaluation mechanism can more comprehensively reflect the quality of the extended image, thereby improving the accuracy and reliability of the evaluation. Finally, by combining the evaluation results at the two levels of content and layout, a more comprehensive and accurate foreground object evaluation result can be obtained, providing effective guidance for the evaluation process of the extended image.

[0071] See also Figure 6 , which is a flow chart of obtaining parameters of a segmented image group under a preset content comparison index, for an embodiment of the present application, such as Figure 6 As shown, the method of the embodiment of the present application may include the following steps S302 to S308, and steps S302 to S308 may be used as Figure 4 The refinement of step S206 in the illustrated embodiment.

[0072] S302, traversing at least one segmented image group; S304, for any one target segmented image group in the at least one segmented image group traversed, if the preset content comparison index includes a peak signal-to-noise ratio index, obtain a peak signal-to-noise ratio value of a segmented image of a target first foreground object in the target segmented image group, and a peak signal-to-noise ratio value of a segmented image of a target second foreground object in the target segmented image group; compare the peak signal-to-noise ratio value of the segmented image of the target first foreground object with the peak signal-to-noise ratio value of the segmented image of the target second foreground object, and determine parameters of the target segmented image group under the peak signal-to-noise ratio index; S306, if the preset content comparison index includes a multi-scale structural similarity index, then obtaining a multi-scale structural similarity index value of a segmented image of a first target foreground object and a multi-scale structural similarity index value of a segmented image of a second target foreground object; comparing the multi-scale structural similarity index value of the segmented image of the first target foreground object with the multi-scale structural similarity index value of the segmented image of the second target foreground object, and determining parameters of the target segmented image group under the multi-scale structural similarity index index; S308, if the preset content comparison index includes a foreground object area overlap rate index, then obtain the area of ​​the target first foreground object in the segmented image of the target first foreground object, and the area of ​​the target second foreground object in the segmented image of the target second foreground object; compare the area of ​​the target first foreground object with the area of ​​the target second foreground object to determine the parameters of the target segmented image group under the foreground object area overlap rate index.

[0073] Specifically, firstly, all the segmented image groups to be analyzed need to be traversed.

[0074] For each target segmented image group traversed, if the preset content comparison index includes the Peak Signal-to-Noise Ratio (PSNR) index, the following operations need to be performed: Obtaining peak signal-to-noise ratio values: Calculate the peak signal-to-noise ratio value of the segmented image of the target first foreground object and the peak signal-to-noise ratio value of the segmented image of the target second foreground object in the target segmented image group. The peak signal-to-noise ratio is an indicator of image distortion or quality loss, and the higher the value, the better the image quality.

[0075] Comparing peak signal-to-noise ratio values: comparing the peak signal-to-noise ratio value of the segmented image of the first foreground object of the target with the peak signal-to-noise ratio value of the segmented image of the second foreground object of the target. The purpose of the comparison is to evaluate the similarity or difference in image quality between the two segmented images.

[0076] Determine parameters: According to the comparison results, determine the parameters of the target segmented image group under the peak signal-to-noise ratio index. This parameter can be the difference, ratio or other statistics of the two peak signal-to-noise ratio values, which is used to quantify the difference in image quality between the two segmented images.

[0077] For each target segmented image group traversed, if the preset content comparison index includes the Multi-Scale Structural Similarity Index (MSSSIM) index, the following operations need to be performed: Obtaining multi-scale structural similarity index values: Calculate the multi-scale structural similarity index values ​​of the segmented image of the first foreground object of the target and the multi-scale structural similarity index values ​​of the segmented image of the second foreground object of the target. The multi-scale structural similarity index is an indicator for measuring the structural similarity of two images, and the higher the value, the more similar the image structures are.

[0078] Comparing multi-scale structural similarity index values: comparing the multi-scale structural similarity index value of the segmented image of the first foreground object of the target with the multi-scale structural similarity index value of the segmented image of the second foreground object of the target. The purpose of the comparison is to evaluate the structural similarity or difference between the two segmented images.

[0079] Determine parameters: According to the comparison results, determine the parameters of the target segmented image group under the multi-scale structural similarity index indicator. This parameter can be the difference, ratio or other statistics of the two multi-scale structural similarity index values, which is used to quantify the structural differences between the two segmented images.

[0080] For each target segmentation image group traversed, if the preset content comparison index includes the foreground object area overlap ratio index, the following operations need to be performed: Obtaining foreground object areas: Calculate the area of ​​the first foreground object in the segmented image of the first foreground object, and the area of ​​the second foreground object in the segmented image of the second foreground object. The foreground object areas are obtained by calculating the number of pixels of the foreground objects in the segmented image.

[0081] Compare foreground object areas: Compare the area of ​​the first foreground object of the target with the area of ​​the second foreground object of the target. The purpose of the comparison is to evaluate the size similarity or difference of the foreground objects in the two segmented images.

[0082] Determine parameters: According to the comparison results, determine the parameters of the target segmented image group under the foreground object area overlap ratio indicator. This parameter can be the ratio of the intersection and union of the two foreground object areas (i.e., IoU, Intersection over Union), which is used to quantify the degree of overlap of the foreground object areas in the two segmented images.

[0083] In this embodiment, first, all the segmented image groups to be analyzed are traversed to ensure that each segmented image group can be accurately evaluated. Secondly, for each target segmented image group, the peak signal-to-noise ratio, multi-scale structural similarity index and foreground object area overlap rate are compared and analyzed according to different preset content comparison indicators. This diversified comparison can more comprehensively reflect the similarity or difference between the two segmented images at the content level. Finally, based on the comparison results, the parameters of the target segmented image group under each preset content comparison indicator are determined. These parameters can quantify the difference between the two segmented images at the content level, providing an effective reference for evaluating the extended object.

[0084] See also Figure 7 , a schematic diagram of a process for obtaining parameters of a segmented image group under a preset layout analysis index is provided for an embodiment of the present application, such as Figure 7 As shown, the method of the embodiment of the present application may include the following steps S402-S406.

[0085] S402, traversing at least one segmented image group; S404, for any one target segmented image group in the at least one segmented image group traversed, if the preset layout analysis index includes a display position index, obtain the central pixel point of the target second foreground object in the segmented image of the target second foreground object in the target segmented image group; perform analysis based on the central pixel point of the target second foreground object and a preset central pixel point reference range to determine the parameters of the target segmented image group under the display position index; S406, if the preset layout analysis index includes an area ratio index, then obtain the area ratio of the target second foreground object in the segmented image of the target second foreground object; perform analysis based on the area ratio of the target second foreground object and a preset area ratio reference range to determine the parameters of the target segmented image group under the area ratio index.

[0086] Specifically, firstly, all the segmented image groups to be analyzed need to be traversed.

[0087] For each target segmentation image group traversed, if the preset layout analysis indicators include display position indicators, the following operations need to be performed: Get the center pixel point: calculate the center pixel point of the target second foreground object in the segmented image of the target second foreground object in the target segmented image group. The center pixel point refers to the pixel point that can represent the position of the target second foreground object in the segmented image, which can be obtained by calculating the average position of all pixels of the target second foreground object in the segmented image.

[0088] Analyze display position: Analyze based on the center pixel of the target second foreground object and the preset center pixel reference range. The preset center pixel reference range refers to an area defined in the segmented image to determine whether the foreground object is in the expected position. By comparing whether the center pixel of the target second foreground object is within the preset center pixel reference range, it can be evaluated whether the display position of the foreground object meets expectations.

[0089] Determine parameters: Based on the analysis results, determine the parameters of the target segmented image group under the display position indicator. This parameter can be a Boolean value (indicating whether the foreground object is in the expected position) or a distance measurement between the center pixel and the preset center pixel reference range (indicating the degree to which the foreground object deviates from the expected position).

[0090] For easier understanding of this embodiment, please refer to Figure 8 as well as Fig. 9 , Figure 8 is an example schematic diagram of the position and proportion of a second foreground object provided in an embodiment of this specification. Fig. 9 FIG. 1 is a schematic diagram showing an example of the position and proportion of a second foreground object provided in an embodiment of this specification. Figure 8 In the example, the preset central pixel reference range defines an area 005 in the segmented image 004, and the central pixel 007 of the target second foreground object 006 is located outside the area 005. Then, it can be considered that the target second foreground object 006 deviates from the expected position, and the parameter of the target segmented image group under the display position index may be determined as a Boolean value of 0 (indicating that the target second foreground object 006 deviates from the expected position). Fig. 9 In the example, the preset central pixel reference range defines an area 005 in the segmented image 004, and the central pixel point 007 of the target second foreground object 006 is located in the area 005. Then, it can be considered that the target second foreground object 006 meets the expected position, and the parameter of the target segmented image group under the display position indicator may be determined as a Boolean value 1 (indicating that the target second foreground object 006 meets the expected position).

[0091] For each target segmentation image group traversed, if the preset layout analysis index includes the area ratio index, the following operations need to be performed: Get area ratio: Calculate the area ratio of the target second foreground object in the segmented image of the target second foreground object. The area ratio refers to the area ratio of the target second foreground object in the segmented image, which can be obtained by calculating the ratio of the number of pixels of the target second foreground object to the total number of pixels in the segmented image.

[0092] Analyze area ratio: Perform analysis based on the area ratio of the target second foreground object and the preset area ratio reference range. The preset area ratio reference range refers to an area ratio range defined in the image, which is used to determine whether the area ratio of the target second foreground object meets expectations. By comparing whether the area ratio of the target second foreground object is within the preset area ratio reference range, you can evaluate whether the area size of the target second foreground object meets expectations.

[0093] Determine parameters: Based on the analysis results, determine the parameters of the target segmented image group under the area ratio indicator. This parameter can be a Boolean value (indicating whether the area ratio of the foreground object meets expectations) or a certain difference measure between the area ratio and the preset area ratio reference range (indicating the degree to which the area ratio of the foreground object deviates from expectations).

[0094] In this embodiment, first, all the segmented image groups to be analyzed are traversed to ensure that each segmented image group can be comprehensively evaluated. Secondly, for each target segmented image group, the display position index and the area ratio index are analyzed respectively according to different preset layout analysis indicators. In the analysis of the display position index, by calculating the center pixel point of the target second foreground object and comparing it with the preset center pixel reference range, it is possible to accurately determine whether the display position of the foreground object meets expectations. In the analysis of the area ratio index, by calculating the area ratio of the target second foreground object and comparing it with the preset area ratio reference range, it is possible to accurately evaluate whether the area size of the foreground object meets expectations. Based on the above precise and targeted analysis method, more accurate and valuable layout analysis information is provided for the evaluation process of the extended image.

[0095] In one embodiment, Figure 2 In the illustrated embodiment, step S102 is further refined and may further include the following steps: Get the segmentation prompt information corresponding to the preset object type; Input the segmentation prompt information and the original image into a pre-trained image segmentation model to obtain a segmented image of the first foreground object output by the image segmentation model; The segmentation prompt information and the extended image are input into the image segmentation model to obtain a segmented image of the second foreground object output by the image segmentation model.

[0096] Specifically, the image segmentation model involved in this embodiment is a model that can receive text input as image segmentation guidance, such as SAM (Segment Anything Model).

[0097] First, we need to obtain the segmentation hint information corresponding to the preset object type. Segmentation hint information is a kind of guiding data that provides information on how to identify and segment specific types of objects in an image. This information may include the name, category, shape, color, texture, etc. of the object, as well as the possible location of the object in the image.

[0098] Once the segmentation hint information is obtained, the segmentation hint information can be input into the pre-trained image segmentation model together with the original image and the extended image. Taking SAM as an example, SAM is a deep learning-based model that can learn and understand complex features in the image, thereby achieving accurate segmentation of the foreground object. The segmentation hint information and the original image are input into SAM, and SAM processes the original image according to the feature guidance in the segmentation hint information and outputs a segmented image of the first foreground object. This segmented image may be a binary image, in which the foreground object is marked with a specific pixel value (such as 1) and the background is marked with another pixel value (such as 0). Or in some cases, the segmented image may also be an image in other forms other than a binary image, such as a grayscale image or a color image. Similarly, the segmentation hint information and the extended image are input into SAM, and SAM processes the extended image according to the feature guidance in the segmentation hint information and outputs a segmented image of the second foreground object.

[0099] Through the above steps, two segmentation images of foreground objects can be obtained: one is the segmentation image of the original image, and the other is the segmentation image of the expanded image. These two segmentation images represent the recognition and segmentation results of the foreground object by the image segmentation model under different image inputs.

[0100] In this embodiment, firstly, the segmentation hint information provides clear guidance for the image segmentation model, helping the model to more accurately identify and segment the foreground object in the image. Secondly, by inputting the segmentation hint information into the image segmentation model together with the original image and the expanded image, segmented images of two different foreground objects can be obtained, thereby improving the accuracy and robustness of the segmentation.

[0101] See also Fig.10 , which is a flow chart of a model training method provided in the embodiment of this specification. Fig.10 As shown, the method of the embodiment of this specification may include the following steps S502 to S508.

[0102] S502, creating an initial feature evaluation model.

[0103] Specifically, as the starting point of the model training process, the key is to build a basic framework that can learn and understand image features. The initial feature evaluation model created in this embodiment is based on deep learning technology, such as convolutional neural network (CNN), which can automatically extract key features in the image and evaluate them. When creating the initial feature evaluation model, the corresponding structure, number of layers, number of nodes and other parameters can be configured for the initial feature evaluation model. The setting of these parameters will directly affect the complexity and learning ability of the initial feature evaluation model.

[0104] S504, obtaining an image pair sample set, wherein the image pair sample set includes multiple image pair samples with feature evaluation result annotation information, and any target image pair sample in the multiple image pair samples includes an original image sample and an extended image sample, and the extended image sample is generated by background extension based on the foreground object in the original image sample.

[0105] Specifically, in order to support the training of the initial feature evaluation model, it is necessary to obtain an image pair sample set. The image pair sample set contains multiple image pair samples with feature evaluation result annotation information, where each image pair sample consists of an original image sample and an extended image sample. The original image sample is an unprocessed natural image, while the extended image sample is generated by background extension based on the foreground object in the original image. This background extension can be achieved through AIGC technology, such as replacing or modifying the background content while keeping the foreground object unchanged. For the definition of feature evaluation result annotation information in the image pair sample set, please refer to Figure 2 The explanation of the feature evaluation results in the illustrated embodiment is different in that the feature evaluation result annotation information exists in the form of annotation information, which will serve as the goal of model training to guide the model to learn how to evaluate images.

[0106] S506, iteratively training the initial feature evaluation model based on the image pair sample set.

[0107] Specifically, in order to make the initial feature evaluation model have sufficient generalization ability, it is necessary to iteratively train the initial feature evaluation model based on the image pair sample set. In each iteration, the initial feature evaluation model will traverse the image pair sample set, extract features and predict feature evaluation results for each image pair sample, and then calculate the loss function value based on the difference between the predicted feature evaluation results and the feature evaluation result annotation information. The loss function value reflects the prediction error of the initial feature evaluation model under the current parameter settings. By adjusting the model parameters through optimization algorithms (such as gradient descent method), the loss function value can be gradually reduced and the prediction accuracy of the initial feature evaluation model can be improved. The iterative training process needs to traverse the image pair sample set multiple times until the performance of the initial feature evaluation model reaches a stable level.

[0108] S508: If the preset convergence condition is met, the initial feature evaluation model is determined as a pre-trained feature evaluation model.

[0109] Specifically, the convergence conditions involved in this embodiment are pre-set, and the convergence conditions refer to the criteria used to determine whether the training is completed during the model training process, and may include the range of change of the loss function value, the upper limit of the number of iterations, etc. When the change of the loss function value of the initial feature evaluation model in several consecutive iterations is very small or reaches the upper limit of the number of iterations, it can be considered that the initial feature evaluation model has converged to a stable performance level. At this time, the initial feature evaluation model can be determined as a pre-trained feature evaluation model for subsequent image feature evaluation tasks. If the initial feature evaluation model does not meet the convergence conditions, it is necessary to continue iterative training until convergence is reached.

[0110] In this embodiment, firstly, the initial feature evaluation model constructed based on deep learning technology has a powerful image feature extraction capability, which lays a solid foundation for subsequent model training. Secondly, by obtaining an image pair sample set containing multiple image pair samples and annotating the feature evaluation results for each image pair sample, rich and high-quality training data is provided for model training. This enables the model to learn more accurate and comprehensive image feature evaluation knowledge during the training process. Finally, the initial feature evaluation model is optimized by iterative training until the preset convergence conditions are met, ensuring that the final feature evaluation model has stable performance and high prediction accuracy.

[0111] In one embodiment, Fig.10 The initial feature evaluation model in the illustrated embodiment includes an image feature extraction layer, a feature difference analysis layer, and a feature evaluation layer; The image feature extraction layer is used to receive the input original image samples and the extended image samples, and obtain the image feature matrix of the original image samples and the image feature matrix of the extended image samples respectively; A feature difference analysis layer, used to determine feature difference information between the original image sample and the extended image sample based on the image feature matrix of the original image sample and the image feature matrix of the extended image sample; The feature evaluation layer is used to determine the feature evaluation result of the extended image sample based on the feature difference information between the original image sample and the extended image sample.

[0112] Specifically, the initial feature evaluation model is configured as a deep learning model with a multi-layer structure, including an image feature extraction layer, a feature difference analysis layer, and a feature evaluation layer. The following is a detailed description of the specific implementation of these three layers: Image feature extraction layer: As the input end of the initial feature evaluation model, the image feature extraction layer is responsible for receiving the input original image samples and extended image samples, and performing deep feature extraction on the original image samples and the extended image samples to obtain the image feature matrices of the original image samples and the extended image samples respectively. To achieve this goal, the image feature extraction layer can be constructed based on the image encoder part of the CLIP-ViT model. The CLIP-ViT model is a visual-language pre-training model, and its image encoder part can automatically extract rich feature information from the image, such as edges, textures, shapes, etc., and represent this information in the form of a feature matrix. In this way, both the original image samples and the extended image samples can obtain their respective feature representations through the image feature extraction layer.

[0113] Feature difference analysis layer: The task of the feature difference analysis layer is to determine the feature difference information between the original image sample and the extended image sample based on the image feature matrix of the original image sample and the image feature matrix of the extended image sample output by the image feature extraction layer. In order to achieve this goal, the feature difference analysis layer can use some specific algorithms or operations to calculate the difference between the two image feature matrices. For example, the degree of difference between the two image feature matrices can be measured by calculating indicators such as the Euclidean distance, cosine similarity, or structural similarity index (SSIM) between them, and the feature difference information between the original image sample and the extended image sample can be obtained. The feature difference information between the original image sample and the extended image sample can reflect the similarity and difference between the original image sample and the extended image sample at the feature level, providing an important basis for subsequent feature evaluation.

[0114] Feature evaluation layer: As the output end of the initial feature evaluation model, the feature evaluation layer is tasked with determining the feature evaluation result of the extended image sample based on the feature difference information between the original image sample and the extended image sample output by the feature difference analysis layer. To achieve this goal, the feature evaluation layer can be constructed based on MLP (Multilayer Perceptron). MLP is a feedforward neural network that can output the feature evaluation result of the extended image sample by further processing and judging the feature difference information. For example, some thresholds or rules can be set to determine whether the features of the extended image sample meet expectations or standards. If the feature difference information indicates that the extended image sample and the original image sample maintain consistency or similarity at the feature level and meet the preset standards or requirements, the feature evaluation layer will give a positive feature evaluation result; conversely, if the feature difference information indicates that the extended image sample and the original image sample have large differences at the feature level or do not meet the preset standards or requirements, the feature evaluation layer will give a negative feature evaluation result. Since the difference between the extended image sample and the original image sample mainly exists in the background, the feature evaluation result can be used to characterize the coordination between the extended image sample and the original image sample at the background level. In some possible implementations, the feature evaluation layer outputs a specific numerical value, for example, a value between 0 and 1, wherein a higher numerical value indicates that the extended image sample is more coordinated with the original image sample at the background level, and a lower numerical value indicates that the extended image sample is less coordinated with the original image sample at the background level.

[0115] To understand the hierarchical structure of the initial feature evaluation model in this embodiment, please refer to Fig.11 , Fig.11 This is an example schematic diagram of a training feature analysis model provided in an embodiment of this specification.

[0116] The original image sample 008a is processed by feature saliency to obtain the original image sample 008A, the extended image sample 008C is processed by feature saliency to obtain the extended image sample 008C, and the extended image sample 008c is processed by feature saliency to obtain the extended image sample 008C. Among them, the extended image sample 008B is of good quality, while the extended image sample 008C is of poor quality.

[0117] The original image sample 008A and the extended image sample 008B actually constitute an image pair sample AB. Since the extended image sample 008B is of better quality, the feature evaluation result annotation information of the image pair sample AB can correspond to a higher value (for example, between the possible value range of 0 to 1, the value is determined to be 0.9). The image pair sample AB is the input of the initial feature evaluation model 009 and will first be received by the image feature extraction layer 009A. The image feature extraction layer 009A will extract the image feature matrix of the original image sample 008A and the image feature matrix of the extended image sample 008B respectively. Then, the feature difference analysis layer 009B will determine the feature difference information between the original image sample 008A and the extended image sample 008B based on the image feature matrix of the original image sample 008A and the image feature matrix of the extended image sample 008B. Finally, the feature evaluation layer 009C determines the predicted feature evaluation result of the extended image sample 008B based on the feature difference information between the original image sample 008A and the extended image sample 008B. Then, the loss function value is calculated based on the difference between the predicted feature evaluation result and the feature evaluation result annotation information. The loss function value reflects the prediction error of the initial feature evaluation model 009 under the current parameter setting. By adjusting the model parameters through an optimization algorithm (such as the gradient descent method), the loss function value can be gradually reduced, thereby improving the prediction accuracy of the initial feature evaluation model 009.

[0118] The original image sample 008A and the extended image sample 008C actually constitute an image pair sample AC. Since the extended image sample 008C is of poor quality, the feature evaluation result annotation information of the image pair sample AC may correspond to a lower value (for example, between the possible value range of 0 and 1, the value is determined to be 0.3). The image pair sample AC is the input of the initial feature evaluation model 009 and will first be received by the image feature extraction layer 009A. The image feature extraction layer 009A will extract the image feature matrix of the original image sample 008A and the image feature matrix of the extended image sample 008C respectively. Then, the feature difference analysis layer 009B will determine the feature difference information between the original image sample 008A and the extended image sample 008C based on the image feature matrix of the original image sample 008A and the image feature matrix of the extended image sample 008C. Finally, the feature evaluation layer 009C determines the predicted feature evaluation result of the extended image sample 008C based on the feature difference information between the original image sample 008A and the extended image sample 008C. Then, the loss function value is calculated based on the difference between the predicted feature evaluation result and the feature evaluation result annotation information. The loss function value reflects the prediction error of the initial feature evaluation model 009 under the current parameter setting. By adjusting the model parameters through an optimization algorithm (such as the gradient descent method), the loss function value can be gradually reduced, thereby improving the prediction accuracy of the initial feature evaluation model 009.

[0119] Fig.11 Only some examples of image samples are given. In fact, the initial feature evaluation model is trained by relying on a large number of extended image samples with good quality, extended image samples with poor quality, and original image samples, thus having a certain generalization ability.

[0120] In this embodiment, the initial feature evaluation model is designed as a deep learning model with a multi-level structure, including an image feature extraction layer, a feature difference analysis layer, and a feature evaluation layer. This multi-level structure design enables the model to process and analyze image data more effectively. The image feature extraction layer can automatically extract rich feature information from the original image sample and the extended image sample, providing a basis for subsequent feature difference analysis. The feature difference analysis layer can accurately calculate the feature difference information between the original image sample and the extended image sample, reflecting their similarities and differences at the feature level. Finally, the feature evaluation layer evaluates the features of the extended image sample based on the feature difference information, and outputs a feature evaluation result with practical significance. This multi-level structure design not only improves the prediction accuracy of the model, but also enhances the generalization ability of the model, so that it can be better applied to actual image feature evaluation tasks.

[0121] In one embodiment, the feature difference analysis layer is also used to extract the global feature vector of the original image sample from the image feature matrix of the original image sample, extract the global feature vector of the extended image sample from the image feature matrix of the extended image sample, and determine the feature difference information between the original image sample and the extended image sample based on the global feature vector of the original image sample and the global feature vector of the extended image sample.

[0122] Specifically, the feature difference analysis layer receives the image feature matrix of the original image sample and the image feature matrix of the extended image sample from the image feature extraction layer. These two image feature matrices contain rich information of the original image and the extended image at the deep feature level. In order to more comprehensively analyze the difference between the original image sample and the extended image sample, the feature difference analysis layer further extracts the global feature vector from the two image feature matrices.

[0123] In the process of extracting the global feature vector, the feature difference analysis layer may focus on certain specific elements or regions in the image feature matrix, which are considered to represent the global features of the image sample. For example, in a model based on the Transformer architecture, the global feature vector is usually associated with CLS (Classification Token). CLS is a special token that plays the role of summarizing global information in the self-attention mechanism of the Transformer. Therefore, the feature difference analysis layer can extract the feature vector corresponding to CLS from the image feature matrix as the global feature vector.

[0124] Once the global feature vector of the original image sample and the global feature vector of the extended image sample are extracted, the feature difference analysis layer will determine the feature difference information between the original image sample and the extended image sample based on the global feature vector of the original image sample and the global feature vector of the extended image sample. This process can be achieved by calculating the similarity or distance between the two global feature vectors. For example, cosine similarity can be used to measure the similarity of two global feature vectors in direction, or Euclidean distance can be used to measure the distance between two global feature vectors in space. These similarity or distance indicators can reflect the similarities and differences between the original image sample and the extended image sample at the global feature level.

[0125] In addition to calculating the similarity or distance between global feature vectors, the feature difference analysis layer can further analyze specific elements or dimensions in two global feature vectors. For example, it can compare the values ​​of two global feature vectors in various dimensions to determine which dimensions have the most significant feature differences. This fine-grained analysis helps to gain a deeper understanding of the feature differences between the original image samples and the expanded image samples. Ultimately, the feature difference analysis layer will output the feature difference information in an appropriate form for use by the subsequent feature evaluation layer.

[0126] In this embodiment, the process of extracting global feature vectors enables the model to capture the overall features and key information in the image sample, rather than just being limited to local details. By calculating the similarity or distance between global feature vectors, the feature difference analysis layer can more accurately measure the similarities and differences between the original image sample and the extended image sample at the global feature level. This global feature analysis not only improves the accuracy and comprehensiveness of feature difference information, but also provides richer information for the subsequent feature evaluation layer, which helps the model to make more accurate feature evaluation results.

[0127] Based on the above Figure 2 - Fig.11 The embodiment shown in this specification may include the following steps: In response to an original image uploaded by a user on a user interface, determining a background template corresponding to the original image; Based on the background template corresponding to the original image, performing background extension on the first foreground object in the original image to generate an extended image; In response to the input original image and the extended image, the original image is segmented to obtain a segmented image of a first foreground object that meets the preset object type, and the extended image is segmented to obtain a segmented image of a second foreground object that meets the preset object type, wherein the extended image is generated by background extension based on the first foreground object in the original image; Performing image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object to determine a foreground object evaluation result of the extended image; Calling a pre-trained feature evaluation model to evaluate the feature difference between the original image and the extended image, and determining the feature evaluation result of the extended image; Based on the foreground object evaluation result and the feature evaluation result, a comprehensive evaluation result of the extended image is determined.

[0128] Specifically, in response to the original image uploaded by the user in the user interface, a series of processing is first required to determine the background template corresponding to the original image. This step can be achieved by automatically analyzing the content of the original image or by selecting the background template based on the user's operation in the user interface. Specifically, if the automatic analysis method is adopted, an image recognition algorithm or a deep learning model can be used to detect the background features in the original image. These features may include color, texture, shape, and spatial layout. By analyzing these features, a feature set representing the background of the original image can be constructed, and then a background template matching the original image can be determined or selected based on this feature set. If it is based on the user's selection operation, the background template corresponding to the original image is determined directly in response to the user's background template selection operation in the user interface.

[0129] Once the background template corresponding to the original image is determined, the next step is to perform background extension on the first foreground object in the original image based on the background template corresponding to the original image and AIGC technology to generate an extended image. The background extension process is essentially a reconstruction of the relationship between the foreground object and the background in the original image. In this process, new background elements that match the background of the original image are generated using AIGC technology based on the characteristics of the background template, and the first foreground object in the original image is spatially extended so that it maintains its original features in the new background environment while blending with the new background elements. In some cases, this fusion involves smoothing the edges of the foreground object, adjusting lighting and shadows, and coordinating the color and texture with the new background elements to ensure the visual consistency and coherence of the extended image.

[0130] For a detailed process of determining the comprehensive evaluation result of the extended image in response to the input original image and the extended image, please refer to Figure 2 The explanation of the illustrated embodiment will not be repeated here.

[0131] In this embodiment, the user can upload the original image on the user interface, and the background template is determined automatically or according to the user's selection, and then the background of the foreground object in the original image is extended using the AIGC technology to generate an extended image. This process effectively improves the degree of automation of image editing and enhancement, and combined with the subsequent comprehensive evaluation process of the extended image, it can quickly complete the screening and filtering of the extended image, thereby improving the generation efficiency and evaluation efficiency of the extended image.

[0132] In one embodiment, after determining the comprehensive evaluation result of the extended image based on the foreground object evaluation result and the feature evaluation result, the following steps are further included: If the comprehensive evaluation result indicates that the evaluation is passed, first evaluation result information is pushed to the user interface for display, wherein the first evaluation result information is used to prompt the user that the extended image has passed the evaluation; If the comprehensive evaluation result indicates that the evaluation fails, the second evaluation result information is pushed to the user interface for display, wherein the second evaluation result information is used to prompt the user that the extended image fails the evaluation.

[0133] Specifically, after completing the comprehensive evaluation of the extended image and obtaining the comprehensive evaluation result, corresponding operations can be further performed according to the comprehensive evaluation result. If the comprehensive evaluation result indicates that the evaluation is passed, that is, the comprehensive performance of the extended image meets expectations, then the first evaluation result information will be pushed to the user interface for display. The first evaluation result information is intended to clearly prompt the user that the extended image has successfully passed the evaluation and its quality and effect have reached the expected standards. By displaying such evaluation result information, the user can intuitively understand that the generation effect of the extended image meets the requirements and can continue to use this extended image.

[0134] On the contrary, if the comprehensive evaluation result indicates that the evaluation fails, that is, the comprehensive performance of the extended image does not meet expectations, then the second evaluation result information will be pushed to the user interface for display. The second evaluation result information is intended to clearly prompt the user that the extended image has failed the evaluation and there may be problems or deficiencies in certain aspects. By displaying the second evaluation result information, the user can promptly understand the possible problems in the generation process of the extended image, and make corresponding adjustments or corrections accordingly, so as to regenerate an extended image that meets the requirements.

[0135] In this embodiment, after the comprehensive evaluation result of the extended image is determined, the corresponding evaluation result information can be intelligently pushed to the user interface, so that the user can intuitively and promptly understand the evaluation status of the extended image. This timely feedback mechanism helps users to perform image editing more efficiently.

[0136] In one embodiment, after determining the comprehensive evaluation result of the extended image based on the foreground object evaluation result and the feature evaluation result, the following steps are further included: If the comprehensive evaluation result indicates that the evaluation is passed, the extended image is pushed to the manual review interface for display; in response to the review passing operation on the manual review interface, the first evaluation result information is pushed to the user interface for display, wherein the first evaluation result information is used to prompt the user that the extended image has passed the evaluation; If the comprehensive evaluation result indicates that the evaluation fails, the second evaluation result information is pushed to the user interface for display, wherein the second evaluation result information is used to prompt the user that the extended image fails the evaluation.

[0137] Specifically, after the comprehensive evaluation of the extended image is completed and the comprehensive evaluation result is obtained, corresponding operations can be performed according to the comprehensive evaluation result. If the comprehensive evaluation result indicates that the evaluation is passed, that is, the comprehensive performance of the extended image meets expectations, then this extended image will be pushed to the manual review interface for display. This step is to ensure that the evaluation of the extended image is more accurate and comprehensive, because manual review can provide more detailed judgments. In the manual review interface, the reviewer can carefully review and analyze the extended image to determine whether it truly meets the evaluation criteria and user needs.

[0138] In the manual review interface, if the reviewer believes that the extended image does meet the evaluation criteria and user needs, they can perform a review pass operation. In response to this review pass operation, the first evaluation result information will be pushed to the user interface for display. The first evaluation result information is intended to clearly prompt the user that the extended image has successfully passed the system's comprehensive evaluation and manual review, and its quality and effect have reached the expected standards. By displaying such evaluation result information, the user can intuitively understand that the generated effect of the extended image meets the requirements, so that the extended image can continue to be used.

[0139] On the contrary, if the comprehensive evaluation result indicates that the evaluation fails, that is, the comprehensive performance of the extended image does not meet expectations, then the second evaluation result information will be pushed directly to the user interface for display. The second evaluation result information is intended to clearly prompt the user that the extended image has failed the comprehensive evaluation of the system and may have problems or deficiencies in certain aspects. By displaying the second evaluation result information, the user can promptly understand the possible problems in the generation process of the extended image, and make corresponding adjustments or corrections accordingly, so as to regenerate an extended image that meets the requirements.

[0140] In this embodiment, after determining the comprehensive evaluation result of the extended image, a manual review process is further introduced. This dual review mechanism effectively ensures the efficiency and quality of the extended image evaluation. At the same time, for extended images that pass or fail the evaluation, clear feedback can be provided to the user in a timely manner, making it convenient for the user to manage the extended image.

[0141] To understand the effect of image evaluation in this specification, please refer to Fig.12 and Fig.13 , Fig.12 is an example schematic diagram of an image evaluation effect provided in an embodiment of this specification, Fig.13 It is an example schematic diagram of an image evaluation effect provided in an embodiment of this specification.

[0142] like Fig.12As shown, there are two extended images corresponding to the original image containing the glasses case and the glasses, and both of these extended images are determined to be unapproved due to the inconsistent background; there are two extended images corresponding to the original image containing the handbag, and both of these extended images are determined to be unapproved due to the inconsistent background.

[0143] like Fig.13 As shown, there are four extended images corresponding to the original image containing shoes, and all of these four extended images have passed the evaluation in terms of foreground objects and background features, and these four extended images are finally determined to be passed; there are four extended images corresponding to the original image containing a vacuum cleaner, and all of these four extended images have passed the evaluation in terms of foreground objects and background features, and these four extended images are finally determined to be passed.

[0144] based on Figure 1 The following will combine Fig.14 , the image evaluation device provided in the embodiment of this specification is introduced in detail. It should be noted that, Fig.14 The image evaluation device 1 is used to execute the Figure 2 - Fig.13 For the convenience of explanation, only the part related to the embodiment of this specification is shown. For the specific technical details not disclosed, please refer to this specification. Figure 2 - Fig.13 The embodiment shown.

[0145] The image evaluation device 1 may include: The segmentation unit 11 is used for performing image segmentation on the original image to obtain a segmented image of a first foreground object that meets the preset object type, and performing image segmentation on the extended image to obtain a segmented image of a second foreground object that meets the preset object type in response to the input original image and the extended image, wherein the extended image is generated by performing background extension based on the first foreground object in the original image; A first evaluation unit 12, configured to perform image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object to determine an evaluation result of the foreground object of the extended image; The second evaluation unit 13 is used to call a pre-trained feature evaluation model to evaluate the feature difference between the original image and the extended image, and determine the feature evaluation result of the extended image; The determination unit 14 is used to determine the comprehensive evaluation result of the extended image based on the foreground object evaluation result and the feature evaluation result.

[0146] Optionally, there is at least one first foreground object and at least one second foreground object; the first evaluation unit 12 is further used to: determine the pixel similarity between the segmented images of each first foreground object and the segmented images of each second foreground object for each first foreground object in the at least one first foreground object and each second foreground object in the at least one second foreground object; determine at least one segmented image group based on the pixel similarity between the segmented images of each first foreground object and the segmented images of each second foreground object, wherein any one segmented image group in the at least one segmented image group includes a corresponding segmented image of a first foreground object and a segmented image of a second foreground object; respectively obtain parameters of each segmented image group under a preset content comparison index; respectively obtain parameters of each segmented image group under a preset layout analysis index; and determine the foreground object evaluation result of the extended image based on the parameters of each segmented image group under the preset content comparison index and the parameters under the preset layout analysis index.

[0147] Optionally, the first evaluation unit 12 is further used to: traverse at least one segmented image group; for any target segmented image group in the at least one segmented image group traversed, if the preset content comparison index includes a peak signal-to-noise ratio index, obtain the peak signal-to-noise ratio value of the segmented image of the target first foreground object in the target segmented image group, and the peak signal-to-noise ratio value of the segmented image of the target second foreground object in the target segmented image group; compare the peak signal-to-noise ratio value of the segmented image of the target first foreground object with the peak signal-to-noise ratio value of the segmented image of the target second foreground object to determine the parameters of the target segmented image group under the peak signal-to-noise ratio index; if the preset content comparison index includes a multi-scale structural similarity index, obtain the multi-scale structure of the segmented image of the target first foreground object. similarity index value, and the multi-scale structural similarity index value of the segmented image of the target second foreground object; according to the multi-scale structural similarity index value of the segmented image of the target first foreground object and the multi-scale structural similarity index value of the segmented image of the target second foreground object, the parameters of the target segmented image group under the multi-scale structural similarity index index are compared; if the preset content comparison index includes the foreground object area overlap rate index, the area of ​​the target first foreground object in the segmented image of the target first foreground object and the area of ​​the target second foreground object in the segmented image of the target second foreground object are obtained; according to the area of ​​the target first foreground object and the area of ​​the target second foreground object, the parameters of the target segmented image group under the foreground object area overlap rate index are determined.

[0148] Optionally, the first evaluation unit 12 is further used to: traverse at least one segmented image group; for any target segmented image group in the at least one segmented image group traversed, if the preset layout analysis index includes a display position index, obtain the center pixel point of the target second foreground object in the segmented image of the target second foreground object in the target segmented image group; perform analysis based on the center pixel point of the target second foreground object and a preset center pixel point reference range to determine the parameters of the target segmented image group under the display position index; if the preset layout analysis index includes an area ratio index, obtain the area ratio of the target second foreground object in the segmented image of the target second foreground object; perform analysis based on the area ratio of the target second foreground object and a preset area ratio reference range to determine the parameters of the target segmented image group under the area ratio index.

[0149] Optionally, the segmentation unit 11 is also used to: obtain segmentation prompt information corresponding to a preset object type; input the segmentation prompt information and the original image into a pre-trained image segmentation model to obtain a segmentation image of a first foreground object output by the image segmentation model; input the segmentation prompt information and the extended image into the image segmentation model to obtain a segmentation image of a second foreground object output by the image segmentation model.

[0150] The effects that can be achieved by this embodiment can be found in the relevant embodiments of the above-mentioned image evaluation method, which will not be described in detail here.

[0151] based on Figure 1 The following will combine Fig.15 , the model training device provided in the embodiment of this specification is introduced in detail. It should be noted that, Fig.15 The model training device 2 in this specification is used to execute Figure 2 - Fig.13 For the convenience of explanation, only the part related to the embodiment of this specification is shown. For the specific technical details not disclosed, please refer to this specification. Figure 2 - Fig.13 The embodiment shown.

[0152] The model training device 2 may include: A creation unit 21, used for creating an initial feature evaluation model; An acquisition unit 22 is used to acquire an image pair sample set, wherein the image pair sample set includes a plurality of image pair samples with feature evaluation result annotation information, and any target image pair sample among the plurality of image pair samples includes an original image sample and an extended image sample, and the extended image sample is generated by background extension based on a foreground object in the original image sample; A training unit 23, used for iteratively training an initial feature evaluation model based on the image pair sample set; The determination unit 24 is configured to determine the initial feature evaluation model as a pre-trained feature evaluation model if a preset convergence condition is met.

[0153] Optionally, the initial feature evaluation model includes an image feature extraction layer, a feature difference analysis layer and a feature evaluation layer; the image feature extraction layer is used to receive input original image samples and extended image samples, and obtain the image feature matrix of the original image samples and the image feature matrix of the extended image samples, respectively; the feature difference analysis layer is used to determine the feature difference information between the original image samples and the extended image samples based on the image feature matrix of the original image samples and the image feature matrix of the extended image samples; the feature evaluation layer is used to determine the feature evaluation result of the extended image sample based on the feature difference information between the original image samples and the extended image samples.

[0154] Optionally, the feature difference analysis layer is also used to extract the global feature vector of the original image sample from the image feature matrix of the original image sample, extract the global feature vector of the extended image sample from the image feature matrix of the extended image sample, and determine the feature difference information between the original image sample and the extended image sample based on the global feature vector of the original image sample and the global feature vector of the extended image sample.

[0155] For the effects that can be achieved by this embodiment, please refer to the relevant embodiments of the above-mentioned model training method, which will not be repeated here.

[0156] See also Fig.16 , is a schematic diagram of the structure of an electronic device provided in the embodiment of this specification. Fig.16 As shown, the electronic device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, an input / output interface 1003, a memory 1005, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. Fig.16 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, an input / output interface module, an image evaluation application, and a model training application.

[0157] exist Fig.16In the electronic device 1000 shown, the input-output interface 1003 is mainly used to provide an input interface for the user and obtain data input by the user.

[0158] In one embodiment, the processor 1001 may be used to call the image evaluation application stored in the memory 1005, and specifically perform the following operations: In response to the input original image and the extended image, the original image is segmented to obtain a segmented image of a first foreground object that meets the preset object type, and the extended image is segmented to obtain a segmented image of a second foreground object that meets the preset object type, wherein the extended image is generated by background extension based on the first foreground object in the original image; Performing image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object to determine a foreground object evaluation result of the extended image; Calling a pre-trained feature evaluation model to evaluate the feature difference between the original image and the extended image, and determining the feature evaluation result of the extended image; Based on the foreground object evaluation result and the feature evaluation result, a comprehensive evaluation result of the extended image is determined.

[0159] Optionally, there is at least one first foreground object and at least one second foreground object; when the processor 1001 performs image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object to determine the foreground object evaluation result of the extended image, the following specific operations are performed: for each first foreground object in at least one first foreground object and each second foreground object in at least one second foreground object, the pixel similarity between the segmented image of each first foreground object and the segmented image of each second foreground object is determined respectively; based on the pixel similarity between the segmented image of each first foreground object and the segmented image of each second foreground object, at least one segmented image group is determined, wherein any one segmented image group in the at least one segmented image group includes a corresponding segmented image of the first foreground object and a segmented image of the second foreground object; parameters of each segmented image group under a preset content comparison index are obtained respectively; parameters of each segmented image group under a preset layout analysis index are obtained respectively; based on the parameters of each segmented image group under the preset content comparison index and the parameters under the preset layout analysis index, the foreground object evaluation result of the extended image is determined.

[0160] Optionally, when the processor 1001 executes the execution of respectively obtaining the parameters of each segmented image group under the preset content comparison index, the processor 1001 specifically performs the following operations: traverse at least one segmented image group; for any target segmented image group in the at least one segmented image group traversed, if the preset content comparison index includes a peak signal-to-noise ratio index, obtain the peak signal-to-noise ratio value of the segmented image of the target first foreground object in the target segmented image group, and the peak signal-to-noise ratio value of the segmented image of the target second foreground object in the target segmented image group; compare the peak signal-to-noise ratio value of the segmented image of the target first foreground object with the peak signal-to-noise ratio value of the segmented image of the target second foreground object to determine the parameters of the target segmented image group under the peak signal-to-noise ratio index; if the preset content comparison index includes a multi-scale structural similarity index, obtain the peak signal-to-noise ratio value of the segmented image of the target first foreground object; The method comprises the following steps: determining a multi-scale structural similarity index value of a segmented image of a foreground object, and a multi-scale structural similarity index value of a segmented image of a target second foreground object; comparing the multi-scale structural similarity index value of the segmented image of the target first foreground object with the multi-scale structural similarity index value of the segmented image of the target second foreground object, and determining parameters of the target segmented image group under the multi-scale structural similarity index index; if the preset content comparison index includes a foreground object area overlap rate index, obtaining the area of ​​the target first foreground object in the segmented image of the target first foreground object, and obtaining the area of ​​the target second foreground object in the segmented image of the target second foreground object; and determining parameters of the target segmented image group under the foreground object area overlap rate index according to the comparison of the area of ​​the target first foreground object with the area of ​​the target second foreground object.

[0161] Optionally, when the processor 1001 executes the operation of respectively obtaining parameters of each segmented image group under a preset layout analysis indicator, the following operations are specifically performed: traversing at least one segmented image group; for any target segmented image group in the at least one segmented image group traversed, if the preset layout analysis indicator includes a display position indicator, obtaining the center pixel point of the target second foreground object in the segmented image of the target second foreground object in the target segmented image group; performing analysis based on the center pixel point of the target second foreground object and a preset center pixel point reference range to determine the parameters of the target segmented image group under the display position indicator; if the preset layout analysis indicator includes an area ratio indicator, obtaining the area ratio of the target second foreground object in the segmented image of the target second foreground object; performing analysis based on the area ratio of the target second foreground object and a preset area ratio reference range to determine the parameters of the target segmented image group under the area ratio indicator.

[0162] Optionally, when performing image segmentation on the original image to obtain a segmented image of a first foreground object that conforms to a preset object type, and performing image segmentation on the extended image to obtain a segmented image of a second foreground object that conforms to a preset object type, the processor 1001 specifically performs the following operations: obtaining segmentation prompt information corresponding to the preset object type; inputting the segmentation prompt information and the original image into a pre-trained image segmentation model to obtain a segmented image of the first foreground object output by the image segmentation model; inputting the segmentation prompt information and the extended image into the image segmentation model to obtain a segmented image of the second foreground object output by the image segmentation model.

[0163] In one embodiment, the processor 1001 may be used to call a model training application stored in the memory 1005, and specifically perform the following operations: Create an initial feature evaluation model; Acquire an image pair sample set, wherein the image pair sample set includes multiple image pair samples with feature evaluation result annotation information, any one target image pair sample in the multiple image pair samples includes an original image sample and an extended image sample, and the extended image sample is generated by background extension based on a foreground object in the original image sample; Iteratively train the initial feature evaluation model based on the image pair sample set; If the preset convergence condition is met, the initial feature evaluation model is determined as the pre-trained feature evaluation model.

[0164] Optionally, the initial feature evaluation model includes an image feature extraction layer, a feature difference analysis layer and a feature evaluation layer; the image feature extraction layer is used to receive input original image samples and extended image samples, and obtain the image feature matrix of the original image samples and the image feature matrix of the extended image samples, respectively; the feature difference analysis layer is used to determine the feature difference information between the original image samples and the extended image samples based on the image feature matrix of the original image samples and the image feature matrix of the extended image samples; the feature evaluation layer is used to determine the feature evaluation result of the extended image sample based on the feature difference information between the original image samples and the extended image samples.

[0165] Optionally, the feature difference analysis layer is also used to extract the global feature vector of the original image sample from the image feature matrix of the original image sample, extract the global feature vector of the extended image sample from the image feature matrix of the extended image sample, and determine the feature difference information between the original image sample and the extended image sample based on the global feature vector of the original image sample and the global feature vector of the extended image sample.

[0166] For the effects that can be achieved by this embodiment, please refer to the relevant embodiments of the above-mentioned image evaluation method and model training method, which will not be repeated here.

[0167] The present specification also provides a computer storage medium that can store multiple program instructions, which are suitable for being loaded and executed by a processor as described above. Figure 2 - Fig.13 The method steps of the embodiment shown in the figure can be found in the specific implementation process. Figure 2 - Fig.13 The specific description of the illustrated embodiment will not be repeated here.

[0168] The embodiment of the present specification also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by a processor as described above. Figure 2 - Fig.13 The image evaluation method of the embodiment shown in the figure can be found in the specific execution process. Figure 2 - Fig.13 The specific description of the illustrated embodiment will not be repeated here.

[0169] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant 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 memory (ROM) or a random access memory (RAM), etc.

[0170] The above disclosure is only the preferred embodiment of this specification, which certainly cannot be used to limit the scope of rights of this specification. Therefore, equivalent changes made according to the claims of this specification are still within the scope covered by this specification.

Claims

1. An image evaluation method, comprising: In response to an input original image and an extended image, performing image segmentation on the original image to obtain a segmented image of a first foreground object that meets a preset object type, and performing image segmentation on the extended image to obtain a segmented image of a second foreground object that meets the preset object type, wherein the extended image is generated by performing background extension based on the first foreground object in the original image; performing image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object to determine a foreground object evaluation result of the extended image; Calling a pre-trained feature evaluation model to perform feature difference evaluation on the original image and the extended image, and determining a feature evaluation result of the extended image; Based on the foreground object evaluation result and the feature evaluation result, a comprehensive evaluation result of the extended image is determined.

2. According to the method of claim 1, the first foreground object and the second foreground object are each at least one; the step of performing image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object to determine the foreground object evaluation result of the extended image comprises: for each of the first foreground objects in at least one of the first foreground objects and each of the second foreground objects in at least one of the second foreground objects, respectively determining pixel similarities between the segmented images of each of the first foreground objects and the segmented images of each of the second foreground objects; Determine at least one segmented image group based on pixel similarities between the segmented images of each of the first foreground objects and the segmented images of each of the second foreground objects, wherein any one of the at least one segmented image group includes a corresponding segmented image of the first foreground object and a segmented image of the second foreground object; Respectively obtaining parameters of each of the segmented image groups under a preset content comparison index; Respectively obtaining parameters of each of the segmented image groups under a preset layout analysis index; Based on the parameters of each of the segmented image groups under the preset content comparison index and the parameters under the preset layout analysis index, an evaluation result of the foreground object of the extended image is determined.

3. According to the method of claim 2, the step of respectively obtaining parameters of each of the segmented image groups under a preset content comparison index comprises: traversing at least one of the segmented image groups; For any one target segmented image group in at least one of the traversed segmented image groups, if the preset content comparison index includes a peak signal-to-noise ratio index, obtain a peak signal-to-noise ratio value of a segmented image of a target first foreground object in the target segmented image group, and a peak signal-to-noise ratio value of a segmented image of a target second foreground object in the target segmented image group; Determine the parameters of the target segmented image group under the peak signal-to-noise ratio indicator by comparing the peak signal-to-noise ratio value of the segmented image of the target first foreground object with the peak signal-to-noise ratio value of the segmented image of the target second foreground object; If the preset content comparison index includes a multi-scale structural similarity index, then obtaining a multi-scale structural similarity index value of a segmented image of the target first foreground object and a multi-scale structural similarity index value of a segmented image of the target second foreground object; Determine the parameters of the target segmented image group under the multi-scale structural similarity index indicator by comparing the multi-scale structural similarity index value of the segmented image of the target first foreground object and the multi-scale structural similarity index value of the segmented image of the target second foreground object; If the preset content comparison index includes a foreground object area overlap rate index, obtaining the area of ​​the target first foreground object in the segmented image of the target first foreground object and the area of ​​the target second foreground object in the segmented image of the target second foreground object; According to the comparison between the area of ​​the target first foreground object and the area of ​​the target second foreground object, the parameters of the target segmented image group under the foreground object area overlap index are determined.

4. According to the method of claim 2, the step of respectively obtaining parameters of each of the segmented image groups under a preset layout analysis index comprises: traversing at least one of the segmented image groups; For any one target segmented image group in at least one of the traversed segmented image groups, if the preset layout analysis index includes a display position index, obtaining a central pixel point of the target second foreground object in the segmented image of the target second foreground object in the target segmented image group; performing analysis based on the central pixel point of the target second foreground object and a preset central pixel point reference range to determine parameters of the target segmented image group under the display position index; If the preset layout analysis index includes an area ratio index, the area ratio of the target second foreground object in the segmented image of the target second foreground object is obtained; analysis is performed based on the area ratio of the target second foreground object and a preset area ratio reference range to determine the parameters of the target segmented image group under the area ratio index.

5. The method according to claim 1, wherein the performing image segmentation on the original image to obtain a segmented image of a first foreground object that meets a preset object type, and the performing image segmentation on the extended image to obtain a segmented image of a second foreground object that meets the preset object type, comprises: Obtain segmentation prompt information corresponding to the preset object type; Inputting the segmentation prompt information and the original image into a pre-trained image segmentation model to obtain a segmented image of the first foreground object output by the image segmentation model; The segmentation prompt information and the extended image are input into the image segmentation model to obtain a segmented image of the second foreground object output by the image segmentation model.

6. A model training method, comprising: Create an initial feature evaluation model; Acquire an image pair sample set, wherein the image pair sample set includes a plurality of image pair samples with feature evaluation result annotation information, and any one target image pair sample among the plurality of image pair samples includes an original image sample and an extended image sample, and the extended image sample is generated by background extension based on a foreground object in the original image sample; Iteratively training the initial feature evaluation model based on the image pair sample set; If the preset convergence condition is met, the initial feature evaluation model is determined as the pre-trained feature evaluation model.

7. The method according to claim 6, wherein the initial feature evaluation model comprises an image feature extraction layer, a feature difference analysis layer and a feature evaluation layer; The image feature extraction layer is used to receive the input original image samples and the extended image samples, and respectively obtain the image feature matrix of the original image samples and the image feature matrix of the extended image samples; The feature difference analysis layer is used to determine feature difference information between the original image sample and the extended image sample based on the image feature matrix of the original image sample and the image feature matrix of the extended image sample; The feature evaluation layer is used to determine a feature evaluation result of the extended image sample based on feature difference information between the original image sample and the extended image sample.

8. According to the method of claim 7, the feature difference analysis layer is also used to extract the global feature vector of the original image sample from the image feature matrix of the original image sample, extract the global feature vector of the extended image sample from the image feature matrix of the extended image sample, and determine the feature difference information between the original image sample and the extended image sample based on the global feature vector of the original image sample and the global feature vector of the extended image sample.

9. An image evaluation device, comprising: a segmentation unit, configured to, in response to an input original image and an extended image, perform image segmentation on the original image to obtain a segmented image of a first foreground object that meets a preset object type, and perform image segmentation on the extended image to obtain a segmented image of a second foreground object that meets the preset object type, wherein the extended image is generated by performing background extension based on the first foreground object in the original image; a first evaluation unit, configured to perform image comparison based on the segmented image of the first foreground object and the segmented image of the second foreground object to determine an evaluation result of the foreground object of the extended image; A second evaluation unit is used to call a pre-trained feature evaluation model to evaluate the feature difference between the original image and the extended image, and determine a feature evaluation result of the extended image; A determination unit is used to determine a comprehensive evaluation result of the extended image based on the foreground object evaluation result and the feature evaluation result.

10. A model training device, comprising: A creation unit for creating an initial feature evaluation model; an acquisition unit, configured to acquire an image pair sample set, wherein the image pair sample set includes a plurality of image pair samples with feature evaluation result annotation information, and any one target image pair sample among the plurality of image pair samples includes an original image sample and an extended image sample, and the extended image sample is generated by background extension based on a foreground object in the original image sample; A training unit, configured to iteratively train the initial feature evaluation model based on the image pair sample set; A determination unit is used to determine the initial feature evaluation model as the pre-trained feature evaluation model if a preset convergence condition is met.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program code, and when the computer program code is executed, the method according to any one of claims 1 to 8 is implemented.

12. An electronic device comprising: 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 steps of the method as claimed in any one of claims 1 to 8.

13. A computer program product having at least one instruction stored thereon, wherein when the at least one instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Image quality evaluation and model generation method and device, equipment and storage medium

    CN110428412A

  • Image processing method, device and equipment

    CN111768425A

  • Image segmentation model training method, image segmentation method, medium and terminal

    CN112116596A

  • Image generation method and device, readable medium and electronic equipment

    CN114092712A

  • Image recognition method, device and equipment, intelligent door lock and medium

    CN114241557A

Cited By

  • Video information processing method and system based on AIGC

    CN119520925A