Image quality inspection method and device and storage medium
Through the image quality inspection methods of feature extraction and clustering analysis, the problem of hash value difference in image quality inspection is solved, and the accuracy and audit quality of image quality inspection are improved.
Patent Information
- Application Number
- CN202510540762.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-08
AI Technical Summary
The prior art lacks semantic understanding ability in image quality inspection, resulting in significant differences in hash values after regular image processing, affecting the accuracy of quality inspection.
By acquiring feature extraction of input images and historical images, using clustering analysis and similarity matching, abnormal images are determined, and a black and white library is constructed for dynamic updates to improve the accuracy of image quality inspection.
It realizes high-fine-grained semantic representation and excellent migration and generalization performance of image quality inspection, reduces the risk of error review, and improves the accuracy and audit quality of overall image quality inspection.
Smart Images

Figure CN120451756A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an image quality inspection method, device, and storage medium. Background Art
[0002] For images that have been manually reviewed for violations, it is usually necessary to conduct another quality check on the review results to detect misjudgment samples in the manually reviewed images.
[0003] In the related art, an MD5 (Message-Digest Algorithm 5) verification and comparison scheme can be used. This scheme reads the binary stream of the input image and uses the MD5 message digest algorithm to generate a hash value of the input image. The hash value of the input image and the hash values of multiple sample images are compared to see whether the characters at corresponding positions are completely consistent. The proportion of completely consistent characters is counted to obtain the similarity between the input image and the multiple sample images. Based on the similarity, it is determined whether the input image belongs to a sample image with an illegal label or a sample image with a compliant label.
[0004] However, the method of calculating similarity in the above scheme lacks the ability to understand semantics, resulting in significant differences in hash values after the image undergoes conventional processing such as scaling, compression, watermark embedding or noise interference, even if the image semantics have not changed substantially, thereby affecting the accuracy of quality inspection. Summary of the Invention
[0005] The present invention provides an image quality inspection method, device, and storage medium. The technical solutions provided by the present invention are as follows:
[0006] According to one aspect of an embodiment of the present application, a method for image quality inspection is provided, the method comprising:
[0007] Acquire an input image and at least two historical images, wherein the input image and each of the historical images are respectively configured with an audit label, and the audit label is a compliance label or a violation label;
[0008] Performing feature extraction on the input image and the at least two historical images respectively to obtain image features of the input image and image features corresponding to the at least two historical images respectively;
[0009] determining, based on image features of the input image and image features corresponding to the at least two historical images, at least one target historical image among the at least two historical images, wherein a similarity between the target historical image and the input image satisfies a similarity condition;
[0010] Performing cluster analysis on the input image and the at least one target historical image to obtain a quality inspection result of the input image and a quality inspection result corresponding to the at least one target historical image;
[0011] According to the quality inspection result of the input image and the quality inspection results corresponding to the at least one target historical image, at least one abnormal image is determined from the input image and the at least one target historical image, where the abnormal image is an image with an abnormality in the quality inspection result.
[0012] According to one aspect of an embodiment of the present application, an image quality inspection device is provided, the device comprising:
[0013] An image acquisition module, configured to acquire an input image and at least two historical images, wherein the input image and each of the historical images are respectively configured with an audit label, and the audit label is a compliance label or a violation label;
[0014] a feature extraction module, configured to perform feature extraction on the input image and the at least two historical images, respectively, to obtain image features of the input image and image features corresponding to the at least two historical images;
[0015] a similarity matching module, configured to determine, based on image features of the input image and image features corresponding to the at least two historical images, at least one target historical image among the at least two historical images, wherein a similarity between the target historical image and the input image satisfies a similarity condition;
[0016] a cluster analysis module, configured to perform cluster analysis on the input image and the at least one target historical image to obtain a quality inspection result of the input image and a quality inspection result corresponding to the at least one target historical image;
[0017] An abnormality determination module is used to determine at least one abnormal image from the input image and the at least one target historical image based on the quality inspection result of the input image and the quality inspection results corresponding to the at least one target historical image, wherein the abnormal image is an image with an abnormality in the quality inspection result.
[0018] According to one aspect of an embodiment of the present application, a computer device is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above-mentioned image quality inspection method.
[0019] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned image quality inspection method.
[0020] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes a computer program, and the computer program is loaded and executed by a processor to implement the above-mentioned image quality inspection method.
[0021] The technical solutions provided in the embodiments of the present application can bring the following beneficial effects:
[0022] By triggering the image quality inspection process for historical images using an input image, the historical image library is dynamically updated. Furthermore, by extracting the image features of the input image and the corresponding image features of at least two historical images, the image features are used in the subsequent image quality inspection process. This method possesses highly fine-grained semantic representation capabilities and excellent transfer and generalization performance. This ensures that even if a certain amount of interference noise is added to the image, no significant difference will be produced in the similarity calculation of the image features, providing strong adaptability and room for continuous improvement for image quality inspection. This allows for relatively accurate and efficient determination of at least one target historical image from at least two historical images, optimizing the image quality inspection process and providing a strong basis for judgment and solid data support for subsequent image clustering analysis. This helps reduce the risk of misreviews, improves the accuracy of overall image quality inspection, and thus enhances the overall image review quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a schematic diagram of an implementation environment for a solution provided by an embodiment of the present application;
[0024] Figure 2 This is a flowchart of an image quality inspection method provided by an embodiment of the present application;
[0025] Figure 3 This is a schematic diagram of a process for constructing a black and white library provided in one embodiment of the present application;
[0026] Figure 4 is a schematic diagram of a process for determining an abnormal image provided by an embodiment of the present application;
[0027] Figure 5 is a schematic diagram of a dynamic update process of a historical image library provided by an embodiment of the present application;
[0028] Figure 6 Schematic diagram of a processing procedure for secondary quality inspection of an image provided by an embodiment of the present application;
[0029] Figure 7 This is a block diagram of an image quality inspection device provided by one embodiment of the present application;
[0030] Figure 8 This is a structural block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0032] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application. The implementation environment of the solution can be implemented as an image quality inspection system. The implementation environment of the solution may include: a terminal device 10 and a server 20.
[0033] There can be one or more terminal devices 10. The terminal device 10 can be an electronic device such as a mobile phone, tablet computer, laptop computer, desktop computer, game console, e-book reader, multimedia player, wearable device, intelligent voice interaction device, smart home appliance, vehicle terminal, aircraft, etc.
[0034] The terminal device 10 may be installed with a client for a target application that has an image quality inspection function. A user may input an image with an audit tag configured into the target application, and the target application will output the image quality inspection results. This application does not limit the type of target application. Optionally, the target application may be an application that requires downloading and installation, or a click-to-use application, which is not limited in this application.
[0035] The server 20 is used to provide background services for the client of the target application installed and running on the terminal device 10. For example, the server 20 can be the background server of the target application. The server 20 can be a standalone physical server, a server cluster consisting of multiple servers, or a cloud computing service center. Optionally, the server 20 provides background services for the target applications on multiple terminal devices 10 simultaneously. The terminal device 10 and the server 20 can communicate with each other via a network.
[0036] In an embodiment of the present application, an input image and at least two historical images are obtained, and the input image and each historical image are respectively configured with an audit label, and the audit label is a compliance label or a violation label. The present application is used to perform quality inspection on the audit labels of the input image and the historical images, and screen out abnormal images whose audit labels need to be reconfigured. Feature extraction is performed on the input image and the at least two historical images respectively to obtain image features of the input image and image features corresponding to the at least two historical images. Based on the image features of the input image and the image features corresponding to the at least two historical images respectively, at least one target historical image is determined from the at least two historical images, and the similarity between the target historical image and the input image meets the similarity condition. Cluster analysis is performed on the input image and the at least one target historical image to obtain a quality inspection result of the input image and a quality inspection result corresponding to the at least one target historical image respectively. Based on the quality inspection result of the input image and the quality inspection result corresponding to the at least one target historical image respectively, at least one abnormal image is determined from the input image and the at least one target historical image, and the abnormal image is an image with an abnormal quality inspection result.
[0037] Please refer to Figure 2 , which shows a flow chart of an image quality inspection method provided by an embodiment of the present application. The execution subject of each step of the method can be a computer device. The method can include at least one of the following steps 210 to 250:
[0038] Step 210: Acquire an input image and at least two historical images. The input image and each historical image are respectively configured with an audit label, and the audit label is a compliance label or a violation label.
[0039] Historical images refer to images that have been reviewed within a historical time period. The end time of the historical time period is the time before the current time. Input images refer to images that have just been reviewed, which means that the review time of the input image is the current time, and historical images are images that were reviewed before the input image.
[0040] Auditing is used to determine whether an image violates regulations. After being audited, the image receives an audit label. The audit label indicates the audit result of the image. Audit labels include compliance labels or violation labels. The compliance label indicates that the audit result of the image is passed, which means that the image with the compliance label does not violate regulations. The violation label indicates that the audit result of the image is failed, which means that the image with the violation label violates regulations. Among them, the image violation types corresponding to the violation label include but are not limited to pornographic, violent, illegal, and privacy types. Images with violation labels include at least one of the following illegal content: pornographic content, violent content, illegal content, and privacy content. Images with compliance labels do not include illegal content.
[0041] Optionally, the review can be manual or mechanical. Exemplarily, the mechanical review can be conducted using a multimodal amplification model. The input image and the at least two historical images can both be manually reviewed, or both be mechanically reviewed. Alternatively, some images can be manually reviewed and some can be mechanically reviewed.
[0042] The at least two historical images mentioned above include at least one historical black image and at least one historical white image. The historical black image refers to a historical image whose audit label is a violation label, and the historical white image refers to a historical image whose audit label is a compliance label. The technical solution provided in this application is used to trigger the execution of an image quality inspection method when an input image is obtained, check the audit labels of the audited images (the input image and at least two historical images), and determine whether there are errors in the audit labels of the input image and the at least two historical images, that is, determine whether there are images with abnormal quality inspection results in the input image and the at least two historical images.
[0043] Step 220 : Perform feature extraction on the input image and the at least two historical images respectively to obtain image features of the input image and image features corresponding to the at least two historical images respectively.
[0044] Exemplarily, a feature extraction model performs feature extraction on an input image and at least two historical images to obtain image features of the input image and image features corresponding to the at least two historical images. Specifically, the input image is input into the feature extraction model, which outputs the image features of the input image; and the at least two historical images are input into the feature extraction model, which outputs the image features corresponding to the at least two historical images. The feature extraction model can be any publicly available feature extraction model, and this application is not limited thereto.
[0045] Image features are used to indicate the semantic information of an image. Even if the image is displaced, discolored, or otherwise interfered by noise, the image features will not differ significantly due to changes in external factors.
[0046] Through step 220, a black library and a white library can be obtained. The black library includes image information corresponding to at least one historical black image, and the white library includes image information corresponding to at least one historical white image. The image information of each historical black image includes the historical black image, the audit label (violation label) configured for the historical black image, and the image features of the historical black image. The image information of each historical white image includes the historical white image, the audit label (compliance label) configured for the historical white image, and the image features of the historical white image.
[0047] The construction process of the black and white library can refer to Figure 3As shown, historical white images and historical black images are input into the feature extraction model, which then outputs the image features of each historical white image and each historical black image. Then, based on the historical images assigned with audit labels, a white library and a black image library are constructed. By constructing the black and white libraries, multiple historical images similar to the input image and their related historical audit records can be efficiently and accurately retrieved and recalled from the black and white libraries, providing solid data support and a strong basis for subsequent image processing and judgment, thereby greatly reducing the risk of misjudgment and missed judgments and improving the overall audit quality. This solution significantly improves the accuracy and efficiency of image audits, thereby optimizing the image audit process.
[0048] Step 230 : determining at least one target historical image from the at least two historical images based on the image features of the input image and the image features corresponding to the at least two historical images, wherein the similarity between the target historical image and the input image satisfies a similarity condition.
[0049] At least one target historical image is selected from at least two historical images according to a similarity condition, where the target historical image is a historical image that is similar to the input image in general cognition.
[0050] Exemplarily, a vector search tool may be used to determine at least one target historical image among the at least two historical images based on image features of the input image and image features corresponding to the at least two historical images.
[0051] In some embodiments, similarities between image features of the input image and image features of each historical image are calculated respectively to obtain similarities corresponding to at least two historical images.
[0052] Optionally, a calculation method such as Euclidean distance or cosine similarity can be used to calculate the similarity between the image features of the input image and the image features of each historical image, thereby obtaining the similarity corresponding to at least two historical images. The similarity corresponding to each historical image refers to the similarity between the features of the input image and the image features of the historical image, and can also be understood as the similarity between the input image and the historical image.
[0053] Optionally, the similarity condition can be that the target historical image is a historical image whose similarity, among the similarities corresponding to at least two historical images, is greater than or equal to a first threshold. In this case, at least one historical image whose similarity, among the similarities corresponding to the at least two historical images, is greater than or equal to the first threshold is determined as the at least one target historical image. The specific value of the first threshold is determined by technical personnel based on image screening requirements and is not limited by this application. For example, the first threshold can be 0.9.
[0054] Optionally, the similarity condition may be that the target historical image is a historical image ranked higher in a first ratio in terms of similarity among the at least two historical images, and then at least one historical image ranked higher in the first ratio in terms of similarity among the at least two historical images, in descending order, is determined as the at least one target historical image. The specific value of the first ratio is determined by technical personnel based on image screening requirements and is not limited by this application.
[0055] Optionally, the similarity condition may be that the target historical image is one of the first number of historical images ranked highest in similarity order among the at least two historical images. Then, at least one of the first number of historical images ranked highest in the descending order of similarity order among the at least two historical images is determined as the at least one target historical image. The specific value of the first number is determined by technical personnel based on image screening requirements and is not limited by this application.
[0056] By calculating the similarity between the image features of the input image and the image features of each historical image, at least one target historical image that meets the similarity conditions is screened out, so that the at least one target historical image and the input image can be subsequently quality inspected, which can effectively reduce the occurrence of misreviews and improve the accuracy of the overall image review.
[0057] Step 240 : Perform cluster analysis on the input image and the at least one target historical image to obtain a quality inspection result of the input image and a quality inspection result corresponding to the at least one target historical image.
[0058] Cluster analysis is used to analyze the correlation between the input image and at least one target historical image, obtaining quality inspection results for the input image and the corresponding quality inspection results for the at least one target historical image. The image quality inspection results indicate whether the image has passed quality inspection, specifically whether the audit tag configured for the image matches the image. If the audit tag configured for the image matches the image, the image is considered to have passed quality inspection; if the audit tag configured for the image does not match the image, the image is considered to have failed quality inspection.
[0059] Cluster analysis is not performed on any of the at least two historical images, excluding the at least one target historical image. This means that the audit labels configured for the other images, excluding the at least one target historical image, are assumed to match the image. Therefore, each triggered image quality inspection process targets only those historical images that meet the similarity criteria with the input image.
[0060] The specific cluster analysis process can be referred to the following embodiment and will not be introduced here.
[0061] Step 250 , based on the quality inspection result of the input image and the quality inspection results corresponding to at least one target historical image, determine at least one abnormal image from the input image and the at least one target historical image, where the abnormal image is an image with an abnormal quality inspection result.
[0062] An abnormal quality inspection result means that the quality inspection result is incorrect or questionable. An incorrect quality inspection result can mean that a compliant image is assigned a non-compliant label, or a non-compliant image is assigned a compliant label. A questionable quality inspection result means that the currently assigned review label for an image may be correct or incorrect.
[0063] The specific process of determining abnormal images can be referred to the following embodiments and will not be introduced here.
[0064] The technical solution provided by the embodiment of the present application triggers the image quality inspection process for historical images by inputting an image, thereby achieving dynamic updating of the historical image library. Furthermore, by extracting the image features of the input image and the image features corresponding to at least two historical images, the image features are used to participate in the subsequent image quality inspection process. This solution has high-grained semantic representation capabilities and excellent migration and generalization performance, so that even if a certain amount of interference noise is added to the image, no significant difference will be produced in the similarity calculation of the image features, providing strong adaptability and room for continuous improvement for image quality inspection. This allows for relatively accurate and efficient determination of at least one target historical image from at least two historical images, optimizing the image quality inspection process and providing a strong basis for judgment and solid data support for subsequent image clustering analysis. This helps reduce the risk of misreviews, improves the accuracy of overall image quality inspection, and thereby improves the overall image review quality.
[0065] In some embodiments, step 240 includes at least one of sub-steps 241 - 242 .
[0066] Sub-step 241, constructing a graph network based on the input image, at least one target historical image, the similarity between the input image and each target historical image, and the similarity between every two target historical images, where each node in the graph network corresponds to an image, and the edge in the graph network is used to indicate the similarity between the images corresponding to the two nodes connected by the edge.
[0067] When the number of target historical images is greater than 1, the similarity between every two target historical images is calculated. The similarity between two target historical images can be obtained by calculating the similarity between the image features of the two target historical images.
[0068] A graph network is used to comprehensively display the association between an input image and every two images in at least one target historical image. Each node in the graph network corresponds to an image. The edges in the graph network indicate the similarity between the images corresponding to the two nodes connected by the edge. That is, the length of the edge in the graph network is positively correlated with the similarity between the images corresponding to the two nodes connected by the edge. The greater the similarity between the images corresponding to the two nodes, the longer the edge between the two nodes.
[0069] Sub-step 242: performing cluster analysis on the input image and the at least one target historical image based on the graph network to obtain a quality inspection result of the input image and a quality inspection result corresponding to the at least one target historical image.
[0070] By using a graph network to perform cluster analysis on the input image and at least one target historical image, the images can be clustered into multiple classes, so that the images in each class that are different from the class audit results can be clearly judged based on the image audit results of each class, thereby obtaining the quality inspection results of each image. The cluster analysis method is relatively intuitive and easy to understand. It can quickly understand the structure and distribution of each node in the graph network, discover the potential patterns and trends in each node, simplify the image processing and analysis process, improve the image processing efficiency, and thus improve the efficiency of image quality inspection.
[0071] In some embodiments, sub-step 242 includes at least one of sub-steps 2421 - 2423 .
[0072] Sub-step 2421 , performing cluster analysis on the input image and at least one target historical image based on a graph network using a graph clustering algorithm to obtain at least one community, each community including at least one image.
[0073] Cluster analysis here refers to analyzing the relationships between nodes in a graph network using a graph clustering algorithm. This analysis identifies nodes with similar characteristics and groups them into communities. This allows us to identify at least one community based on each node in the graph network. Each community contains at least one node, and therefore at least one image.
[0074] For each node in a graph network, some are closely connected, while others are sparsely connected. The closely connected nodes can be considered a community, where the edges between nodes are short and the connections between nodes are relatively close. However, the connections between two communities are relatively sparse, and the edges between nodes within the two communities are generally long, not enough to be classified as a single community. Therefore, they are clustered into two communities.
[0075] Exemplarily, the graph clustering algorithm may be the Louvain algorithm, which is an optimization algorithm for maximizing modularity.
[0076] In some embodiments, cluster analysis is performed on a graph network using a graph clustering algorithm to obtain an initial modularity of the graph network, which is used to measure the closeness between nodes in the graph network. For each of a plurality of nodes, the node is moved to a target node among adjacent nodes to obtain an initial community corresponding to the target node. The target node is the node with the largest increase in initial modularity in each of the moved graph networks obtained by moving the node to each adjacent node. Moving processing is performed on the initial community corresponding to the target node until the modularity of the graph network after the move remains unchanged, or the modularity of the graph network after the move decreases, thereby obtaining at least one community in the graph network.
[0077] Modularity is an important metric for measuring community structure in graph networks. It indicates the closeness between nodes in a graph network, that is, it assesses whether the nodes in a graph network can be clearly divided into several communities with dense internal connections and sparse external connections. A higher modularity value indicates a more pronounced community structure in the graph network, with denser connections between nodes within the community and relatively sparse connections between communities. In graph clustering algorithms, modularity is often used as an optimization objective, iteratively adjusting the community affiliation of nodes to maximize the modularity value of the entire network. Therefore, modularity is a global metric that reflects the quality of community division across the entire network, rather than a property of a single node or local community.
[0078] Initial modularity is the modularity of each node in the graph network before it belongs to a community. In the initial case, each node can be regarded as a community. For example, the initial modularity can be expressed as:
[0079]
[0080] Among them, A ij represents the weight of the edge between node i and node j (1 if the graph is unweighted), k i and k j denote the degrees of nodes i and j (i.e., the number of connected edges), m denotes the total weight of all edges in the graph network (for an unweighted graph, m is equal to the total number of edges), δ(c i , c j ) is the Kronecker delta function. When nodes i and j belong to the same community, δ(c i , c j )=1, otherwise it is 0.
[0081] In the initial optimization stage of modularity, each node is regarded as a community, and each node in the graph network is moved to obtain multiple initial communities. For each of the multiple nodes, the node is moved to the communities corresponding to the adjacent nodes in turn, and the increase in the modularity of the graph network after each move is calculated. The node with the largest increase in modularity is then determined as the target node. Finally, the node is moved to the community corresponding to the target node to obtain the initial community corresponding to the target node. It should be noted that if the modularity of the graph network after each move obtained by moving the node to the communities corresponding to the adjacent nodes does not increase, that is, the modularity remains unchanged or decreases, then the node will not be moved, and the node will exist as an initial community. Therefore, after the movement process is performed on each node in the graph network, there may be initial communities containing more than two nodes, or there may be initial communities containing only one node.
[0082] In the subsequent optimization phase of modularity, each initial community in the graph network is moved. For each of the multiple initial communities, the initial community is sequentially moved to each adjacent initial community. The increase in modularity of the graph network after moving the initial community to each adjacent initial community is calculated. The initial community with the largest increase in modularity is then determined as the target initial community. Finally, the initial community is moved to the target initial community to obtain the optimized initial community. It should be noted that if the modularity of the graph network after moving the initial community to each adjacent initial community does not increase, that is, the modularity remains unchanged or decreases, then the initial community is not moved. The community movement process is continued until the modularity of the graph network after moving remains unchanged or decreases. At this point, each community in the graph network after multiple moves is determined to be at least one community obtained by the above cluster analysis.
[0083] By performing cluster analysis on the graph network using the above steps, community division of the graph network can be achieved more efficiently. By iterating the communities in the graph network through modularity, at least one community with dense internal connections and sparse inter-community connections can be obtained, thereby improving the accuracy and efficiency of community division.
[0084] Sub-step 2422: For each community in the at least one community, determine a label of the community according to the review label configured for at least one image in the community, where the label of the community is one of a compliance label, a violation label, and an uncertain label.
[0085] The audit label configured for an image can be either a compliant label or a violation label. A compliant label indicates that the image does not contain any illegal content, while a violation label indicates that the image contains any illegal content. Community-configured audit labels can be either compliant, violation, or uncertain. A compliant label in a community indicates that images in the community should not contain any illegal content, while a violation label indicates that all images in the community should contain any illegal content. An uncertain label indicates that images in the community may or may not contain any illegal content.
[0086] In some embodiments, based on the audit labels respectively configured for at least one image in the community, the proportion of compliant labels and the proportion of illegal labels in at least one image are calculated. If the proportion of compliant labels is greater than or equal to a second threshold, the label of the community is determined to be a compliant label. If the proportion of illegal labels is greater than or equal to the second threshold, the label of the community is determined to be an illegal label. If the proportion of compliant labels is less than the second threshold and the proportion of illegal labels is less than the second threshold, the label of the community is determined to be an uncertain label.
[0087] For each community in at least one community, calculate the proportion of white images and black images in the community. The proportion of white images refers to the ratio of the number of images with compliant labels to the total number of images in the community. The proportion of white images is the proportion of the above-mentioned compliant labels. The proportion of black images refers to the ratio of the number of images with illegal labels to the total number of images in the community. The proportion of black images is the proportion of the above-mentioned illegal labels.
[0088] When the proportion of compliant labels is greater than or equal to the second threshold, the label of the community is determined to be a compliant label. This can be understood as, when the review labels of most images in the community are compliant labels, the label of the community is determined to be a compliant label. When the proportion of illegal labels is greater than or equal to the second threshold, the label of the community is determined to be an illegal label. This can be understood as, when the review labels of most images in the community are illegal labels, the label of the community is determined to be an illegal label. When the proportion of compliant labels is less than the second threshold, and the proportion of illegal labels is less than the second threshold, the label of the community is determined to be an uncertain label. This can be understood as, when the number of compliant labels and illegal labels in the community is similar, the label of the community is determined to be an uncertain label.
[0089] The second threshold is determined by technicians according to the needs of image quality inspection and is not limited in this application. For example, the second threshold is 0.8.
[0090] By determining the community label based on the ratio of compliant labels to noncompliant labels within the community, the community label is made consistent with the review labels of most images within the community, thus ensuring the accuracy of the community label determination.
[0091] Sub-step 2423 , obtaining the quality inspection result of the input image and the quality inspection result corresponding to the at least one target historical image according to the community label and the review label configured for the at least one image in the community.
[0092] By using the graph clustering algorithm described above to identify at least one community and determine labels for each community, the quality inspection results for each image can be determined based on the differences between the community labels and the audit labels of each image within the community. This method can identify images where the community labels and the audit labels do not match. This optimizes the traditional manual quality inspection process based on random sampling, addresses blind spots and deficiencies in manual quality inspection, and improves the efficiency of image quality inspection. This allows for subsequent re-examination of images with abnormal quality inspection results based on the quality inspection results, thereby improving the accuracy of image quality inspection.
[0093] In some embodiments, for any one of the input image and at least one target historical image, the quality inspection result of the image is one of the following: the image is in a community with a compliant label and the review label is a compliant label; the image is in a community with a violation label and the review label is a violation label; the image is in a community with a compliant label and the review label is a violation label; the image is in a community with a violation label and the review label is a compliant label; the image is in a community with an uncertain label.
[0094] In some embodiments, the abnormal image includes at least one of the following: the quality inspection result of the image is that the image is an image with an audit label of a violation label in a community with a compliance label; the quality inspection result of the image is that the image is an image with an audit label of a compliance label in a community with a violation label; the quality inspection result of the image is that the image is an image in a community with an uncertain label.
[0095] Images with review labels of compliant labels in communities with compliant labels, and images with review labels of illegal labels in communities with illegal labels, can be identified as normal images, that is, images with correct review.
[0096] Images in communities with compliant labels that have been reviewed as illegal labels can be identified as mis-reviewed images, meaning they are compliant images that have been mistakenly assigned illegal labels. Images in communities with illegal labels that have been reviewed as compliant labels can be identified as missed images, meaning images that should have been assigned illegal labels have been missed. Images in communities with uncertain labels can be identified as uncertain images, meaning it is uncertain whether they should be assigned a compliant or illegal label. Abnormal images include at least one of the aforementioned mis-reviewed images, missed images, and uncertain images.
[0097] The above-mentioned method for determining abnormal images can detect abnormal image samples in historical audit data with high accuracy and high recall rate, thereby significantly improving quality inspection efficiency, reducing the workload of manual quality inspection, and overcoming the limitations of manual review through random sampling in traditional manual quality inspection processes.
[0098] You can refer to Figure 4 The schematic diagram of the process of determining abnormal images is shown. Based on historical audit records, a white library and a black library are constructed. The historical audit records include at least one historical image and at least one audit label configured for each historical image. The white library includes image information corresponding to at least one historical white image. The image information of each historical white image includes the historical white image, the audit label (compliant label) configured for the historical white image, and the image features of the historical white image. The black library includes image information corresponding to at least one historical black image. The image information of each historical black image includes the historical black image, the audit label (violation label) configured for the historical black image, and the image features of the historical black image. Based on the image features of the input image and the image features corresponding to at least two historical images, similarity is calculated to retrieve target historical images similar to the input image. Then, based on the input image and the target historical image, a graph network is constructed, and cluster analysis is performed on the graph network using a graph clustering algorithm to obtain at least one community. A proportion threshold is set for the audit labels within the community, and the community label is determined to be the audit label that meets the proportion threshold. For audit labels that do not meet the proportion threshold, the community label is determined to be an uncertain label. According to the label of the community and the review label respectively configured for at least one image in the community, a quality inspection result of each image in the community is obtained.
[0099] In some embodiments, step 250 is followed by step 260 , and step 260 includes at least one of sub-steps 261 - 262 .
[0100] Sub-step 261 : obtaining updated review labels corresponding to at least one abnormal image based on at least one abnormal image through the multimodal large model.
[0101] The multimodal large model here can be any publicly available multimodal large model, and this application does not limit this.
[0102] Each abnormal image, along with a specific prompt word, is input into the multimodal large model, which then outputs an updated review label corresponding to the abnormal image. For example, the prompt word for an abnormal image might be: "You are a professional review and quality inspection expert. Here's a suspicious sample that was manually reviewed as violating, but algorithmic analysis suggests there may be a misjudgment. Please analyze this sample from a professional perspective to determine if it contains any violations or risks warranting review as a violation. Please provide your analysis and conclusion."
[0103] The updated audit label of an abnormal image can change, for example, from a compliance label to a violation label, or vice versa, or it can remain unchanged, i.e., the original audit label of the abnormal image remains unchanged. Based on the updated audit label corresponding to at least one abnormal image, the labels of the input image and at least one historical image are updated and replaced to obtain an updated audit label for the entire image.
[0104] Optionally, at least one abnormal image can be fed back to a manual reviewer, who can discover loopholes in the manual quality inspection process based on the quality inspection results of the abnormal image, and provide a basis for further training of manual reviewers. Finally, the manual reviewer can determine the updated review label of the abnormal image.
[0105] Figure 5 This diagram illustrates the dynamic update process of the historical image library. Based on historical audit records, a white image library and a black image library are constructed. After identifying abnormal images based on these libraries, a quality inspection and analysis report is generated, providing a reference for subsequent manual review of the images. Updated audit labels for abnormal images are obtained through a multimodal large model, and these audit labels in the historical image library are dynamically updated. This ensures that historical images possess excellent fine-grained semantic representation capabilities and high transferability, adapting to diverse audit scenarios and data changes.
[0106] Sub-step 262, based on the updated review labels corresponding to the input image, at least two historical images and at least one abnormal image, performs a secondary quality inspection process on the input image and the at least two historical images to obtain the final quality inspection results of the input image and the final quality inspection results corresponding to the at least two historical images.
[0107] Optionally, the historical image library can be dynamically updated directly based on the updated review labels obtained in sub-step 261. Alternatively, after sub-step 261, sub-step 262 can be continued to perform a secondary quality inspection on the input image and at least two historical images to obtain a final quality inspection result. Based on the final quality inspection result, abnormal images from the secondary quality inspection process can be relabeled, further clarifying and correcting the black and white library. This achieves a purification effect on the library data, improves the accuracy of image quality inspection, and enhances the accuracy and recall rate of the quality inspection analysis report, thereby optimizing the image quality inspection process.
[0108] In some embodiments, sub-step 262 includes at least one of sub-steps 2621 - 2626 .
[0109] Sub-step 2621 , using a first feature extraction model to perform feature extraction on the input image and at least two historical images respectively, to obtain first image features of the input image and first image features corresponding to the at least two historical images respectively.
[0110] Exemplarily, the input image is input into the first feature extraction model, and the first feature extraction model outputs the first image features of the input image; and at least two historical images are respectively input into the first feature extraction model, and the first feature extraction model outputs the first image features corresponding to the at least two historical images respectively.
[0111] Sub-step 2622: Use the second feature extraction model to perform feature extraction on the input image and the at least two historical images respectively, to obtain second image features of the input image and second image features corresponding to the at least two historical images respectively.
[0112] Exemplarily, the input image is input into the second feature extraction model, and the second feature extraction model outputs the second image features of the input image; and at least two historical images are respectively input into the second feature extraction model, and the second feature extraction model outputs the second image features corresponding to the at least two historical images respectively.
[0113] It should be noted that, since the model parameters of the first feature extraction model and the model parameters of the second feature extraction model are different, the first image features and the second image features extracted from the same image are different.
[0114] Sub-step 2623, obtains the first quality inspection result of the input image and the first quality inspection result corresponding to at least one historical image based on the updated review label corresponding to at least one abnormal image, the first image feature of the input image and the first image features corresponding to at least two historical images.
[0115] At least one first historical image from the at least two historical images is determined based on first image features of the input image and first image features corresponding to at least two historical images, where the similarity between the first historical image and the input image satisfies a similarity condition. If the number of first historical images is greater than one, the similarity between every two first historical images is calculated. A first graph network is constructed based on the input image, the at least one first historical image, the similarities between the input image and each first historical image, and the similarity between every two first historical images. A cluster analysis is performed on the input image and the at least one first historical image using a graph clustering algorithm based on the first graph network to obtain at least one first community. For each of the at least one first community, a label is determined based on the audit label assigned to at least one image in the first community. The label of the first community is one of a compliance label, a violation label, and an uncertain label. Based on the label of the first community and the updated audit label assigned to at least one image in the first community, a first quality inspection result for the input image and a first quality inspection result corresponding to the at least one first historical image are obtained.
[0116] Sub-step 2624, obtains the second quality inspection result of the input image and the second quality inspection result corresponding to at least one historical image based on the updated review label corresponding to at least one abnormal image, the second image feature of the input image and the second image features corresponding to at least two historical images.
[0117] Based on the second image features of the input image and the second image features corresponding to at least two historical images, at least one second historical image from the at least two historical images is determined, where the similarity between the second historical image and the input image satisfies a similarity condition. If the number of second historical images is greater than one, the similarity between each two second historical images is calculated. A second graph network is constructed based on the input image, the at least one second historical image, the similarity between the input image and each second historical image, and the similarity between each two second historical images. A cluster analysis is performed on the input image and the at least one second historical image using a graph clustering algorithm based on the second graph network to obtain at least one second community. For each of the at least one second community, a label is determined for the second community based on the audit label assigned to at least one image in the second community. The label for the second community is one of a compliance label, a violation label, and an uncertain label. Based on the label of the second community and the updated audit label assigned to at least one image in the second community, a second quality inspection result for the input image and a second quality inspection result corresponding to the at least one second historical image are obtained.
[0118] The specific process of determining the first quality inspection result and the second quality inspection result can refer to the above embodiment and will not be described again here.
[0119] Sub-step 2625 : determining at least one first abnormal image from the input image and the at least two historical images, wherein a first quality inspection result of the first abnormal image is different from a second quality inspection result of the first abnormal image.
[0120] Based on the above steps, a first quality inspection result and a second quality inspection result of each of the input image and at least two historical images are obtained, and images having different first quality inspection results and second quality inspection results are searched from the input image and the at least two historical images to obtain at least one first abnormal image.
[0121] Exemplarily, the first quality inspection result of the first abnormal image is that the first abnormal image is an image with an audit label of a compliant label in a first community of compliant labels, then the second quality inspection result of the first abnormal image can be that the first abnormal image is an image with an audit label of a violation label in a second community of violation labels, or the first abnormal image is an image with an audit label of a violation label in the second community of compliant labels, or the first abnormal image is an image with an audit label of a compliant label in the second community of violation labels, or the first abnormal image is an image in the second community of uncertain labels.
[0122] Sub-step 2626: Obtain a final quality inspection result corresponding to the at least one first abnormal image based on the at least one first abnormal image through the multimodal large model.
[0123] The multimodal large model is used to determine the final quality inspection result of at least one first abnormal image. For each of the at least one first abnormal image, the first abnormal image, the first quality inspection result of the first abnormal image, the second quality inspection result of the first abnormal image, and a specific prompt word are input into the multimodal large model, and the multimodal large model outputs the final quality inspection result of the first abnormal image. For example, the prompt word for the first abnormal image may be: You are a professional audit quality inspection expert. Now, a suspicious sample has a first quality inspection result and a second quality inspection result through algorithmic analysis. Please analyze the quality inspection result of this sample from a professional perspective and provide your analysis and conclusion.
[0124] By performing a second quality inspection on the image based on the updated review labels and using different feature extraction models to extract image features, other possibilities can be considered for the quality inspection results, avoiding problems with the quality inspection results caused by inaccurate image feature extraction, and further improving the accuracy of image quality inspection.
[0125] Figure 6A schematic diagram of the image secondary quality inspection process is shown. A first feature extraction model is used to perform feature extraction on an input image and at least two historical images, obtaining first image features of the input image and first image features corresponding to the at least two historical images. Based on the updated audit labels of the input image and the at least two historical images, as well as the first image features corresponding to the input image and the at least two historical images, black and white images are reconstructed for the input image and the at least two historical images, obtaining first black and white libraries (a first black library and a first white library). A second feature extraction model is used to perform feature extraction on the input image and the at least two historical images, obtaining second image features of the input image and second image features corresponding to the at least two historical images. Based on the updated audit labels of the input image and the at least two historical images, as well as the second image features corresponding to the input image and the at least two historical images, black and white images are reconstructed for the input image and the at least two historical images, obtaining second black and white libraries (a second black library and a second white library). A graph clustering algorithm process is executed on the first black and white library to obtain first quality inspection results for each image, and a graph clustering algorithm process is executed on the second black and white library to obtain second quality inspection results for each image. At least one first abnormal image with different quality inspection results is determined from the input image and at least two historical images, and then a final quality inspection result corresponding to the at least one first abnormal image is obtained based on the at least one first abnormal image through a multimodal large model.
[0126] In some embodiments, step 260 is followed by step 270 , and step 270 includes at least one of sub-steps 271 - 272 .
[0127] Sub-step 271 : determining at least one second abnormal image in the at least one first abnormal image according to the final quality inspection result corresponding to the at least one first abnormal image, where the second abnormal image is the first abnormal image having an abnormal final quality inspection result.
[0128] For example, if the first abnormal image is an image whose review label is a compliance label in a community with a compliance label, or the first abnormal image is an image whose review label is a violation label in a community with a violation label, then it means that there is no abnormality in the final quality inspection result of the first abnormal image and it does not need to be re-reviewed.
[0129] In the case where the first abnormal image is an image with a review label of a violation label in a community with a compliance label, or the first abnormal image is an image with a review label of a compliance label in a community with a violation label, or the first abnormal image is an image in a community with an uncertain label, it is determined that the final quality inspection result of the first abnormal image is abnormal, and the first abnormal image is classified as a second abnormal image.
[0130] Sub-step 272: obtaining a final review label corresponding to at least one second abnormal image based on the at least one second abnormal image through the multimodal large model.
[0131] Each second abnormal image is input into the multimodal large model in combination with a specific prompt word, and the multimodal large model outputs the updated audit label corresponding to the second abnormal image. The updated audit label of the second abnormal image may be changed, for example, from a compliance label to a violation label, or from a violation label to a compliance label, or it may remain unchanged, that is, the original audit label of the second abnormal image remains unchanged. According to the updated audit label corresponding to at least one second abnormal image, the labels of the input image and at least one historical image are updated and replaced to obtain the updated audit label of the entire image.
[0132] Optionally, at least one second abnormal image may be fed back to a manual reviewer, who may determine a further updated review label for the second abnormal image based on a quality inspection result of the second abnormal image.
[0133] By updating the review labels of each image again, the correctness of the review labels is further improved, so that historical images have good fine-grained semantic representation capabilities and high transfer generalization, and can adapt to different review scenarios and data changes.
[0134] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0135] Please refer to Figure 7 , which shows a block diagram of an image quality inspection device provided by an embodiment of the present application. The device has the function of implementing the above-mentioned image quality inspection method, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be the computer device described above, or it can be set in a computer device. Figure 7 As shown, the apparatus 700 may include: an image acquisition module 710 , a feature extraction module 720 , a similarity matching module 730 , a cluster analysis module 740 and an anomaly determination module 750 .
[0136] The image acquisition module 710 is used to acquire an input image and at least two historical images, wherein the input image and each of the historical images are respectively configured with an audit label, and the audit label is a compliance label or a violation label.
[0137] The feature extraction module 720 is configured to perform feature extraction on the input image and the at least two historical images respectively, to obtain image features of the input image and image features corresponding to the at least two historical images respectively.
[0138] The similarity matching module 730 is used to determine at least one target historical image among the at least two historical images based on the image features of the input image and the image features corresponding to the at least two historical images, and the similarity between the target historical image and the input image meets the similarity condition.
[0139] The cluster analysis module 740 is configured to perform cluster analysis on the input image and the at least one target historical image to obtain a quality inspection result of the input image and a quality inspection result corresponding to the at least one target historical image.
[0140] The abnormality determination module 750 is used to determine at least one abnormal image from the input image and the at least one target historical image based on the quality inspection result of the input image and the quality inspection results corresponding to the at least one target historical image, where the abnormal image is an image with an abnormality in the quality inspection result.
[0141] In some embodiments, the cluster analysis module 740 is configured to:
[0142] Constructing a graph network based on the input image, the at least one target historical image, the similarity between the input image and each of the target historical images, and the similarity between each two of the target historical images, wherein each node in the graph network corresponds to an image, and an edge in the graph network is used to indicate the similarity between the images corresponding to two nodes connected by the edge;
[0143] A cluster analysis is performed on the input image and the at least one target historical image based on the graph network to obtain a quality inspection result of the input image and a quality inspection result corresponding to the at least one target historical image.
[0144] In some embodiments, the cluster analysis module 740 is configured to:
[0145] performing cluster analysis on the input image and the at least one target historical image based on the graph network using a graph clustering algorithm to obtain at least one community, each community including at least one image;
[0146] For each community in the at least one community, determining a label of the community according to the review label respectively configured for at least one image in the community, where the label of the community is one of the compliance label, the violation label, and an uncertain label;
[0147] According to the label of the community and the review label respectively configured for at least one image in the community, a quality inspection result of the input image and a quality inspection result respectively corresponding to the at least one target historical image are obtained.
[0148] In some embodiments, the cluster analysis module 740 is configured to:
[0149] Performing cluster analysis on the graph network using the graph clustering algorithm to obtain an initial modularity of the graph network, where the initial modularity is used to measure the closeness between nodes in the graph network;
[0150] For each of the plurality of nodes, the node is moved to a target node among the adjacent nodes to obtain an initial community corresponding to the target node, wherein the target node is a node having the largest increase in the initial modularity in each of the moved graph networks obtained by moving the node to each of the adjacent nodes;
[0151] The initial community corresponding to the target node is moved until the modularity of the graph network after the move remains unchanged or the modularity of the graph network after the move decreases, thereby obtaining the at least one community in the graph network.
[0152] In some embodiments, the cluster analysis module 740 is configured to:
[0153] Calculating, based on review labels respectively configured for at least one image in the community, a proportion of the compliance labels and a proportion of the violation labels in the at least one image;
[0154] When the proportion of the compliance label is greater than or equal to a second threshold, determining the label of the community as the compliance label;
[0155] When the proportion of the illegal labels is greater than or equal to the second threshold, determining the label of the community as the illegal label;
[0156] When the proportion of the compliant labels is less than the second threshold and the proportion of the illegal labels is less than the second threshold, the label of the community is determined to be an uncertain label.
[0157] In some embodiments, for any one of the input image and the at least one target historical image, the quality inspection result of the image is one of the following:
[0158] The image is an image of the compliance label in the community where the image is labeled as compliance, and the review label is an image of the compliance label;
[0159] The image is in the community of the illegal label, and the review label is the image of the illegal label;
[0160] The image is an image in a community with the compliance label and the review label is an image with the violation label;
[0161] The image is an image in the community with the violation label and the review label is an image with the compliance label;
[0162] The image is an image in the community of the uncertain label.
[0163] In some embodiments, the similarity matching module 730 is configured to:
[0164] respectively calculating similarities between the image features of the input image and the image features of each of the historical images to obtain similarities corresponding to the at least two historical images;
[0165] Among the similarities corresponding to the at least two historical images, at least one historical image having a similarity greater than or equal to a first threshold is determined as the at least one target historical image.
[0166] In some embodiments, the abnormal image includes at least one of the following:
[0167] The quality inspection result of the image is that the image is an image in the community with the compliance label and the review label is an image with the violation label;
[0168] The quality inspection result of the image is that the image is an image in the community with the violation label, and the review label is the compliance label;
[0169] The quality inspection result of the image is that the image is an image in a community with uncertain labels.
[0170] In some embodiments, the apparatus 700 further includes a secondary quality inspection module, wherein the secondary quality inspection module is configured to:
[0171] Obtaining, based on the at least one abnormal image, updated review labels corresponding to the at least one abnormal image using the multimodal large model;
[0172] According to the updated review labels corresponding to the input image, the at least two historical images and the at least one abnormal image, a secondary quality inspection process is performed on the input image and the at least two historical images to obtain the final quality inspection results of the input image and the final quality inspection results corresponding to the at least two historical images.
[0173] In some embodiments, the secondary quality inspection module is used to:
[0174] Using a first feature extraction model to perform feature extraction on the input image and the at least two historical images, respectively, to obtain a first image feature of the input image and first image features corresponding to the at least two historical images respectively;
[0175] Using a second feature extraction model to perform feature extraction on the input image and the at least two historical images, respectively, to obtain second image features of the input image and second image features corresponding to the at least two historical images respectively;
[0176] Obtaining a first quality inspection result of the input image and a first quality inspection result corresponding to each of the at least one historical image based on the updated review label corresponding to each of the at least one abnormal image, the first image feature of the input image, and the first image features corresponding to each of the at least two historical images;
[0177] Obtaining a second quality inspection result of the input image and a second quality inspection result corresponding to the at least one historical image based on the updated review label corresponding to the at least one abnormal image, the second image feature of the input image, and the second image features corresponding to the at least two historical images;
[0178] determining at least one first abnormal image from the input image and the at least two historical images, wherein a first quality inspection result of the first abnormal image is different from a second quality inspection result of the first abnormal image;
[0179] The multimodal large model is used to obtain final quality inspection results corresponding to the at least one first abnormal image based on the at least one first abnormal image.
[0180] In some embodiments, the secondary quality inspection module is used to:
[0181] determining, based on the final quality inspection results respectively corresponding to the at least one first abnormal image, at least one second abnormal image in the at least one first abnormal image, where the second abnormal image is the first abnormal image in which the final quality inspection result is abnormal;
[0182] The multimodal large model is used to obtain final review labels corresponding to the at least one second abnormal image based on the at least one second abnormal image.
[0183] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0184] Please refer to Figure 8, which shows a block diagram of a computer device 800 provided in one embodiment of the present application. The computer device 800 can be any electronic device with data calculation, processing, and storage functions. The computer device 800 can be used to implement the image quality inspection method provided in the above embodiment.
[0185] Typically, the computer device 800 includes a processor 801 and a memory 802 .
[0186] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), or PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0187] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices or flash memory storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 802 is used to store a computer program, which is configured to be executed by one or more processors to implement the above-described image quality inspection method.
[0188] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the computer device 800, and the computer device 800 may include more or fewer components than shown in the figure, or combine some components, or adopt a different arrangement of components.
[0189] In an illustrative embodiment, a computer-readable storage medium is also provided, storing a computer program that, when executed by a processor of a computer device, implements the image quality inspection method. Optionally, the computer-readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, or the like.
[0190] In an exemplary embodiment, a computer program product is also provided, the computer program product including a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the above-mentioned image quality inspection method.
[0191] It should be noted that this application can display a prompt interface, pop-up window or output voice prompt information before collecting the user's relevant data and during the process of collecting the user's relevant data. The prompt interface, pop-up window or voice prompt information is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are processed strictly in accordance with the requirements of relevant national laws and regulations. The informed consent or separate consent of the personal information subject is obtained only when the user agrees and authorizes it to collect the data. Subsequent data use and processing are carried out within the scope of authorization of laws and regulations and the personal information subject, and the collection, use and processing of relevant user data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0192] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application do not limit this.
[0193] The above description is merely an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. An image quality inspection method, characterized in that: The method comprises: Acquire an input image and at least two historical images, wherein the input image and each of the historical images are respectively configured with an audit label, and the audit label is a compliance label or a violation label; Performing feature extraction on the input image and the at least two historical images respectively to obtain image features of the input image and image features corresponding to the at least two historical images respectively; determining, based on image features of the input image and image features corresponding to the at least two historical images, at least one target historical image among the at least two historical images, wherein a similarity between the target historical image and the input image satisfies a similarity condition; Performing cluster analysis on the input image and the at least one target historical image to obtain a quality inspection result of the input image and a quality inspection result corresponding to the at least one target historical image; According to the quality inspection result of the input image and the quality inspection results corresponding to the at least one target historical image, at least one abnormal image is determined from the input image and the at least one target historical image, where the abnormal image is an image with an abnormality in the quality inspection result.
2. The method according to claim 1, characterized in that The performing cluster analysis on the input image and the at least one target historical image to obtain a quality inspection result of the input image and a quality inspection result corresponding to the at least one target historical image, respectively, includes: Constructing a graph network based on the input image, the at least one target historical image, the similarity between the input image and each of the target historical images, and the similarity between each two of the target historical images, wherein each node in the graph network corresponds to an image, and an edge in the graph network is used to indicate the similarity between the images corresponding to two nodes connected by the edge; A cluster analysis is performed on the input image and the at least one target historical image based on the graph network to obtain a quality inspection result of the input image and a quality inspection result corresponding to the at least one target historical image.
3. The method according to claim 2, characterized in that The performing cluster analysis on the input image and the at least one target historical image based on the graph network to obtain a quality inspection result of the input image and a quality inspection result corresponding to the at least one target historical image, respectively, includes: performing cluster analysis on the input image and the at least one target historical image based on the graph network using a graph clustering algorithm to obtain at least one community, each community including at least one image; For each community in the at least one community, determining a label of the community according to the review label respectively configured for at least one image in the community, where the label of the community is one of the compliance label, the violation label, and an uncertain label; According to the label of the community and the review label respectively configured for at least one image in the community, a quality inspection result of the input image and a quality inspection result respectively corresponding to the at least one target historical image are obtained.
4. The method according to claim 3, characterized in that The performing cluster analysis on the input image and the at least one target historical image based on the graph network by using a graph clustering algorithm to obtain at least one community includes: Performing cluster analysis on the graph network using the graph clustering algorithm to obtain an initial modularity of the graph network, where the initial modularity is used to measure the closeness between nodes in the graph network; For each of the plurality of nodes, the node is moved to a target node among the adjacent nodes to obtain an initial community corresponding to the target node, wherein the target node is a node having the largest increase in the initial modularity in each of the moved graph networks obtained by moving the node to each of the adjacent nodes; The initial community corresponding to the target node is moved until the modularity of the graph network after the move remains unchanged or the modularity of the graph network after the move decreases, thereby obtaining the at least one community in the graph network.
5. The method according to claim 3 or 4, characterized in that The determining of the label of the community according to the review label respectively configured for at least one image in the community includes: Calculating, based on review labels respectively configured for at least one image in the community, a proportion of the compliance labels and a proportion of the violation labels in the at least one image; When the proportion of the compliance label is greater than or equal to a second threshold, determining the label of the community as the compliance label; When the proportion of the illegal labels is greater than or equal to the second threshold, determining the label of the community as the illegal label; When the proportion of the compliant labels is less than the second threshold and the proportion of the illegal labels is less than the second threshold, the label of the community is determined to be an uncertain label.
6. The method according to any one of claims 3 to 5, characterized in that For any one of the input image and the at least one target historical image, the quality inspection result of the image is one of the following: The image is an image of the compliance label in the community where the image is labeled as compliance, and the review label is an image of the compliance label; The image is in the community of the illegal label, and the review label is the image of the illegal label; The image is an image in a community with the compliance label and the review label is an image with the violation label; The image is an image in the community with the violation label and the review label is an image with the compliance label; The image is an image in the community of the uncertain label.
7. The method according to any one of claims 1 to 6, characterized in that The determining, based on the image features of the input image and the image features corresponding to the at least two historical images, at least one target historical image among the at least two historical images includes: respectively calculating similarities between the image features of the input image and the image features of each of the historical images to obtain similarities corresponding to the at least two historical images; Among the similarities corresponding to the at least two historical images, at least one historical image having a similarity greater than or equal to a first threshold is determined as the at least one target historical image.
8. The method according to any one of claims 1 to 7, characterized in that The abnormal image includes at least one of the following: The quality inspection result of the image is that the image is an image in the community with the compliance label and the review label is an image with the violation label; The quality inspection result of the image is that the image is an image in the community with the violation label, and the review label is the compliance label; The quality inspection result of the image is that the image is an image in a community with uncertain labels.
9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Obtaining, based on the at least one abnormal image, updated review labels corresponding to the at least one abnormal image using the multimodal large model; According to the updated review labels corresponding to the input image, the at least two historical images and the at least one abnormal image, a secondary quality inspection process is performed on the input image and the at least two historical images to obtain the final quality inspection results of the input image and the final quality inspection results corresponding to the at least two historical images.
10. The method according to claim 9, characterized in that The performing secondary quality inspection on the input image and the at least two historical images based on the updated review labels respectively corresponding to the input image, the at least two historical images, and the at least one abnormal image to obtain final quality inspection results of the input image and final quality inspection results respectively corresponding to the at least two historical images includes: Using a first feature extraction model to perform feature extraction on the input image and the at least two historical images, respectively, to obtain a first image feature of the input image and first image features corresponding to the at least two historical images respectively; Using a second feature extraction model to perform feature extraction on the input image and the at least two historical images, respectively, to obtain second image features of the input image and second image features corresponding to the at least two historical images respectively; Obtaining a first quality inspection result of the input image and a first quality inspection result corresponding to each of the at least one historical image based on the updated review label corresponding to each of the at least one abnormal image, the first image feature of the input image, and the first image features corresponding to each of the at least two historical images; Obtaining a second quality inspection result of the input image and a second quality inspection result corresponding to the at least one historical image based on the updated review label corresponding to the at least one abnormal image, the second image feature of the input image, and the second image features corresponding to the at least two historical images; determining at least one first abnormal image from the input image and the at least two historical images, wherein a first quality inspection result of the first abnormal image is different from a second quality inspection result of the first abnormal image; The multimodal large model is used to obtain final quality inspection results corresponding to the at least one first abnormal image based on the at least one first abnormal image.
11. The method according to claim 10, characterized in that The method further comprises: Determining, based on the final quality inspection results respectively corresponding to the at least one first abnormal image, at least one second abnormal image in the at least one first abnormal image, where the second abnormal image is the first abnormal image in which the final quality inspection result is abnormal; The multimodal large model is used to obtain final review labels corresponding to the at least one second abnormal image based on the at least one second abnormal image.
12. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the image quality inspection method according to any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the image quality inspection method according to any one of claims 1 to 11.
14. A computer program product, characterized in that The computer program product includes a computer program, which is loaded and executed by a processor to implement the image quality inspection method according to any one of claims 1 to 11.