Image quality measurement method and apparatus, computer device and storage medium

By identifying and comparing the regional features of the target elements in the image with the preset category features, the problem of misjudgment in image quality detection in the existing technology is solved and the detection accuracy is improved.

WO2024198798A1PCT designated stage expired Publication Date: 2024-10-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2024/078529
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-29
Filing Date
2024-02-26
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

The existing technology easily misjudges low-definition images as high-quality images during image quality detection, resulting in insufficient detection accuracy.

Method used

By identifying the target elements in the input image, extract the current regional features of the target element area, and compare them with the category features of the preset image quality category to determine the target category features to accurately judge the image quality.

Benefits of technology

The accuracy of image quality detection is improved, misjudgments are avoided, and the accuracy of image quality categories is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024078529_03102024_PF_FP_ABST
    Figure CN2024078529_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to an image quality measurement method and apparatus, a computer device, a storage medium and a computer program product. Embodiments of the present application can be applied to the field of maps. The method comprises: acquiring an input image; identifying a target element in the input image to obtain a target element area where the target element is located in the input image; extracting current area features corresponding to the target element area; acquiring category features respectively corresponding to a plurality of preset image quality categories, wherein the category features are obtained by respectively performing feature extraction on a plurality of preset reference element images of the preset image quality categories to obtain a plurality of corresponding reference element image features, and fusing the plurality of reference element image features; respectively comparing the current area features with the category features to obtain matching degrees of the current area features and the category features, and according to the matching degrees, determining from the plurality of category features a target category feature corresponding to the current area features; and outputting the preset image quality category corresponding to the target category feature as a target area quality category of the target element area, and determining an image quality category of the input image on the basis of the target area quality category. According to the method, the accuracy of image quality measurement can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Image quality detection method, device, computer equipment and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 29, 2023, with application number 2023103557923 and application name “Image quality detection method, device, computer equipment and storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to an image quality detection method, apparatus, computer equipment, storage medium, and computer program product. Background Art

[0003] With the development of computer vision technology, image processing technology has emerged. Currently, image processing requires first capturing an image and then performing subsequent processing on the image. During image capture, the quality of the captured images can vary. For example, some images may have high clarity and high quality, while others may have low clarity and poor quality. It is often necessary to assess the quality of the captured images and filter out images of poor quality before processing subsequent tasks. Currently, image quality is typically tested using pre-set image quality assessment metrics, such as peak signal-to-noise ratio, Fourier spectrum analysis, or structural similarity index. However, using image quality assessment metrics to assess image quality can misidentify low-resolution images as high-quality images, leading to misjudgment.

[0004] Summary of the Invention

[0005] Based on this, it is necessary to provide an image quality detection method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of image quality detection in order to address the above technical problems.

[0006] In a first aspect, the present application provides an image quality detection method. The method comprises:

[0007] Acquire an input image; identify a target element in the input image and obtain a target element region where the target element is located in the input image; extract a current region feature corresponding to the target element region; obtain category features corresponding to a plurality of preset image quality categories, wherein the category features are obtained by extracting features from a plurality of preset reference element images of the preset image quality category, obtaining corresponding plurality of reference element image features, and fusing the plurality of reference element image features; compare the current region feature with each category feature respectively, obtain a matching degree between the current region feature and each category feature, and determine a target category feature corresponding to the current region feature from the plurality of category features according to the matching degree; output the preset image quality category corresponding to the target category feature as a target region quality category of the target element region, and determine the image quality category of the input image based on the target region quality category.

[0008] In a second aspect, the present application further provides an image quality detection device. The device comprises:

[0009] A region recognition module is used to obtain an input image, identify a target element in the input image, and obtain a target element region where the target element is located in the input image;

[0010] A feature extraction module is used to extract the current region features corresponding to the target feature region;

[0011] A category feature acquisition module is used to obtain category features corresponding to multiple preset image quality categories. The category features are obtained by extracting features from multiple preset reference element images of the preset image quality categories, obtaining corresponding multiple reference element image features, and fusing the multiple reference element image features.

[0012] The feature matching module is used to compare the current region feature with each category feature respectively, obtain the matching degree between the current region feature and each category feature respectively, and determine the target category feature corresponding to the current region feature from multiple category features according to the matching degree;

[0013] The quality category determination module is used to output the preset image quality category corresponding to the target category feature as the target area quality category of the target feature area, and determine the image quality class of the input image based on the target area quality category.

[0014] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:

[0015] Acquire an input image; identify a target element in the input image and obtain a target element region where the target element is located in the input image; extract a current region feature corresponding to the target element region; obtain category features corresponding to a plurality of preset image quality categories, wherein the category features are obtained by extracting features from a plurality of preset reference element images of the preset image quality category, obtaining corresponding plurality of reference element image features, and fusing the plurality of reference element image features; compare the current region feature with each category feature respectively, obtain a matching degree between the current region feature and each category feature, and determine a target category feature corresponding to the current region feature from the plurality of category features according to the matching degree; output the preset image quality category corresponding to the target category feature as a target region quality category of the target element region, and determine the image quality category of the input image based on the target region quality category.

[0016] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0017] Acquire an input image; identify a target element in the input image and obtain a target element region where the target element is located in the input image; extract a current region feature corresponding to the target element region; obtain category features corresponding to a plurality of preset image quality categories, wherein the category features are obtained by extracting features from a plurality of preset reference element images of the preset image quality category, obtaining corresponding plurality of reference element image features, and fusing the plurality of reference element image features; compare the current region feature with each category feature respectively, obtain a matching degree between the current region feature and each category feature, and determine a target category feature corresponding to the current region feature from the plurality of category features according to the matching degree; output the preset image quality category corresponding to the target category feature as a target region quality category of the target element region, and determine the image quality category of the input image based on the target region quality category.

[0018] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:

[0019] Acquire an input image; identify a target element in the input image and obtain a target element region where the target element is located in the input image; extract a current region feature corresponding to the target element region; obtain category features corresponding to a plurality of preset image quality categories, wherein the category features are obtained by extracting features from a plurality of preset reference element images of the preset image quality category, obtaining corresponding plurality of reference element image features, and fusing the plurality of reference element image features; compare the current region feature with each category feature respectively, obtain a matching degree between the current region feature and each category feature, and determine a target category feature corresponding to the current region feature from the plurality of category features according to the matching degree; output the preset image quality category corresponding to the target category feature as a target region quality category of the target element region, and determine the image quality category of the input image based on the target region quality category.

[0020] The above-mentioned image quality detection method, device, computer equipment, storage medium and computer program product identify the target element in the input image and obtain the target element area where the target element is located in the input image; extract the current area feature corresponding to the target element area; obtain category features corresponding to multiple preset image quality categories, and the category features are obtained by extracting features of multiple preset reference element images of the preset image quality category respectively, obtaining corresponding multiple reference element image features, and fusing the multiple reference element image features; compare the current area feature with each category feature respectively, obtain the matching degree between the current area feature and each category feature, and determine the target category feature corresponding to the current area feature from multiple category features according to the matching degree; output the preset image quality category corresponding to the target category feature as the target area quality category of the target element area, and determine the image quality category of the input image based on the target area quality category. That is, by matching the category features that characterize the preset image quality category with the image features of the target element area in the input image, the target area quality category of the target element area in the input image is determined, and then the image quality category of the input image is determined based on the target area quality category of the target element area, thereby avoiding taking the image quality categories of other areas in the input image except the target element area as the image quality category of the input image, thereby improving the accuracy of the obtained image quality category. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0022] FIG1 is a diagram illustrating an application environment of an image quality detection method according to an embodiment;

[0023] FIG2 is a schematic diagram of a flow chart of an image quality detection method according to an embodiment;

[0024] FIG3 is a schematic diagram of images of different quality categories in a specific embodiment;

[0025] FIG4 is a schematic diagram of the architecture of a reference feature extraction model in a specific embodiment;

[0026] FIG5 is a schematic diagram of a process for training a reference feature extraction model in one embodiment;

[0027] FIG6 is a schematic diagram of a framework for target element recognition in a specific embodiment;

[0028] FIG7 is a schematic diagram of the model structure of a target element detection model in a specific embodiment;

[0029] FIG8 is a schematic diagram of candidate box generation in a specific embodiment;

[0030] FIG9 is a schematic diagram of a process for determining characteristics of a target reference area in one embodiment;

[0031] FIG10 is a schematic diagram of a framework of an image quality detection model in a specific embodiment;

[0032] FIG11 is a schematic diagram of a process for training an image quality detection model in one embodiment;

[0033] FIG12 is a schematic flow chart of an image quality detection method in a specific embodiment;

[0034] FIG13 is a schematic diagram of the architecture of an image quality detection method in a specific embodiment;

[0035] FIG14 is a schematic diagram of a framework for image quality detection in a specific embodiment;

[0036] FIG15 is a schematic diagram of various signboard images in a specific embodiment;

[0037] FIG16 is a block diagram of an image quality detection device according to an embodiment;

[0038] FIG17 is a diagram showing the internal structure of a computer device according to one embodiment;

[0039] FIG18 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0041] The image quality detection method provided by the embodiment of the present application can be applied in the application environment shown in Figure 1. In which, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers. The server 104 can obtain the input image uploaded by the terminal 102, identify the target element in the input image, and obtain the target element area where the target element is located in the input image; extract the current area feature corresponding to the target element area, and obtain the reference area feature corresponding to each quality category. The reference area feature is obtained by extracting the features of each reference element area of ​​the corresponding quality category, obtaining each reference element area feature, and fusing each reference element area feature; based on the degree of matching between the current area feature and the reference area feature corresponding to each quality category, determine the target reference area feature corresponding to the current area feature from the reference area features corresponding to each quality category; use the quality category corresponding to the target reference area feature as the area quality category of the corresponding target element area, and determine the image quality category corresponding to the input image based on the area quality category of the target element area. The terminals may include, but are not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may include smart watches, smart bracelets, head-mounted devices, etc. The server may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services. The terminals and servers may be connected directly or indirectly via wired or wireless communication, which is not limited in this application.

[0042] In one embodiment, as shown in FIG2 , a method for detecting image quality is provided. This method is described using the server in FIG1 as an example. The method can also be applied to a terminal, or to a system including a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0043] S202, obtaining an input image.

[0044] S204 , identifying a target element in the input image, and obtaining a target element region where the target element is located in the input image.

[0045] The input image refers to the image that requires image quality testing. Image quality characterizes the image's ability to provide information to humans or machines. For example, image quality can be characterized by image clarity, distortion, blur, and so on. Better image quality, higher image clarity, and clearer images provide more information to humans or machines. Poorer image quality, lower image clarity, and blurrier images provide less information to humans or machines. Image quality is directly proportional to image clarity. Image clarity refers to the clarity of image details and their boundaries, which can be seen macroscopically by the human eye. Image quality is inversely proportional to image blur. Image distortion refers to the degree of difference between an image and its corresponding real-world environment. The higher the image distortion, the lower the image quality. Conversely, the lower the image distortion, the better the image quality. Target elements characterize objects in an image. These objects can be real or virtual objects. Real objects can include people, objects, animals, and so on. The virtual object can be a virtual person, virtual item, virtual object, etc. The object can also be an object of interest, a key object, etc. in the image. Different images are collected in different scenarios, and the target elements in the images are different. For example, in a map application scenario, the input image can be a road image, and the target element can be a physical point image area on the road, such as a traffic restriction intersection image area, a speed limit sign image area, an electronic eye image area, etc. In a face recognition application scenario, the input image can be a face image, and the target element can be a face. In an animal recognition application scenario, the input image can be an animal image, and the target element can be an animal. The target element area refers to the area of ​​the target element in the input image. The target element area can be a region of interest in the image. The region of interest refers to a pixel area delineated in the image. It is the area to be processed that is outlined from the processed image in the form of a box, ellipse, irregular polygon, etc., and can be a key pixel area in the image.

[0046] Specifically, the server can obtain the input image from the database. The server can obtain the input image captured and uploaded by the terminal. The server can also obtain the input image from a service provider that provides business services. The server can also obtain the input image from a service provider that provides data services. The server can also directly obtain the input image captured by an image acquisition device, which is a device that performs image acquisition and can be a camera, a video camera, or a still camera. The server then uses a neural network to identify the target element in the input image, extracts the area where the target element is located from the input image, and obtains the target element area where the target element is located in the input image, wherein the features of the input image can be extracted, and the region of interest can be identified based on the features of the input image to obtain the target element area where the target element is located in the input image.

[0047] In one embodiment, the server may obtain a video that requires image quality detection and use each frame in the video as an input image. The server may also extract key frames in the video and use the key frames as input images.

[0048] S206: Extract the current region features corresponding to the target element region.

[0049] S208, obtaining category features corresponding to multiple preset image quality categories, where the category features are obtained by extracting features from multiple preset reference element images of the preset image quality category, obtaining corresponding multiple reference element image features, and fusing the multiple reference element image features.

[0050] The current region feature is a feature vector or feature map used to characterize the target feature region. It can be obtained by extracting semantic information from the target feature region. The preset image quality category is a pre-set category for image quality. Different image qualities correspond to different categories. For example, if the image quality is clear, the corresponding quality category is the clear image category. If the image quality is blurry, the corresponding quality category is the blurry image category. When the image quality is between clear and blurry, the corresponding quality category can be an intermediate category. Different images can belong to the same quality category or different quality categories. If the image quality is blurry, the image quality of the image can be pre-labeled. For example, based on human experience, the image is labeled blurry and belongs to the blurry image category. The server can also calculate based on the image quality evaluation index to obtain an image quality evaluation index value for the image. The server can then determine the image quality evaluation index value range of the image according to the pre-set image quality evaluation index value ranges corresponding to different image quality categories, and determine the image quality of the image based on the image quality category within the image quality evaluation index value range. The image quality evaluation index can be the clarity of the image, or the blurriness of the image, or the distortion of the image, etc. For example, an image with a clarity greater than 100 can be determined as a clear image category, and an image with a clarity less than or equal to 100 can be determined as a clear image category. The image quality evaluation index can also be an evaluation index based on image pixel statistics, for example, the peak signal-to-noise ratio (PSNR) and mean square error of the image can be calculated to determine the image quality evaluation index value, thereby determining the image quality.

[0051] Preset image quality categories can be characterized using corresponding category features, with different preset image quality categories being characterized using different category features. For example, image features extracted from multiple clear images can be used to characterize image quality as the clear quality category, image features extracted from multiple blurred images can be used to characterize image quality as the blurred quality category, and image features extracted from an intermediate image between the clear and blurred images can be used to characterize image quality as the intermediate quality category. These clear, blurred, and intermediate images can be pre-labeled. Category features are used to characterize the semantic characteristics of the image represented by the corresponding preset image quality category. That is, if the preset image quality category is the clear quality category, then there are corresponding category features representing clear images; if the preset image quality category is the blurred quality category, then there are corresponding category features representing blurred images. The images represented by the preset image quality categories can be pre-labeled or derived based on an image quality assessment, which can be determined based on the degree of image distortion. Different quality categories can correspond to pre-set image distortion ranges. The preset reference element image refers to the image containing the pre-set reference element, and the image quality category of the preset reference element image is the same as the corresponding preset image quality category. Each preset image quality category corresponds to multiple preset reference element images. The correspondence between the preset image quality categories and the multiple preset reference element images can be pre-set. The multiple reference elements can be at least two. A reference element is an element of the same type as a target element. For example, in a road image, both the reference element and the target element can be physical point image areas on the road. In a face image, both the reference element and the target element can be facial areas in the face image. Reference element image features are features obtained by extracting semantic information from the reference element image.

[0052] Specifically, the server extracts the semantic information of the target element area to obtain the current area features corresponding to the target element area, wherein a pre-trained neural network model for extracting semantic information can be used for extraction, wherein the neural network can be a feedforward neural network or a recurrent neural network, etc. In one embodiment, the server can also extract the color features, texture features, shape features, spatial relationship features, etc. corresponding to the target element area as the current area features corresponding to the target element area. The target element area in the input image is obtained by recognition based on the input image as a whole, and then the target element area is extracted, and then the current area features of the target element area are extracted, thereby ensuring the accuracy of the extracted current area features.

[0053] The server then retrieves category features corresponding to each preset image quality category from the database. The preset image quality categories include, but are not limited to, image clarity and image blur. Specifically, the server retrieves from the database clear category features corresponding to the image clarity category and blur category features corresponding to the image blur category. The clear category features corresponding to the image clarity category may be obtained by the server pre-acquiring multiple preset reference element images corresponding to the image clarity category, i.e., the quality categories of these multiple preset reference element images are all image clarity categories. The server then performs semantic information extraction on each of the multiple preset reference element images to obtain reference element image features corresponding to each preset reference element image. Finally, the server fuses the reference element image features corresponding to each preset reference element image to obtain a clear category feature corresponding to the image clarity category. The category features corresponding to the image blur category may be obtained by the server pre-acquiring multiple preset reference element images corresponding to the image blur category, i.e., the quality categories of these multiple preset reference element images are all image blur categories. The server then performs semantic information extraction on each of the preset reference element images to obtain a reference element image feature corresponding to each preset reference element image. Finally, the server fuses the reference element image features corresponding to each preset reference element image to obtain a blur category feature corresponding to the blur category. In one embodiment, the preset image quality category may also include an intermediate image category, and the server then simultaneously obtains the category features corresponding to the intermediate category from the database. The category features corresponding to the intermediate image category are obtained by the server in advance by obtaining multiple preset reference element images corresponding to the intermediate image category, that is, the quality categories of the multiple preset reference element images are all intermediate categories. The server then extracts semantic information from each preset reference element image to obtain the reference element image features corresponding to each preset reference element image. Finally, the server fuses the reference element image features corresponding to each preset reference element image to obtain the intermediate category features corresponding to the intermediate image category. The intermediate category refers to a category between the image clarity category and the image blur category, and is used to characterize the clarity of the image as between clear and blurry. In one embodiment, the server may also fuse the features of all preset reference element images of similar quality categories to obtain the category features corresponding to all similar quality categories. For example, the preset quality categories may include a first clear category and a second clear category, and the difference in clarity of the images represented by the first clear category and the second clear category does not exceed 2%. In this case, the first clear category and the second clear category may be similar quality categories. Then, all preset reference element images corresponding to the first clear category and the second clear category are obtained, and the semantic features of all the preset reference element images are extracted, and the semantic features of all the preset reference element images are fused to obtain the category features corresponding to the first clear category and the second clear category.

[0054] S210 , comparing the current region feature with each category feature respectively to obtain a matching degree between the current region feature and each category feature respectively, and determining a target category feature corresponding to the current region feature from multiple category features according to the matching degree.

[0055] The matching degree represents the similarity between the current region feature and the category feature. A higher similarity indicates a closer match between the current region feature and the category feature, and a closer match between the target feature image's image quality category and the reference feature image's image quality category. The target category feature is the category feature with the highest degree of match with the current region feature among multiple category features.

[0056] Specifically, the server may compare the current region feature with each category feature, that is, it may use a similarity algorithm to calculate the degree of match between the current region feature and the category feature corresponding to each preset image quality category. The similarity algorithm may be a cosine similarity algorithm, a distance similarity algorithm, etc. The server then compares all the matching degrees and selects the category feature corresponding to the maximum matching degree from each matching degree as the target category feature corresponding to the current region feature.

[0057] S212: Output the preset image quality category corresponding to the target category feature as the target region quality category of the target element region, and determine the image quality category of the input image based on the target region quality category.

[0058] The target region quality category refers to the image quality category to which the target feature region belongs, and is used to characterize the image quality of the target feature region in the input image. The image quality category refers to the quality category of the input image, and is used to characterize the overall image quality of the input image.

[0059] Specifically, the server may use the preset image quality category corresponding to the target category feature as the target area quality category of the target element area. In one embodiment, the server may also obtain at least two target category features from the category features corresponding to each preset image quality category based on the degree of matching. For example, all the calculated matching degrees may be sorted from large to small, and then the corresponding category features may be selected in sequence to obtain at least two target category features. The quality categories corresponding to the at least two target category features are then obtained. When the preset image quality categories corresponding to the at least two target category features are consistent, the preset image quality category is used as the target area quality category of the target element area. When there are inconsistent preset image quality categories in the quality categories corresponding to the at least two target category features, the server may use the quality category representing high image quality as the target area quality category of the target element area, and the server may also use the quality category representing low image quality as the target area quality category of the target element area.

[0060] Then the target area quality category of the target element area is used as the image quality category corresponding to the input image. When the input image includes one target element area, the server can directly use the target area quality category of the target element area as the image quality category corresponding to the input image. When the input image includes at least two target element areas, the server can determine the image quality category corresponding to the input image based on the target area quality category of each target element area, wherein the server can use the target area quality category with the highest image quality as the image quality category corresponding to the input image. The server can also use the target area quality category with the lowest image quality as the image quality category corresponding to the input image. The server can also count the target area quality category of each target element area and obtain the target area quality category with the largest number as the image quality category corresponding to the input image. The server can also count the area quality category of each target element area and obtain the target area quality category with the smallest number as the image quality category corresponding to the input image.

[0061] In one embodiment, the input image can also be a target element image. The server can directly obtain the target element image for image quality detection, then extract the current image features corresponding to the target element image, calculate the degree of match between the current image features and each category feature, and directly determine the image quality category corresponding to the target element image based on the degree of match. This eliminates the need for target element detection and improves image quality detection efficiency.

[0062] The above-mentioned image quality detection method, device, computer equipment, storage medium and computer program product obtain the target element area where the target element is located in the input image by identifying the target element in the input image; extract the current area feature corresponding to the target element area; obtain category features corresponding to multiple preset image quality categories, and the category feature is obtained by extracting features of multiple preset reference element images of the preset image quality category respectively, obtaining corresponding multiple reference element image features, and fusing the multiple reference element image features; compare the current area feature with each category feature respectively, obtain the matching degree between the current area feature and each category feature, and determine the target category feature corresponding to the current area feature from multiple category features according to the matching degree; output the preset image quality category corresponding to the target category feature as the target area quality category of the target element area, and determine the image quality category of the input image based on the target area quality category. That is, the quality category of the target element area in the input image is determined by matching the category features that characterize the preset image quality category with the image features of the target element area in the input image, and then the quality category of the input image is determined based on the quality category of the target element area, thereby avoiding taking the image quality categories of other areas in the input image except the target element area as the quality category of the input image, thereby improving the accuracy of the obtained image quality category.

[0063] In one embodiment, before S202, that is, before acquiring the input image, identifying the target element in the input image, and obtaining the target element area where the target element is located in the input image, the following steps are further included:

[0064] Acquire multiple preset reference element images of preset image quality categories; perform feature extraction on the multiple preset reference element images respectively to obtain corresponding multiple reference element image features; fuse the multiple reference element image features to obtain category features corresponding to the preset image quality categories.

[0065] The preset image quality category is a pre-set quality category. Different quality categories reflect different image qualities. Images within the same quality category have the same or similar image qualities. The quality category can also be a quality level, with each quality level corresponding to a quality category. A higher quality level indicates better image quality, i.e., higher image clarity. Conversely, a lower quality level indicates lower image quality, i.e., lower image clarity and a blurrier image.

[0066] Specifically, the server can obtain multiple preset reference element images of preset image quality categories from the database. In the same application scenario, there will be different images corresponding to the reference elements of the same quality category. The server can obtain multiple preset reference element images of the preset image quality category in the application scenario from the database. The server can also obtain multiple preset reference element images of the preset image quality category in the application scenario uploaded by the terminal. The server can also obtain multiple preset reference element images of the preset image quality category sent by the service provider providing business services. The server can also obtain multiple preset reference element images of the quality category from the service provider providing data services.

[0067] At this point, the server can use a trained neural network for semantic information extraction to extract features from each preset reference element image, obtaining the corresponding reference element image features. This neural network is an algorithmic data model that mimics the behavioral characteristics of animal neural networks and performs distributed parallel information processing. Neural networks can achieve information processing by adjusting the interconnections between a large number of internal nodes. The server can also extract color, texture, shape, and spatial relationship features from each preset reference element image, and then concatenate these color, texture, shape, and spatial relationship features to obtain the features of each reference element image. The server then fuses the features of each reference element image. This fusion can be performed by directly concatenating or combining all the reference element image features, or by performing feature vector operations on the features of each reference element image, such as feature vector sum operations or feature vector product operations, to obtain the category features corresponding to the preset image quality category.

[0068] In one embodiment, the preset image quality categories may include at least two, and then the server obtains multiple reference element images corresponding to at least two preset image quality categories, and then extracts features of the multiple reference element images corresponding to each preset image quality category to obtain multiple reference element image features corresponding to each preset image quality category, and then fuses all reference element image features corresponding to each preset image quality category to obtain category features of each quality category.

[0069] In a specific embodiment, as shown in Figure 3, which is a schematic diagram of images with different preset image quality categories, the server can obtain various road sign images in a map application scenario, including sign images corresponding to the fuzzy image category and sign images corresponding to the clear image category. The server then extracts features from each fuzzy sign image corresponding to the fuzzy image category and fuses the features of each fuzzy sign image to obtain a reference category feature for the fuzzy image category. It then extracts features from each clear sign image corresponding to the clear image category and fuses the features of each clear sign image to obtain a category feature for the clear image category.

[0070] In the above embodiment, multiple reference element images corresponding to a preset image quality category are obtained; features are extracted from each reference element image to obtain corresponding reference element image features. The multiple reference element region features are then fused to obtain a category feature corresponding to the preset image quality category. Specifically, the features of multiple reference element images of the same preset quality category are fused to obtain a category feature corresponding to the preset image quality category, thereby making the obtained category feature more accurate.

[0071] In one embodiment, the image features of multiple reference elements are fused to obtain category features corresponding to preset image quality categories, including the following steps:

[0072] The regional features of each reference element are spliced ​​to obtain a spliced ​​feature; a convolution operation is performed based on the spliced ​​feature to obtain a category feature corresponding to a preset image quality category.

[0073] The splicing feature refers to the feature obtained by splicing the regional features of each reference element end to end.

[0074] Specifically, the server can splice the features of each reference element region end to end to obtain a spliced ​​feature. The splicing can be performed by splicing the features of each reference element region end to end in a pre-set splicing order. The splicing order can also be determined according to the order in which the server obtains the reference element regions. The splicing order can also be determined according to the order in which the server finds the reference element regions. The server then performs a convolution operation on the spliced ​​features using convolution parameters. The convolution parameters are used for feature fusion and are obtained and pre-set through training. The spliced ​​features are fused and reduced in dimension through convolution operations to obtain category features corresponding to the preset image quality category. In one embodiment, the server can also superimpose the features of each reference element region to obtain a superimposed feature, that is, superimpose the feature vectors to obtain a feature map, use the feature map as the superimposed feature, and perform a convolution operation on the superimposed feature using convolution parameters to obtain category features corresponding to the preset image quality category.

[0075] In the above embodiment, the regional features of each reference element are spliced ​​to obtain the spliced ​​features, and then a convolution operation is performed based on the spliced ​​features to obtain the reference regional features corresponding to the quality category. That is, by performing a convolution operation using convolution parameters to perform feature fusion, more detailed and accurate semantic information can be extracted, so that the obtained category features can be more accurate.

[0076] In one embodiment, the image quality detection method further includes the steps of:

[0077] Obtain a trained image feature extraction model, and input multiple reference feature images into the image feature extraction model respectively; perform feature extraction on the multiple reference feature images respectively through the feature extraction network in the image feature extraction model to obtain corresponding multiple reference feature image features; fuse the features of each reference feature region through the feature fusion network in the reference feature extraction model to obtain reference region features of the preset image quality category.

[0078] The image feature extraction model is a neural network model used to extract category features corresponding to preset image quality categories. This image feature extraction model is pre-trained and can be trained using training data or obtained from an image classification model or image recognition model that includes an image feature extraction component. The feature extraction network is a neural network used for image feature extraction and can be a convolutional neural network, a recurrent neural network, etc. The feature fusion network refers to a neural network used for feature fusion and can be a convolutional neural network, a recurrent neural network, etc.

[0079] Specifically, the server obtains a pre-trained image feature extraction model. This image feature extraction model can be obtained by training a neural network using training images and image label features corresponding to the training images. The image label features can be pre-labeled. The image feature extraction model can also be obtained from a pre-trained image recognition model that requires image feature extraction and fusion. Specifically, the portion of the image recognition model that performs image feature extraction and fusion serves as the image feature extraction model. The server then deploys the image feature extraction model. When multiple reference feature images are acquired, the deployed image feature extraction model can be invoked to perform feature extraction. Specifically, the server uses the multiple reference feature images as input to the image feature extraction model. The feature extraction network in the image feature extraction model receives each reference feature image and extracts reference feature image features corresponding to each reference feature image using the trained feature extraction parameters. All reference feature image features are then input into a feature fusion network. The feature fusion network concatenates all reference feature image features to obtain concatenated features. The concatenated features and network parameters are then used to perform neural network operations to output category features corresponding to the preset image quality categories of the multiple reference feature images.

[0080] In one specific embodiment, as shown in Figure 4, a schematic diagram of the image feature extraction model architecture is provided. Specifically, a server acquires multiple blurred road sign images and feeds them into a convolutional neural network for feature extraction, obtaining a feature vector for each road sign image. This feature vector includes k1, k2, k3, k4, ..., kn, where k1 represents the feature vector of the first road sign image, and kn represents the feature vector of the nth road sign image. The feature vectors of each road sign image are then superimposed to generate a superimposed feature map. This superimposed feature map is then convolved with the convolutional neural network to obtain a reference region feature K corresponding to the image blur category.

[0081] In the above embodiment, features of each reference element region are extracted through the feature extraction network in the reference feature extraction model to obtain features of each reference element region, and features of each reference element region are fused through the feature fusion network in the reference feature extraction model to obtain reference region features corresponding to the quality category, that is, the trained image feature extraction model is directly used to obtain category features corresponding to the quality category, thereby improving the efficiency and accuracy of the obtained type features.

[0082] In one embodiment, as shown in FIG5 , the training steps of the image feature extraction model include:

[0083] S502: Obtain each training image and the corresponding training category label, and input each training image into the initial image classification model.

[0084] Among them, the training images are images used when training the reference feature extraction model. The training category labels are labels of categories corresponding to each training image, and the training category labels are pre-set. The categories corresponding to each training image can be categories obtained after classifying the objects in each training image. The objects in the training images can be real objects, such as people, animals, plants, etc. The objects in the training images can also be virtual objects, such as virtual people, virtual animals, virtual plants, etc. That is, each training image corresponds to the same training category label, that is, the categories corresponding to each training image are the same, for example, the objects in each training image are all people categories. The initial image classification model refers to an image classification model that initializes the model parameters. The image classification model is a neural network model used to classify images. The image classification can be the classification of objects in the image, the classification and recognition of the image quality, the classification of the scene in which the image is located, etc.

[0085] Specifically, the server can obtain each training image and corresponding training category label from a database, or from a data service provider, or from a terminal that uploads each training image and corresponding training category label, or from a business service provider. The server then uses a neural network to establish an initial image classification model, i.e., establishes a neural network architecture for image classification, and then initializes the network parameters in the neural network, for example, using zero initialization, random initialization, Gaussian distribution initialization, etc., to obtain the initial image classification model.

[0086] S504: Perform feature extraction on each training image through the initial feature extraction network in the initial image classification model to obtain features of each training image.

[0087] The initial feature extraction network refers to a feature extraction network with initialized network parameters. This feature extraction network is used to extract features from an image. The feature extraction network can be a convolutional neural network, a recurrent neural network, or the like. The training image features are features corresponding to the training image extracted during training using the initialized network parameters in the initial feature extraction network.

[0088] Specifically, the server uses the initial feature extraction network in the initial image classification model to extract features from each training image, obtaining features for each training image. Weighted calculations can be performed on the training images using the initialized network parameters in the initial feature extraction network to obtain output training image features. These training image features can be feature vectors, feature maps, or feature matrices. The initial feature extraction network sequentially extracts features from each training image. When feature extraction is complete for all training images, the corresponding training image features are obtained.

[0089] S506 , fusing the features of each training image through the initial feature fusion network in the initial image classification model to obtain a training fusion feature.

[0090] S508 , performing image classification on the training fusion features through the initial classification network in the initial image classification model to obtain image training categories corresponding to each training image.

[0091] Among them, the initial feature fusion network refers to the feature fusion network with initialized network parameters. The feature fusion network is a network used to fuse features. The fused features extracted by the feature fusion network include common image semantic information. The training fusion features are the fusion features extracted during training. The initial classification network refers to the classification network with initialized network parameters. The classification network is a network for classification and recognition. The categories in the classification network are pre-set. The classification network determines the final category based on the probability of each category by identifying the probability of each category. The image training category is the category corresponding to each training image identified during training. The category can be the category of the object in each training image, the category of the scene where each training image is located, and so on.

[0092] Specifically, the server fuses the features of each training image through the initial feature fusion network in the initial image classification model to obtain a training fusion feature, that is, the network parameters in the initial feature fusion network are used to weight and calculate the features of each training image to obtain a training fusion feature, and then the training fusion feature is used to perform classification calculation through the network parameters in the initial classification network to obtain the output image training category, that is, the network parameters of the initial classification network can be used to perform weighted calculation on the training fusion feature, and then normalized calculation can be performed to obtain the output image training category.

[0093] S510, updating the initial image classification model based on the training category label and the image training category to obtain an updated image classification model;

[0094] S512, the updated image classification model is used as the initial image classification model, and the steps of obtaining each training image and the corresponding training category label and inputting each training image into the initial image classification model are iteratively executed until the training is completed to obtain the target image classification model.

[0095] The updated image classification model refers to the image classification model after the network parameters are updated. The target image classification model refers to the image classification model that has met the training completion conditions. The training completion conditions can be that the training reaches the maximum number of iterations, the network parameters obtained through training no longer change, or the training loss reaches the loss threshold.

[0096] Specifically, the server uses the training category labels and image training categories to calculate the loss information for model training. A classification loss function can be used to calculate the error between the training category labels and the image training categories to obtain the loss information for model training. The gradient descent algorithm is then used based on the loss information to reversely update the model parameters in the initial image classification model to obtain an updated image classification model. The server then uses the updated image classification model as the initial image classification model, and returns to iterate the steps of obtaining each training image and the corresponding training category label, and inputting each training image into the initial image classification model until training is complete. The trained initial image classification model is then used as the final trained target image classification model.

[0097] S514, obtaining an image feature extraction model based on the target feature extraction network and the target feature fusion network in the target image classification model.

[0098] Among them, the target feature extraction network is a trained neural network for feature extraction, and the target feature fusion network is a trained neural network for feature fusion.

[0099] Specifically, the server separates the target feature extraction network and the target feature fusion network from the trained target image classification model, and uses the target feature extraction network and the target feature fusion network as the image feature extraction model.

[0100] In the above embodiment, by obtaining each training image and the corresponding training category label, and inputting each training image into the initial image classification model for training, when the training is completed, the target feature extraction network and the target feature fusion network in the trained target image classification model are used as the image feature extraction model, that is, the target image classification model is trained using the training category labels that are easily obtained, and then the image feature extraction model is obtained from the target image classification model. There is no need to label the training image feature extraction model, thereby improving the efficiency and accuracy of the reference feature extraction model obtained.

[0101] In one embodiment, step 204, identifying a target element in the input image and obtaining a target element region where the target element is located in the input image, includes:

[0102] Extract image convolution features of the input image, perform noise filtering based on the image convolution features to obtain filtering features; perform nonlinear mapping on the filtering features to obtain mapping features, perform target element region extraction based on the mapping features, and obtain the target element region where the target element is located in the input image.

[0103] Image convolution features refer to image features obtained after convolution calculation. Filter features refer to image features obtained after filtering out noise information from features. Mapping features refer to image features obtained after nonlinear mapping.

[0104] Specifically, the server performs convolution calculation on the pixel values ​​corresponding to the input image according to the pre-trained convolution parameters to extract the image convolution features. Then, a normalization algorithm is used to perform normalization calculation on the image convolution features, that is, to filter the noise information in the features to obtain the filtered features. The normalization algorithm can be a maximum and minimum value normalization algorithm, a mean normalization algorithm, etc. Then, a nonlinear mapping function is used to perform nonlinear mapping on the filtered features to obtain mapping features. The nonlinear mapping function can be an activation function, and the activation function can be a Relu function. Finally, the mapping features are used to extract the target element region to obtain the target element region where the target element is located in the input image, wherein the mapping features can be used to determine each target element candidate region and the corresponding confidence level. Then, the target element candidate region corresponding to the maximum confidence level is selected from each target element candidate region according to the confidence level, thereby obtaining the target element region where the target element is located in the input image.

[0105] In a specific embodiment, a target element detection model can be used to identify target elements in an input image and obtain the target element region where the target element is located in the input image. Specifically, as shown in FIG6 , a schematic diagram of the overall framework of target element recognition is provided. The input image, i.e., the image on the left side of FIG6 , is obtained and input into the target element detection model. The target element detection model can be established using a convolutional neural network. As shown in FIG7 , a schematic diagram of the model structure of the target element detection model is shown, wherein the input image is subjected to feature extraction by a feature extraction part. The feature extraction part consists of a convolution layer (Convolution), a normalization layer (Batch Normalization) and an activation layer (Relu). The convolution layer is used to extract basic features such as edge texture. The normalization layer is used to normalize the features extracted by the convolution layer according to a normal distribution, filter out noise information in the features, and accelerate the convergence of the model. The activation layer is responsible for performing nonlinear mapping on the features extracted by the convolution layer to enhance the generalization ability of the model. This feature extraction process extracts a feature map corresponding to the input image. The target feature detection model then generates candidate boxes and confidence scores based on the extracted feature map. Figure 8 shows a schematic diagram of candidate box generation. Using the extracted image features, each feature point is used as the center point. Nine candidate boxes with aspect ratios of {1:1, 2:1, 1:2} and scales of 1, 2, and 3 feature points are selected as candidate boxes for target feature detection. Finally, the target feature region is determined from each candidate box based on the corresponding confidence score. The selected area in the output image of Figure 6 represents the determined target feature region, which corresponds to the road sign area in the input image.

[0106] In the above embodiment, image convolution features are extracted from the input image, followed by noise filtering and nonlinear mapping to obtain mapping features. Finally, the mapping features are used to perform region extraction to obtain the target element region where the target element is located in the input image. This improves the accuracy of the obtained target element region by filtering the noise in the image features and performing nonlinear mapping before extracting the target element region.

[0107] In one embodiment, S210 compares the current region feature with each category feature to obtain a matching degree between the current region feature and each category feature, and determines a target category feature corresponding to the current region feature from multiple category features based on the matching degree, including the following steps:

[0108] Calculate the similarity between the current region feature and each category feature to obtain the matching degree between the current region feature and each category feature;

[0109] The target matching degree is determined from the matching degree between the current region feature and each category feature, and the category feature corresponding to the target matching degree is used as the target category feature corresponding to the current region feature.

[0110] The target matching degree refers to the matching degree between the current region feature and the most similar category feature, that is, it can be the maximum matching degree among all matching degrees.

[0111] Specifically, the server can use a similarity algorithm to calculate the similarity between the current region feature and the category feature corresponding to each preset image quality category. For example, the server calculates the similarity between the current region feature and the category feature of the image blur category, calculates the similarity between the current region feature and the category feature of the image clarity category, and can also calculate the similarity between the current region feature and the category features corresponding to other preset image quality categories. The similarity is used as the degree of matching between the current region feature and the category feature, thereby obtaining the degree of matching between the current region feature and each category feature. The sizes of the various matching degrees are then compared, and the maximum matching degree is selected from the various matching degrees as the target matching degree. The category feature corresponding to the target matching degree is then used as the target category feature corresponding to the current region feature. The server can use a similarity algorithm to calculate the similarity. The similarity algorithm can be a distance similarity algorithm, such as a Euclidean distance similarity algorithm, or a cosine similarity algorithm.

[0112] In a specific embodiment, the similarity between the current region feature and the category feature can be calculated using the following formula (1).

[0113] Among them, c refers to the calculated similarity, F refers to the similarity algorithm, Refers to the current regional characteristics. Refers to the category feature corresponding to the i-th preset image quality category. That is, the similarity can be calculated using the spatial norm similarity algorithm to obtain the similarity. The closer the similarity is to 1, the more similar it is, and the closer it is to 0, the more different it is. The similarity can be calculated using the following formula (2), that is, the sum of the squares of the distance differences between the corresponding feature bits is calculated to obtain the similarity.

[0114] in, It refers to the jth feature bit in the current region feature. It refers to the jth feature bit in the category feature. Z refers to the number of feature bits, which is a positive integer. The number of feature bits of the current region feature and the number of feature bits of the category feature can be the same.

[0115] In the above embodiment, the similarities between the current region feature and the reference region feature corresponding to each quality category are calculated to obtain each matching degree, and then the target matching degree is determined from each matching degree. The reference region feature corresponding to the target matching degree is used as the target reference region feature corresponding to the current region feature, that is, the category feature that best matches the current region feature is used as the target reference region feature corresponding to the current region feature, thereby improving the accuracy of the obtained target reference region feature.

[0116] In one embodiment, the quality categories include a clear image category and a blurry image category;

[0117] As shown in FIG9 , S210 compares the current region feature with each category feature to obtain the matching degree between the current region feature and each category feature, and determines the target category feature corresponding to the current region feature from the multiple category features based on the matching degree, including:

[0118] S902, calculating the similarity between the current region feature and the reference region feature corresponding to the image clarity category, and obtaining the image clarity matching degree corresponding to the image clarity category;

[0119] S904 , calculating the similarity between the current region feature and the reference region feature corresponding to the image blur category, and obtaining the image blur matching degree corresponding to the image blur category.

[0120] Among them, the image clarity category is an image quality category used to characterize a clear image. The clear image can refer to an image with an image clarity greater than a preset threshold, or an image that has been set manually. The image blur category is an image quality category used to characterize a blurred image. The blurred image has an image clarity less than a preset threshold, or an image that has been set manually. That is, images can include two categories: blurred images and clear images. A blurred image indicates that the image quality is poor and needs to be filtered. A clear image indicates that the image quality is good and can be used subsequently. The image clarity matching degree refers to the probability that the target element area belongs to the image clarity category. The higher the image clarity matching degree, the higher the probability that the target element area belongs to the image clarity category. The image blur matching degree refers to the probability that the target element area belongs to the image blur category. The higher the image blur matching degree, the higher the probability that the target element area belongs to the image blur category.

[0121] Specifically, when multiple preset image quality categories include a clear image category and a blur image category, the server may use a distance similarity algorithm to calculate the similarity between the current region features and the category features corresponding to the clear image category when calculating the matching degree, thereby obtaining the image clear matching degree. The server may then use another distance similarity algorithm to calculate the similarity between the current region features and the category features corresponding to the blur image category, thereby obtaining the image blur matching degree. This distance similarity algorithm may be a Euclidean distance algorithm, a cosine distance algorithm, or the like.

[0122] S906 , based on the error between the image clarity matching degree and the image blur matching degree, determine the target category feature corresponding to the current region feature from the category features corresponding to the image clarity category and the category features corresponding to the image blur category.

[0123] Specifically, the server calculates the error between the image clarity matching degree and the image blur matching degree. For example, it can be the image clarity matching degree minus the image blur matching degree to obtain the error between the matching degrees. This error is used to characterize the gap between the detected image clarity category and the image blur category. Then, based on the size of the error, the category feature corresponding to the current region feature is determined from the reference region feature corresponding to the image clarity category and the reference region feature corresponding to the image blur category. When the error is a positive value, it means that the image clarity matching degree is greater than the image blur matching degree. At this time, the category feature corresponding to the image clarity matching degree can be used as the target category feature corresponding to the current region feature. When the error is a negative value, it means that the image blur matching degree is greater than the image clarity matching degree. At this time, the category feature corresponding to the image blur matching degree can be used as the target category feature corresponding to the current region feature.

[0124] In the above embodiment, the image clarity matching degree and the image blur matching degree are obtained by calculation, and then the error between the image clarity matching degree and the image blur matching degree is calculated. According to the error, the target category feature corresponding to the current area feature is determined from the category features corresponding to the image clarity category and the category features corresponding to the image blur category. That is, by comparing the error between the image clarity matching degree and the image blur matching degree, the category corresponding to the larger matching degree is selected as the target category feature corresponding to the current area feature, thereby improving the accuracy of the obtained target reference area feature.

[0125] In one embodiment, S906, based on the error between the image clarity matching degree and the image blur matching degree, determining the target category feature corresponding to the current region feature from the category features corresponding to the image clarity category and the category features corresponding to the image blur category includes:

[0126] Calculate the error between the image clarity match and the image blur match. When the error exceeds the preset error threshold, compare the image clarity match and image blur match. If the image clarity match is greater than the image blur match, use the category feature corresponding to the clarity category as the target category feature corresponding to the current region feature. If the image blur match is greater than the clarity match, use the category feature corresponding to the blur category as the target category feature corresponding to the current region feature.

[0127] The preset error threshold refers to a preset threshold for the difference between the image clarity matching degree and the image blur matching degree.

[0128] Specifically, the server calculates the error between the image clarity matching degree and the image blur matching degree, that is, subtracts the image blur matching degree from the image clarity matching degree to obtain the error, and then uses the absolute value of the error to compare with the preset error threshold. When the absolute value of the error exceeds the preset error threshold, it means that the gap between the image clarity matching degree and the image blur matching degree is large, and the quality category can be clearly confirmed. The exceeding means greater than. At this time, the server compares the image clarity matching degree and the image blur matching degree. When the image clarity matching degree is greater than the image blur matching degree, it means that the current region feature is more similar to the category feature corresponding to the image clarity category, and the server uses the category feature corresponding to the image clarity category as the target category feature corresponding to the current region feature. When the image blur matching degree is greater than the image clarity matching degree, it means that the current region feature is more similar to the category feature corresponding to the image template category. At this time, the server uses the category feature corresponding to the image blur category as the target category feature corresponding to the current region feature. For example, the image clarity matching degree is 0.9, the image blur matching degree is 0.2, and the error is 0.7. The error 0.7 exceeds the error threshold 0.5, and the image clarity matching degree 0.9 is greater than the image blur matching degree 0.2, which means that the current area feature is more similar to the category feature corresponding to the image clarity category, that is, the preset image quality category of the target element area is the image clarity category.

[0129] In one embodiment, when the error does not exceed a preset error threshold, the preset undetermined category is used as the region quality category of the target feature region.

[0130] Among them, the undetermined category refers to the image quality category in which the pre-set error does not exceed the error threshold. The undetermined category is used to characterize the situation where the quality category of the image cannot be determined, that is, it is impossible to determine whether the quality category of the target element area is the image clear category or the image blurred category. The "not exceeding" means less than or equal to.

[0131] Specifically, when the server determines that the absolute value of the error does not exceed the error threshold, the preset undetermined category can be directly used as the target area quality category of the target element area. The target element area of ​​the preset undetermined category can be re-detected, or the input image containing the target element area can be directly filtered. In a specific embodiment, when the target area quality category of the target element area has a high similarity with the image clarity category and a low similarity with the image blur category, the target area quality category of the target element area is judged to be the image clarity category. When the target area quality category of the target element area has a low similarity with the image blur category and a high similarity with the image blur category, the target area quality category of the target element area is judged to be the image blur category. When the target area quality category of the target element area has the same similarity with the image clarity category and the image blur category, for example, both are high or low, the image quality category of the target element area cannot be confirmed. For example, if the image clarity match is 0.9 and the image blur match is 0.8, the error is 0.1. This error of 0.1 does not exceed the preset error threshold of 0.5. In this case, the quality category of the target feature area cannot be determined. In other words, the quality category of the target feature area is neither blurry nor clear. In this case, the target feature area with an undetermined category can be manually judged or image quality tested again.

[0132] In the above embodiment, the error between the image clarity match degree and the image blur match degree is calculated and then compared with a preset error threshold. When the error exceeds the preset error threshold, the image clarity match degree and the image blur match degree are compared to determine the target reference region feature corresponding to the current region feature. When the error does not exceed the preset error threshold, the preset undetermined category is used as the region quality category of the target feature region. This allows detection of input images whose image quality cannot be determined, thereby improving the accuracy of image quality detection.

[0133] In one embodiment, the target element region includes at least two;

[0134] S212. Determining the image quality category of the input image based on the target region quality category, comprising the steps of:

[0135] Calculate the area ratio of at least two target element regions to the input image respectively, screen the at least two target element regions based on the area ratio to obtain the current target element region, and use the target area quality category of the current target element region as the image quality category of the input image.

[0136] Among them, the area ratio refers to the ratio of the area size of the target element area to the overall area size of the input image.

[0137] Specifically, the server obtains the target area quality category of all target element areas in the input image. When the target area quality categories of all target element areas are inconsistent, the regional area of ​​the target element area and the image area of ​​the input image are calculated, and then the ratio of the regional area to the image area is calculated to obtain the regional proportion corresponding to the target element area. The server traverses all target element areas in the input image to obtain the regional proportion of each target element area. Then, at least two target element areas are screened according to the regional proportion to obtain the current target element area, wherein the target element area with the largest regional proportion can be screened out to obtain the current target element area, and then the target area quality category of the current target element area is used as the image quality category of the input image. When the target area quality categories of all target element areas are consistent, the target area quality category is directly used as the image quality category of the input image.

[0138] In the above embodiment, when the input image includes at least two target element areas, the area ratios of the at least two target element areas and the input image are calculated respectively, and the target area quality category of the target element area with the largest area ratio is used as the image quality category corresponding to the input image, which can improve the accuracy of the image quality category corresponding to the input image.

[0139] In one embodiment, the image quality detection method further includes:

[0140] The category features corresponding to the target element area and multiple preset image quality categories are input into the image quality detection model; the current area features corresponding to the target element area are extracted through the feature extraction network in the image quality detection model, and the current area features are compared with each category feature respectively to obtain the matching degree between the current area features and each category feature, and the target category features corresponding to the current area features are determined from multiple category features according to the matching degree, and the preset image quality category corresponding to the target category features is output as the target area quality category of the target element area.

[0141] The image quality detection model is a neural network model that detects the image quality of the target feature area. This neural network model is trained using historical target feature areas and corresponding image quality category labels. The feature extraction network is a neural network used to extract image features.

[0142] Specifically, the server pre-acquires historical target feature regions and corresponding image quality category labels, trains a neural network with a set architecture and initialization parameters, and obtains an image quality detection model. The image quality detection model is then deployed and used. When the image quality of the target feature region needs to be detected, the category features corresponding to the target feature region and multiple preset image quality categories are input into the image quality detection model. Feature extraction is performed through the feature extraction network in the image quality detection model to obtain the feature vector of the corresponding image, that is, the current region feature. The current region feature is then compared with the category features corresponding to the multiple preset image quality categories, that is, the degree of match between the current region feature and each category feature is calculated. A spatial norm matching algorithm is used to calculate the similarity, that is, the sum of the squares of the distance differences of the same feature bit is calculated to obtain the respective matching degrees. Finally, the preset image quality category corresponding to the category feature with the maximum matching degree is selected as the target region quality category of the target feature region.

[0143] In a specific embodiment, as shown in FIG10 , a schematic diagram of the framework of an image quality detection model is provided. Specifically, the category features corresponding to the input image and multiple preset image quality categories are input into the image quality detection model. The image quality detection model first extracts the current features of the input image, which may be an image corresponding to the target feature area. The current features are then compared with the category features corresponding to the multiple preset image quality categories, i.e., the similarity between the current features and each category feature is calculated. The target category feature corresponding to the maximum similarity is selected, and the preset image quality category corresponding to the target category feature is used as the image quality category corresponding to the input image, thereby obtaining an image quality comparison result. Finally, the image quality category corresponding to the input image is used as the output of the image quality detection model. That is, through image quality comparison, an image quality comparison result is obtained, thereby obtaining the image quality category, thereby improving the accuracy of image quality detection.

[0144] In the above embodiment, by inputting the category features corresponding to the target element area and multiple preset image quality categories into the image quality detection model, and then using the trained image quality detection model to quickly detect the target area quality category of the target element area, the efficiency of obtaining the target area quality category can be improved.

[0145] In one embodiment, as shown in FIG11 , the steps of training the image quality detection model include:

[0146] S1102, obtaining the target element image to be trained and the corresponding image quality category label.

[0147] The target element image to be trained is the target element image used during training and is an image containing only the target element. The image quality category label is the label of the image quality category corresponding to the target element image to be trained. This image quality category label can be manually annotated in advance or automatically annotated based on the clarity of the target element image to be trained. The image quality category label can include an image clarity label and an image blur label. The target element image to be trained can include both clear target element images and blurred target element images.

[0148] Specifically, the server can obtain the target element image to be trained and the corresponding image quality category label from the database. The server can also obtain the target element image to be trained and the corresponding image quality category label from the service provider providing data services. The server can also obtain the target element image to be trained and the corresponding image quality category label uploaded by the terminal.

[0149] S1104: Input the category features corresponding to the target element image to be trained and multiple preset image quality categories into the initial image quality detection model to perform image quality detection, and obtain the training image quality category corresponding to the target element image to be trained.

[0150] The initial image quality detection model refers to an image quality detection model with initialized model parameters, and the image quality detection model is established using a neural network. The training area quality category is the quality category corresponding to the target feature image to be trained obtained during training.

[0151] Specifically, the target element image to be trained and the reference area features corresponding to each quality category are input into the initial image quality detection model. The initial image quality detection model extracts the features of the target element image to be trained through the initialized model parameters, and then uses the distance similarity algorithm to calculate the matching degree between the extracted features and the category features corresponding to multiple preset image quality categories. The quality category corresponding to the category feature with the maximum matching degree is then used as the training image quality category corresponding to the target element image to be trained.

[0152] S1106 , updating the initial image quality detection model based on the training image quality category and the image quality category label to obtain an updated image quality detection model.

[0153] S1108, the updated image quality detection model is used as the initial image quality detection model, and the step of obtaining the target element image to be trained and the corresponding image quality category label is returned to iterative execution until the training is completed to obtain the image quality detection model.

[0154] Specifically, the server can use a classification loss function to calculate the error between the training area quality category and the image quality category label to obtain training loss information. The classification loss function can be a cross-entropy loss function. The training loss information is then used to reversely update the model parameters in the initial image quality detection model through a gradient descent algorithm. When the model parameter update is completed, an updated image quality detection model is obtained. The updated image quality detection model is then used as the initial image quality detection model, and the step of obtaining the target feature image to be trained and the corresponding image quality category label is returned and iteratively executed until the training is completed. The trained initial image quality detection model is used as the final trained image quality detection model, wherein the training completion can be when the training reaches the maximum number of iterations, when the training loss information reaches the loss threshold, or when the model parameters converge.

[0155] In the above embodiment, the initial image quality detection model is trained by using the target element image to be trained, the image quality category label, and the category features corresponding to multiple preset image quality categories. When the training is completed, the image quality detection model is obtained, that is, the initial image quality detection model is iteratively updated by training the image quality category and the image quality category label, thereby improving the accuracy of the obtained image quality detection model.

[0156] In a specific embodiment, as shown in FIG12 , a flowchart of an image quality detection method is provided, which is executed by a computer device. Specifically:

[0157] S1202, obtaining multiple preset reference element images for each preset image quality category; performing feature extraction on each of the multiple preset reference element images to obtain corresponding multiple reference element image features; fusing the multiple reference element image features to obtain category features corresponding to each preset image quality category.

[0158] S1204: Obtain an input image, extract image convolution features of the input image, perform noise filtering based on the image convolution features to obtain filtered features, perform nonlinear mapping on the filtered features to obtain mapped features, perform region extraction based on the mapped features, and obtain a target feature region where the target feature is located in the input image.

[0159] S1206: Extract the current region feature corresponding to the target element region, and obtain category features corresponding to a plurality of preset image quality categories.

[0160] S1208: Calculate the similarity between the current region feature and the category features corresponding to the image clarity category in the plurality of preset image quality categories to obtain the image clarity matching degree. Calculate the similarity between the current region feature and the category features corresponding to the image blur category in the plurality of preset image quality categories to obtain the image blur matching degree.

[0161] S1210: Calculate the error between the image clarity match degree and the image blur match degree. When the error exceeds an error threshold, compare the image clarity match degree and the image blur match degree. If the image clarity match degree is greater than the image blur match degree, use the category feature corresponding to the image clarity category as the target category feature corresponding to the current region feature.

[0162] S1212: When the image blur matching degree is greater than the image clarity matching degree, the category feature corresponding to the image blur category is used as the target category feature corresponding to the current region feature. When the error does not exceed the error threshold, the undetermined category is used as the region quality category of the target feature region.

[0163] S1214 , taking the preset image quality category corresponding to the target category feature as the target region quality category of the corresponding target element region, and determining the image quality category of the input image based on the target region quality category.

[0164] In the above embodiment, the current region features corresponding to the target element area of ​​the input image are compared with the category features corresponding to each preset image quality category to determine the matching target category features, and then the preset image quality category corresponding to the matching target category features is used as the region quality category of the target element area, and the image quality category of the input image is determined based on the region quality category of the target element area, thereby improving the accuracy of the obtained image quality category.

[0165] In a specific embodiment, as shown in FIG13 , a schematic diagram of the architecture of an image quality detection method is provided. Specifically, a server receives an input image in which the region of interest (ROI) is a cat region, and the target feature is a cat. The cat region of the input image is identified and segmented to obtain the cat region. The cat region features are then extracted. Category feature A corresponding to the image clarity category and category feature B corresponding to the image blur category are obtained. The cat region features are then compared with category feature A and category feature B, respectively, to determine the degree of match a between the cat region features and category feature A, and the degree of match b between the cat region features and category feature B. The matching degrees a and b are then compared. If the matching degree a is greater than the matching degree b, category feature a is determined as the target category feature corresponding to the cat region features. The server then determines the image clarity category corresponding to the target category feature, i.e., category feature a, as the image quality category of the cat region. Based on the image quality category of the cat region, the image quality category of the input image is determined to be the image clarity category, thereby improving the accuracy of the obtained image quality category.

[0166] In one embodiment, the input image includes a road image, and the image quality detection method further includes the steps of:

[0167] When the image quality category of the road image is the image blur category, the road image is filtered; when the image quality category of the road image is the image clear category, the road map to be updated is obtained, and the road map to be updated is updated according to the road image to obtain an updated road map.

[0168] In this embodiment, a server can capture a road image, identify road signs in the road image, and obtain a road sign region within the road image. The server can then extract road sign features from the road sign region and obtain category features corresponding to multiple preset image quality categories. The server can then compare the road sign features with each category feature to determine the degree of match between the road sign features and each category feature. Based on the degree of match, a target category feature corresponding to the road sign features is determined from the multiple category features. The preset image quality category corresponding to the target category feature is used as the region quality category of the road sign region, and the quality category of the road sign region is used as the image quality category of the road image. If the image quality category of the road image is blurry, the server can filter the road image. If the image quality category of the road image is clear, the server can obtain a road map to be updated and update the road map based on the road image to obtain an updated road map. Specifically, when updating the road map, the server can filter the collected road images in the blurry category and then use the collected road images in the clear category to update the road map. This prevents blurry road images from appearing in the updated road map, thereby improving the accuracy of the road map update.

[0169] In a specific embodiment, the image quality detection method is applied in a map update scenario. Specifically, when updating road image data in a map, a server uses an image acquisition device to capture road images. Image quality detection is then performed on the captured road images. Figure 14 shows a schematic diagram of the framework for image quality detection of road images. The server acquires a sequence of captured road images and then performs image quality detection starting with the first frame of the road image. During the image quality detection, target elements are first detected in the first frame of the road image. The target elements can be signs in the road image, thereby obtaining a sign image in the first frame of the road image. Image quality detection of the sign image is then performed. The server first obtains a category notification corresponding to each preset image quality category. The category features are obtained by extracting features from each sign image corresponding to the preset image quality category, obtaining reference feature image features for each sign image, and then fusing the reference feature image features of all sign images in the preset image quality category. Figure 15 shows a schematic diagram of various sign images. Multiple preset image quality categories include blurry images and clear images. The server obtains multiple sign images in the blurry image category and multiple sign images in the clear image category, each representing a corresponding traffic element. Features corresponding to the multiple blurry image images are then extracted. All features of the blurry image category are then concatenated and fused using a convolutional neural network to obtain the category features corresponding to the blurry image category. Features corresponding to the multiple clear image images are then extracted. All features of the clear image category are then concatenated and fused using a convolutional neural network to obtain the category corresponding to the clear image category.

[0170] At this point, the server extracts features from the sign image obtained from the first image frame to obtain current region features. The server then matches the current region features with category features corresponding to multiple preset image quality categories, calculating the similarity between the current region features and the category features corresponding to each preset image quality category. The preset image quality category corresponding to the maximum similarity is selected as the preset image quality category to which the sign image belongs. For example, the preset image quality category corresponding to the maximum similarity can be the image blur category. Based on the preset image quality category to which the sign image belongs, the server determines that the preset image quality category to which the first image belongs is the image blur category. The server then sequentially traverses each road image frame in the acquired image sequence to obtain the preset image quality category to which each road image belongs. This preset image quality category can be either the image blur category or the image clarity category, thereby improving the accuracy of road image quality detection. The server then filters the road images acquired in the road image sequence, filtering out road images in the image blur category to obtain road images in the image clarity category. Road images in the image clarity category are then designated as road images that have passed image quality detection. These road images that have passed image quality detection are then used for subsequent processing tasks, such as updating road images in map data using road images that have passed image quality detection.

[0171] In a specific embodiment, the image quality detection method can also be applied to scenarios where map images are batch updated. Specifically, a server uses an image acquisition device to capture images of a target road to obtain a road image sequence. Each road image in the road image sequence may include map elements such as traffic restricted intersections, speed limit signs, and electronic cameras on the target road. Batch detection can then be performed on each road image in the road image sequence, i.e., image quality detection is performed simultaneously on each road image in the road image sequence, i.e., features of each road image are extracted simultaneously to obtain features of each road image. Each road image feature is then matched with a category feature corresponding to each preset image quality category, i.e., the similarity between each road image feature and the category feature corresponding to each preset image quality category is determined. The preset image quality category corresponding to the maximum similarity is selected as the preset image quality category to which the road image belongs, thereby obtaining image quality detection results for the batch detection, which may include road images in a clear image category or road images in a fuzzy image category. Finally, each target road image corresponding to the image clarity category is obtained from the road image sequence, and the saved historical map images of the target roads are batch updated, that is, each historical map image of the target road is updated to each target road image of the image clarity category, and the updated map image of the target road is obtained.

[0172] In a specific embodiment, the server can automatically update map images according to a time period. Specifically, when the server detects that the current time reaches the time period, it triggers an event for automatically updating the map images. In response to the event, the server uses an image acquisition device to collect the map images to be batch updated. The server then performs image quality testing on each map image, filtering out blurry map images from the map images to obtain clear target map images. The server then uses each target map image to automatically update the map image, replacing the previously saved map image to obtain the updated map image.

[0173] In a specific embodiment, the image quality detection method is applied to a face recognition scenario, specifically:

[0174] The server collects a person image, detects the face in the collected person image, and obtains the current face image. Then, it extracts features from the current face image to obtain the features of the current face image. The server then obtains the category features corresponding to the blurred face image category and the category features corresponding to the clear face image category stored in the database. The similarity between the current face image features and the category features corresponding to the blurred face image is then calculated, and the similarity between the current face image features and the category features corresponding to the clear face image is also calculated. When the category features of the clear face image category are highly similar to the current face image features of the current face image, the image quality detection result corresponding to the current face image is the result of the image clear category. At this point, face recognition can be performed on the current face image to obtain the corresponding face specific information. When the category features of the blurred face image are highly similar to the current face image features of the current face image, the image quality detection result corresponding to the current face image is the result of the image blurred category. At this time, face recognition cannot be performed normally using a blurred face image. Therefore, the server needs to re-acquire the collected face image and perform image quality detection until a clear face image is detected. Then, face recognition is performed on the face image to obtain the face recognition result.

[0175] In a specific embodiment, the image quality detection method is applied to a video media platform, specifically:

[0176] When a video or image media platform receives a video or image uploaded by a user, it first performs an image quality check on the video or image. Specifically, it performs an image quality check on the video frame. Specifically, it detects the target object in the video frame, obtains the target object region, and then extracts the object features corresponding to the target object region. The server then obtains the category features corresponding to the clear target object image category and the blurred target object image category, calculates the similarity between the current object feature and each category feature, compares the similarities, and uses the preset image quality category corresponding to the maximum similarity as the preset image quality category to which the target object region belongs. The preset image quality category of the video frame is then determined based on the preset image quality category to which the target object region belongs. If the preset image quality category of the video frame is blurred, the image quality check fails. In this case, the server can generate an image quality prompt indicating the image is blurred and send the prompt to the user's corresponding terminal for display. The user can then re-upload a video that meets the video media platform's image quality requirements. If the video frame is in the clear image category, the image quality check passes. The server then checks the image quality of all video frames in the video. If all frames are in the clear image category, the video passes the image quality check. At this point, the server can receive the video uploaded by the user and publish it on the video media platform. This image quality detection method can also be applied to image media platforms to detect the image quality of the pictures uploaded by the user. If the image quality test passes, the pictures uploaded by the user will be published on the platform.

[0177] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0178] Based on the same inventive concept, embodiments of the present application also provide an image quality detection device for implementing the aforementioned image quality detection method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more of the following embodiments of the image quality detection device can be found in the above-described limitations of the image quality detection method and will not be further elaborated here.

[0179] In one embodiment, as shown in FIG16 , an image quality detection apparatus 1600 is provided, comprising: a region identification module 1602 , a feature extraction module 1604 , a category feature acquisition module 1606 , a feature matching module 1608 , and a quality category determination module 1610 , wherein:

[0180] The region recognition module 1602 is used to obtain an input image, identify a target element in the input image, and obtain a target element region where the target element is located in the input image;

[0181] Feature extraction module 1604, used to extract the current region features corresponding to the target element region;

[0182] Category feature acquisition module 1606 is used to obtain category features corresponding to multiple preset image quality categories. Category features are obtained by extracting features from multiple preset reference element images of the preset image quality categories, obtaining corresponding multiple reference element image features, and fusing the multiple reference element image features.

[0183] The feature matching module 1608 is used to compare the current region feature with each category feature respectively, obtain the matching degree between the current region feature and each category feature respectively, and determine the target category feature corresponding to the current region feature from the multiple category features according to the matching degree;

[0184] The quality category determination module 1610 is configured to output a preset image quality category corresponding to the target category feature as a target region quality category of the target element region, and determine an image quality category of the input image based on the target region quality category.

[0185] In one embodiment, the image quality detection apparatus 1600 further includes:

[0186] The feature fusion module is used to obtain multiple preset reference element images of preset image quality categories; extract features from the multiple preset reference element images respectively to obtain corresponding multiple reference element image features; and fuse the multiple reference element image features to obtain category features corresponding to the preset image quality categories.

[0187] In one embodiment, the feature fusion module is further used to splice multiple reference element image features to obtain spliced ​​features; and perform convolution operations based on the spliced ​​features to obtain category features corresponding to preset image quality categories.

[0188] In one embodiment, the image quality detection apparatus 1600 further includes:

[0189] The model fusion module is used to obtain a trained image feature extraction model and input multiple reference feature images into the image feature extraction model respectively; the feature extraction network in the image feature extraction model is used to extract features from the multiple reference feature images respectively to obtain corresponding multiple reference feature image features; the feature fusion network in the image feature extraction model is used to fuse the multiple reference feature image features to obtain category features corresponding to the preset image quality category.

[0190] In one embodiment, the image quality detection apparatus 1600 further includes:

[0191] The model training module is used to obtain each training image and the corresponding training category label, and input each training image into the initial image classification model; perform feature extraction on each training image respectively through the initial feature extraction network in the initial image classification model to obtain each training image feature; fuse each training image feature through the initial feature fusion network in the initial image classification model to obtain the training fusion feature; perform image classification on the training fusion feature through the initial classification network in the initial image classification model to obtain the image training category; update the initial image classification model based on the training category label and the image training category to obtain an updated image classification model; use the updated image classification model as the initial image classification model, and return to the steps of obtaining each training image and the corresponding training category label, and inputting each training image into the initial image classification model, and iteratively execute until the training is completed to obtain the target image classification model; obtain the image feature extraction model based on the target feature extraction network and the target feature fusion network in the target image classification model.

[0192] In one embodiment, the region identification module 1602 is also used to extract image convolution features of the input image, perform noise filtering based on the image convolution features to obtain filtering features; perform nonlinear mapping on the filtering features to obtain mapping features, and perform target element region extraction based on the mapping features to obtain the target element region where the target element is located in the input image.

[0193] In one embodiment, the feature matching module 1606 is also used to calculate the similarity between the current region feature and multiple category features to obtain the matching degree between the current region feature and multiple category features; determine the target matching degree from the matching degree between the current region feature and multiple category features, and use the category feature corresponding to the target matching degree as the target category feature corresponding to the current region feature.

[0194] In one embodiment, the plurality of preset image quality categories include a clear image category and a blurry image category;

[0195] The feature matching module 1606 is also used to calculate the similarity between the current area feature and the category feature corresponding to the image clarity category to obtain the image clarity matching degree corresponding to the image clarity category; calculate the similarity between the current area feature and the category feature corresponding to the image blur category to obtain the image blur matching degree corresponding to the image blur category; based on the error between the image clarity matching degree and the image blur matching degree, determine the target category feature corresponding to the current area feature from the category features corresponding to the image clarity category and the category features corresponding to the image blur category.

[0196] In one embodiment, the feature matching module 1606 is also used to calculate the error between the image clarity matching degree and the image blur matching degree. When the error exceeds a preset error threshold, the image clarity matching degree and the image blur matching degree are compared; when the image clarity matching degree is greater than the image blur matching degree, the category feature corresponding to the image clarity category is used as the target category feature corresponding to the current area feature; when the image blur matching degree is greater than the image clarity matching degree, the category feature corresponding to the image blur category is used as the target category feature corresponding to the current area feature; when the error does not exceed the preset error threshold, the preset undetermined category is used as the target area quality category of the target element area.

[0197] In one embodiment, the target element area includes at least two; the quality category determination module 1608 is also used to calculate the area ratio of the at least two target element areas to the input image, screen the at least two target element areas based on the area ratio, obtain the current target element area, and use the target area quality category of the current target element area as the image quality category of the input image.

[0198] In one embodiment, the image quality detection apparatus 1600 further includes:

[0199] The model detection module is used to input the category features corresponding to the target element area and multiple preset image quality categories into the image quality detection model; extract the current area features corresponding to the target element area through the feature extraction network in the image quality detection model, and compare the current area features with each category feature respectively to obtain the matching degree between the current area features and each category feature respectively, and determine the target category features corresponding to the current area features from multiple category features according to the matching degree, and input the preset image quality category corresponding to the target category features as the target area quality category of the target element area.

[0200] In one embodiment, the image quality detection apparatus 1600 further includes:

[0201] The detection model training module is used to obtain the target element image to be trained and the corresponding image quality category label; input the category features corresponding to the target element image to be trained and multiple preset image quality categories into the initial image quality detection model for image quality detection to obtain the training image quality category corresponding to the target element image to be trained; update the initial image quality detection model based on the training image quality category and the image quality category label to obtain an updated image quality detection model; use the updated image quality detection model as the initial image quality detection model, and return to the step of obtaining the target element image to be trained and the corresponding image quality category label for iterative execution until the training is completed to obtain the image quality detection model.

[0202] In one embodiment, the input image includes a road image, and the target element region includes a road sign region; the image quality detection apparatus 1600 further includes:

[0203] The map update module is used to filter the road image when the image quality category of the road image is the image blur category; when the image quality category of the road image is the image clear category, obtain the road map to be updated, and update the road map to be updated according to the road image to obtain an updated road map.

[0204] Each module in the above-mentioned image quality detection device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0205] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in Figure 17. The computer device includes a processor, memory, an input / output (I / O) interface, and a communication interface. The processor, memory, and I / O interface are connected via a system bus, and the communication interface is connected to the system bus via the I / O interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store input image data and reference area features corresponding to various quality categories. The I / O interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements an image quality detection method.

[0206] In one embodiment, a computer device is provided, which may be a terminal. Its internal structure diagram may be as shown in FIG18 . The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via wired or wireless communication, where the wireless communication may be achieved via Wi-Fi, a mobile cellular network, NFC (near field communication), or other technologies. When executed by the processor, the computer program implements an image quality detection method. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0207] Those skilled in the art will understand that the structures shown in Figures 17 and 18 are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.

[0208] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0209] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0210] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0211] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0212] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0213] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0214] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. An image quality detection method, characterized in that: The method comprises: Get the input image; Identify a target element in the input image, and obtain a target element region where the target element is located in the input image; Extracting current region features corresponding to the target element region; Obtaining category features corresponding to a plurality of preset image quality categories, respectively, wherein the category features are obtained by extracting features from a plurality of preset reference element images belonging to the preset image quality categories, respectively, obtaining corresponding reference element image features, and fusing the plurality of reference element image features; Comparing the current region feature with each category feature respectively to obtain a matching degree between the current region feature and each category feature respectively, and determining a target category feature corresponding to the current region feature from a plurality of category features according to the matching degree; The target preset image quality category corresponding to the target category feature is output as the target area quality category of the target element area, and the image quality category of the input image is determined based on the target area quality category.

2. The method according to claim 1, characterized in that Before acquiring the input image, identifying the target element in the input image, and obtaining the target element region where the target element is located in the input image, the method further includes: Acquire a plurality of preset reference element images of preset image quality categories; Extracting features from the plurality of preset reference element images respectively to obtain corresponding reference element image features; The multiple reference element image features are fused to obtain category features corresponding to the preset image quality category.

3. The method according to any one of claims 1 to 2, characterized in that The fusing the plurality of reference element image features to obtain the category feature corresponding to the preset image quality category includes: Splicing the plurality of reference element image features to obtain a splicing feature; A convolution operation is performed based on the splicing features to obtain a category feature corresponding to the preset image quality category.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Acquire a trained image feature extraction model, and input the plurality of reference element images into the image feature extraction model respectively; Extracting features from the plurality of reference element images respectively through a feature extraction network in the image feature extraction model to obtain corresponding features of the plurality of reference element images; The plurality of reference element image features are fused through a feature fusion network in the image feature extraction model to obtain a category feature corresponding to the preset image quality category.

5. The method according to any one of claims 1 to 4, characterized in that The training steps of the image feature extraction model include: Obtaining each training image and a corresponding training category label, and inputting each training image into an initial image classification model; Extracting features from each of the training images using an initial feature extraction network in the initial image classification model to obtain features of each training image; The features of each training image are fused through an initial feature fusion network in the initial image classification model to obtain a training fusion feature; Performing image classification on the training fusion features through the initial classification network in the initial image classification model to obtain image training categories; The initial image classification model is updated based on the training category label and the image training category to obtain an updated image classification model; The updated image classification model is used as the initial image classification model, and the steps of returning to obtain each training image and the corresponding training category label, and inputting each training image into the initial image classification model are iteratively executed until the training is completed to obtain the target image classification model; The image feature extraction model is obtained based on the target feature extraction network and the target feature fusion network in the target image classification model.

6. The method according to any one of claims 1 to 5, characterized in that The identifying the target element in the input image and obtaining the target element region where the target element is located in the input image includes: Extracting image convolution features of the input image, and performing noise filtering based on the image convolution features to obtain filtering features; The filtering feature is nonlinearly mapped to obtain a mapping feature, and a target element region is extracted based on the mapping feature to obtain a target element region where the target element is located in the input image.

7. The method according to any one of claims 1 to 6, characterized in that: The comparing the current region feature with each category feature to obtain a matching degree between the current region feature and each category feature, and determining a target category feature corresponding to the current region feature from a plurality of category features according to the matching degree, includes: Calculating the similarity between the current region feature and each category feature to obtain the matching degree between the current region feature and each category feature; The target matching degree is determined from the matching degrees between the current region feature and each category feature, and the category feature corresponding to the target matching degree is used as the target category feature corresponding to the current region feature.

8. The method according to any one of claims 1 to 7, characterized in that The plurality of preset image quality categories include a clear image category and a blurry image category; The comparing the current region feature with each category feature to obtain a matching degree between the current region feature and each category feature, and determining a target category feature corresponding to the current region feature from a plurality of category features according to the matching degree, includes: Calculating the similarity between the current region feature and the category feature corresponding to the image clarity category to obtain the image clarity matching degree corresponding to the image clarity category; Calculating the similarity between the current region feature and the category feature corresponding to the image blur category to obtain the image blur matching degree corresponding to the image blur category; Based on the error between the image clarity matching degree and the image blur matching degree, the target category feature corresponding to the current region feature is determined from the category features corresponding to the image clarity category and the category features corresponding to the image blur category.

9. The method according to any one of claims 1 to 8, characterized in that The determining, based on the error between the image clarity matching degree and the image blur matching degree, of the target category feature corresponding to the current region feature from the category feature corresponding to the image clarity category and the category feature corresponding to the image blur category comprises: Calculating the error between the image clarity matching degree and the image blur matching degree, and when the error exceeds a preset error threshold, comparing the image clarity matching degree and the image blur matching degree; When the image clarity matching degree is greater than the image blur matching degree, the category feature corresponding to the image clarity category is used as the target category feature corresponding to the current region feature; When the image blur matching degree is greater than the image clear matching degree, the class corresponding to the image blur category is The identification feature is used as the target category feature corresponding to the current area feature; When the error does not exceed a preset error threshold, a preset undetermined category is used as the target area quality category of the target element area.

10. The method according to any one of claims 1 to 9, characterized in that The target element area includes at least two; The determining the image quality category of the input image based on the target area quality category comprises: Calculate the area ratio of the at least two target element regions to the input image respectively, screen the at least two target element regions based on the area ratios to obtain a current target element region, and use the target area quality category of the current target element region as the image quality category of the input image.

11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: Inputting the category features corresponding to the target element area and the plurality of preset image quality categories into an image quality detection model; The current region features corresponding to the target element region are extracted through the feature extraction network in the image quality detection model, and the current region features are compared with each category feature respectively to obtain the matching degree between the current region features and each category feature respectively, and the target category features corresponding to the current region features are determined from multiple category features according to the matching degree, and the preset image quality category corresponding to the target category features is output as the target region quality category of the target element region.

12. The method according to any one of claims 1 to 11, characterized in that The training steps of the image quality detection model include: Obtain the target feature image to be trained and the corresponding image quality category label; Inputting the category features corresponding to the target element image to be trained and the plurality of preset image quality categories into an initial image quality detection model to perform image quality detection, and obtaining the training image quality category corresponding to the target element image to be trained; Updating the initial image quality detection model based on the training image quality category and the image quality category label to obtain an updated image quality detection model; The updated image quality detection model is used as the initial image quality detection model, and the step of obtaining the target element image to be trained and the corresponding image quality category label is returned and iteratively executed until the training is completed to obtain the image quality detection model.

13. The method according to any one of claims 1 to 12, characterized in that The input image includes a road image, and the target element area includes a road sign area; The method further comprises: When the image quality category of the road image is an image blur category, filtering the road image; When the image quality category of the road image is the image clarity category, a road map to be updated is acquired, and the road map to be updated is updated according to the road image to obtain an updated road map.

14. An image quality detection device, characterized in that: The device comprises: A region recognition module is used to obtain an input image, identify a target element in the input image, and obtain a target element region where the target element is located in the input image; A feature extraction module, used to extract the current region features corresponding to the target element region; A category feature acquisition module, used to obtain category features corresponding to a plurality of preset image quality categories, wherein the category features are obtained by extracting features from a plurality of preset reference element images of the preset image quality categories, obtaining corresponding reference element image features, and fusing the plurality of reference element image features; The feature matching module is used to compare the current region feature with each category feature to obtain the current the matching degree between the regional feature and each of the category features, and determining the target category feature corresponding to the current regional feature from the multiple category features according to the matching degree; The quality category determination module is used to output the preset image quality category corresponding to the target category feature as the target area quality category of the target element area, and determine the image quality category of the input image based on the target area quality category.

15. The device according to claim 14, characterized in that The device further comprises: A feature fusion module is used to obtain multiple preset reference element images of a preset image quality category; extract features from the multiple preset reference element images respectively to obtain corresponding multiple reference element image features; and fuse the multiple reference element image features to obtain category features corresponding to the preset image quality category.

16. The device according to any one of claims 14 to 15, characterized in that The feature fusion module is also used to splice the multiple reference element image features to obtain splicing features; and perform convolution operations based on the splicing features to obtain category features corresponding to the preset image quality category.

17. The device according to any one of claims 14 to 16, characterized in that The device further comprises: A model fusion module is used to obtain a trained image feature extraction model and input the multiple reference element images into the image feature extraction model respectively; extract features from the multiple reference element images respectively through the feature extraction network in the image feature extraction model to obtain corresponding multiple reference element image features; fuse the multiple reference element image features through the feature fusion network in the image feature extraction model to obtain category features corresponding to the preset image quality category.

18. The device according to any one of claims 14 to 17, characterized in that The device further comprises: The model training module is used to obtain each training image and the corresponding training category label, and input each training image into the initial image classification model; extract features from each training image through the initial feature extraction network in the initial image classification model to obtain features of each training image; fuse the features of each training image through the initial feature fusion network in the initial image classification model to obtain training fusion features; perform image classification on the training fusion features through the initial classification network in the initial image classification model to obtain image training categories; update the initial image classification model based on the training category label and the image training category to obtain an updated image classification model; use the updated image classification model as the initial image classification model, and return to the steps of obtaining each training image and the corresponding training category label, and inputting each training image into the initial image classification model, and iteratively execute until the training is completed to obtain a target image classification model; obtain the image feature extraction model based on the target feature extraction network and the target feature fusion network in the target image classification model.

19. The device according to any one of claims 14 to 18, characterized in that The region identification module is also used to extract image convolution features of the input image, perform noise filtering based on the image convolution features to obtain filtering features; perform nonlinear mapping on the filtering features to obtain mapping features, perform target element region extraction based on the mapping features, and obtain the target element region where the target element is located in the input image.

20. The device according to any one of claims 14 to 19, characterized in that The feature matching module is also used to calculate the similarity between the current area feature and the multiple category features to obtain the matching degree between the current area feature and the multiple category features; determine the target matching degree from the matching degree between the current area feature and the multiple category features, and use the category feature corresponding to the target matching degree as the target category feature corresponding to the current area feature.

21. The device according to any one of claims 14 to 20, characterized in that The plurality of preset image quality categories include a clear image category and a blurry image category; The feature matching module is also used to calculate the similarity between the current region feature and the category feature corresponding to the image clarity category, and obtain the image clarity matching degree corresponding to the image clarity category; calculate the similarity between the current region feature and the category feature corresponding to the image blur category, and obtain the image blur matching degree corresponding to the image blur category; Based on the error between the image clarity matching degree and the image blur matching degree, the target category feature corresponding to the current region feature is determined from the category features corresponding to the image clarity category and the category features corresponding to the image blur category.

22. The device according to any one of claims 14 to 21, characterized in that The feature matching module is also used to calculate the error between the image clarity matching degree and the image blur matching degree. When the error exceeds a preset error threshold, the image clarity matching degree and the image blur matching degree are compared; when the image clarity matching degree is greater than the image blur matching degree, the category feature corresponding to the image clarity category is used as the target category feature corresponding to the current area feature; when the image blur matching degree is greater than the image clarity matching degree, the category feature corresponding to the image blur category is used as the target category feature corresponding to the current area feature; when the error does not exceed the preset error threshold, the preset undetermined category is used as the target area quality category of the target element area.

23. The device according to any one of claims 14 to 22, characterized in that The target element area includes at least two; The quality category determination module is also used to calculate the area ratio of the at least two target element areas to the input image respectively, screen the at least two target element areas based on the area ratios to obtain the current target element area, and use the target area quality category of the current target element area as the image quality category of the input image.

24. The device according to any one of claims 14 to 23, characterized in that The device further comprises: A model detection module is used to input the category features corresponding to the target element area and the multiple preset image quality categories into the image quality detection model; extract the current area features corresponding to the target element area through the feature extraction network in the image quality detection model, and compare the current area features with each category feature respectively to obtain the matching degree between the current area features and each category feature respectively, determine the target category feature corresponding to the current area feature from multiple category features according to the matching degree, and output the preset image quality category corresponding to the target category feature as the target area quality category of the target element area.

25. The device according to any one of claims 14 to 24, characterized in that The device further comprises: A detection model training module is used to obtain a target element image to be trained and a corresponding image quality category label; input the category features corresponding to the target element image to be trained and the multiple preset image quality categories into an initial image quality detection model for image quality detection to obtain a training image quality category corresponding to the target element image to be trained; update the initial image quality detection model based on the training image quality category and the image quality category label to obtain an updated image quality detection model; use the updated image quality detection model as the initial image quality detection model, and return to the step of obtaining the target element image to be trained and the corresponding image quality category label for iterative execution until the training is completed to obtain the image quality detection model.

26. The device according to any one of claims 14 to 25, characterized in that The device further comprises: The map update module is used to filter the road image when the image quality category of the road image is a blurred image category; when the image quality category of the road image is a clear image category, obtain the road map to be updated, and update the road map to be updated according to the road image to obtain an updated road map.

27. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.

28. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

29. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

Citation Information

Patent Citations

  • Image quality evaluation method, electronic equipment and computer readable storage medium

    CN111079740A

  • Fixed-format target image element information extraction method and system

    CN112699867A

  • Image recognition method and device, equipment and storage medium

    CN115115872A

  • Object area measurement method, electronic device and storage medium

    US20210390728A1

Cited By

  • Image processing method and apparatus, and related device

    WO2026138389A1