Image validity analysis method, system, device, and storage medium
By performing image partitioning and weight calculation, the problem of high misjudgment rate in the effectiveness evaluation of local image regions in existing technologies is solved, thereby improving the accuracy of image effectiveness analysis and the efficiency of AI analysis.
Patent Information
- Application Number
- CN202410978278.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2044-07-19
AI Technical Summary
Existing image validity assessment methods have a high misjudgment rate when evaluating images that are valid in local areas, leading to a decrease in the accuracy of AI analysis and an increase in computing power consumption.
By partitioning the image, calculating the weight of each region, obtaining effective reference values based on the weights, and combining the threshold to determine the validity of the image, abnormal image data is eliminated. A full-coverage partitioning method is used to incorporate the effective feature information of local regions into the evaluation.
This improved the accuracy of image validity analysis, reduced the false positive rate, and ensured the accuracy and computational efficiency of AI analysis.
Smart Images

Figure CN118941521B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an image validity analysis method, system, device, and storage medium. Background Technology
[0002] During flight, aircraft conduct reconnaissance of the ground environment by capturing images of the ground at specific angles using video acquisition equipment. The captured video is then analyzed to detect suspicious targets. Currently, AI technology is used for this suspicious target analysis, enabling more effective and intelligent detection. The entire AI analysis process is fully automated. It acquires video from the acquisition equipment, uses neural network models to analyze and identify suspicious targets, and then records or pushes the results out.
[0003] However, during flight, the video image data collected by the aircraft is affected by various factors such as the environment, and contains many invalid images (images that do not contribute to subsequent AI feature extraction). If the video image data collected by the video acquisition device is not filtered and all the video images are directly analyzed by AI, the accuracy of AI analysis will be reduced on the one hand, and the computing power consumption of the AI processor will be increased on the other hand.
[0004] Chinese patent CN114782731A discloses a method for evaluating the validity of image datasets. It transforms sample data into feature vectors to visually represent the feature differences between sample data. Then, based on the spatial distribution of feature vectors, it filters out sample data corresponding to discretely distributed feature vectors as invalid sample data. The patent has the following drawback: when there are feature information in a local area of an image that contributes to subsequent AI feature extraction, the image is also valid. However, when using the patent's method of judging the image as a whole to evaluate such images, the misjudgment rate is relatively high. Summary of the Invention
[0005] This invention proposes an image validity analysis method, system, device, and storage medium, which solves the problem that existing image validity evaluation methods have a high misjudgment rate when evaluating images that are valid in local areas.
[0006] The technical solution of this invention is implemented as follows:
[0007] The first aspect of this invention provides an image validity analysis method, comprising the following steps:
[0008] Acquire the collected image data and remove abnormal image data through preprocessing;
[0009] The image is divided into several regions, and the weight of each region is calculated.
[0010] Obtain the valid reference value of the current image based on the weight of each region;
[0011] Determine if the valid reference value of the current image is less than the threshold. If it is less, the image is considered valid; otherwise, it is considered invalid.
[0012] This invention, by partitioning an image, can cover all regions of the image. Even if a local area of the image contains valid feature information, it can still be judged as a valid image. This avoids missing images where only a local area contains valid feature information, thereby improving the accuracy of image validity analysis and reducing the false judgment rate of valid image selection.
[0013] Specifically, image preprocessing methods include: detecting the brightness, contrast, or sharpness of the image, and removing images with abnormal brightness, contrast, or sharpness.
[0014] Specifically, the image is divided into the following 7 regions:
[0015] rect(1)={0, 0, width, height}
[0016]
[0017] Where rect(i) = {x, y, w, h} represents the i-th rectangular region, (x, y) represents the coordinates of the starting point of the i-th rectangular region; w and h represent the width and height of the i-th rectangular region, respectively; width and height represent the width and height of the entire image, respectively.
[0018] Specifically, the method for calculating the weights of each region is as follows:
[0019] Calculate the mean and variance of the grayscale values within each rectangular region, and then normalize the mean and variance of the grayscale values within each rectangular region. The normalization formula is as follows:
[0020] NormMean rect (i)=Mean rect(i) / 100
[0021] NormVar rect(i) =Var rect(i) / 60
[0022] Among them, Mean rect(i) Var rect(i) NormMeann represents the mean and variance of the gray values within the i-th rectangular region, respectively. rect(i) NormVar rect(i)Let represent the mean and variance of the i-th rectangular region after normalization, respectively;
[0023] The normalized mean and variance of the i-th region are combined into a weight, and the merging formula is as follows:
[0024] W rect(i) =0.3×NormVar rect(i) +0.7×NormMean rect(i)
[0025] Among them, W rect(i) This represents the weight of the i-th region.
[0026] Specifically, the method for obtaining the valid reference value of the current image is as follows:
[0027] Sort the weights of each region in the current image in ascending order;
[0028] The weight value with index 3 is taken as the minimum value, denoted as SortW. rect(3) The weight value with index 5 is taken as the maximum value, denoted as SortW. rect(5) ;
[0029] The valid reference value of the current image is calculated using the following formula:
[0030] Valid = SortW rect(3) / SortW rect(5)
[0031] Here, Valid represents the valid reference value of the current image.
[0032] Specifically, the threshold is obtained by the following method:
[0033] A large amount of image data was acquired to construct a sample set, in which valid images accounted for 3 / 5 of the sample set;
[0034] Calculate the effective reference value for each image sample in the sample set, and sort the effective reference values of each image sample in ascending order;
[0035] Take the valid reference value at the corresponding 3 / 5 position as the threshold.
[0036] A second aspect of the present invention provides an image validity analysis system, comprising:
[0037] The image acquisition module is used to acquire image data;
[0038] The preprocessing module is used to remove abnormal image data;
[0039] The region segmentation module is used to divide the image into several regions;
[0040] The weight calculation module is used to calculate the weight of each region;
[0041] The acquisition module is used to obtain the valid reference values of the current image based on the weights of each region;
[0042] The judgment module is used to determine whether the valid reference value of the current image is less than the threshold. If it is less than the threshold, the image is judged as a valid image; otherwise, the image is judged as an invalid image.
[0043] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that the processor executes the computer program to implement the steps of the above-described image validity analysis method.
[0044] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the above-described image validity analysis method. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart illustrating an image validity analysis method according to the present invention.
[0047] Figure 2 This is a diagram illustrating the effect of region division in an embodiment of the present invention. Detailed Implementation
[0048] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0049] Reference Figure 1 The first aspect of this invention provides an image validity analysis method, comprising the following steps:
[0050] Acquire the collected image data and remove abnormal image data through preprocessing;
[0051] The image is divided into several regions, and the weight of each region is calculated.
[0052] Obtain the valid reference value of the current image based on the weight of each region;
[0053] Determine if the valid reference value of the current image is less than the threshold. If it is less, the image is considered valid; otherwise, it is considered invalid.
[0054] This invention, by partitioning an image, can cover all regions of the image. Even if a local area of the image contains valid feature information, it can still be judged as a valid image. This avoids missing images where only a local area contains valid feature information, thereby improving the accuracy of image validity analysis and reducing the false judgment rate of valid image selection.
[0055] Specifically, the aircraft (manned / unmanned) used for inspection will have an electro-optical ball installed in the pod to collect infrared or color images. When flying, the electro-optical ball will tilt at 45° to photograph the ground and collect image data information.
[0056] Specifically, the method for preprocessing images includes: detecting the brightness, contrast, or sharpness of the image, and removing images with abnormal brightness, contrast, or sharpness. This coarse image filtering method is a conventional method in the field and will not be described in detail in this embodiment.
[0057] Specifically, considering the environmental influences during the shooting process, some localized areas may appear clear. From an application perspective, these are also considered valid images. Therefore, this invention employs a full-coverage partitioning method to divide the image into the following 7 regions:
[0058] rect(1) = {0, 0, width, height}
[0059]
[0060] Where rect(i) = {x, y, w, h} represents the i-th rectangular region, (x, y) represents the coordinates of the starting point of the i-th rectangular region (in this embodiment, the lower left corner of the rectangular region is used as the starting point); w and h represent the width and height of the i-th rectangular region, respectively; width and height represent the width and height of the entire image, respectively. Region numbered 1 covers the entire image, and the size and position of the seven regions on the image are all different. Figure 2 As shown in the figure, the rectangular areas marked with numbers 1 to 7 correspond to the seven rectangular areas rect(1) to rect(7).
[0061] In this embodiment, the purpose of dividing the image into 7 rectangular regions is to cover all regions of the image. If there is a relatively clear image in a local area, the image can also be considered a valid image, so that image data that only captures local features can be retained as a valid image.
[0062] In practice, when dividing an image into regions, the number, position, and size of the regions can be flexibly adjusted according to the actual situation, and are not limited to the number, position, and size specified in this embodiment.
[0063] Specifically, the method for calculating the weights of each region is as follows:
[0064] Calculate the mean and variance of the grayscale values within each rectangular region, and then normalize the mean and variance of the grayscale values within each rectangular region. The normalization formula is set based on empirical values as follows:
[0065] NormMean rect(i) =Mean rect(i) / 100
[0066] NormVar rect(i) =Var rect(i) / 60
[0067] Among them, Mean rect(i) Var rect(i) NormMean represents the mean and variance of the gray values within the i-th rectangular region, respectively. rect(i) NormVar rect(i) These represent the mean and variance of the i-th rectangular region after normalization, respectively; 60 and 100 are empirical values and can be adjusted flexibly according to the actual situation.
[0068] The normalized mean and variance of the i-th region are combined into a weight, and the merging formula is as follows:
[0069] W rect(i) =0.3×NormVar rect(i) +0.7×NormMean rect(i)
[0070] Among them, W rect(i) This represents the weight of the i-th region. The parameters 0.3 and 0.7 can be adjusted flexibly according to the actual situation.
[0071] Specifically, the method for obtaining the valid reference value of the current image is as follows:
[0072] Sort the weights of each region in the current image in ascending order;
[0073] The weight value with index 3 is taken as the minimum value, denoted as SortW.rect(3) The weight value with index 5 is taken as the maximum value, denoted as SortW. rect(5) The reason for taking the weight values of positions 3 and 5 as the minimum and maximum values is to remove the influence of high-frequency and low-frequency data and find the part that is more representative of image quality as the evaluation criterion, so as to more accurately evaluate the effectiveness of the image.
[0074] The valid reference value of the current image is calculated using the following formula:
[0075] Valid = SortW rect(3) / SortW rect(5)
[0076] Here, Valid represents the valid reference value of the current image.
[0077] Specifically, the threshold is obtained by the following method:
[0078] A large amount of image data was acquired to construct a sample set (a total of 1 million image samples were acquired in this embodiment). Among them, the effective images accounted for 3 / 5 of the sample set, with 600,000 effective images and 400,000 invalid images.
[0079] Calculate the valid reference value for each image sample in the sample set. sample And sort the valid reference values of each image sample in ascending order;
[0080] Take the valid reference value at the corresponding 3 / 5 position as the threshold T.
[0081] AI analysis is performed only after obtaining valid images. Currently, AI analysis uses the classic YOLOv5 object detection model, which is fast and easy to deploy. After object detection, the detection information is uploaded to the host computer, where the host computer makes the final decision.
[0082] A second aspect of the present invention provides an image validity analysis system, comprising:
[0083] The image acquisition module is used to acquire image data;
[0084] The preprocessing module is used to remove abnormal image data;
[0085] The region segmentation module is used to divide the image into several regions;
[0086] The weight calculation module is used to calculate the weight of each region;
[0087] The acquisition module is used to obtain the valid reference values of the current image based on the weights of each region;
[0088] The judgment module is used to determine whether the valid reference value of the current image is less than the threshold. If it is less than the threshold, the image is judged as a valid image; otherwise, the image is judged as an invalid image.
[0089] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, characterized in that the processor executes the computer program to implement the steps of the above-described image validity analysis method.
[0090] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the above-described image validity analysis method.
[0091] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An image validity analysis method, characterized in that, Includes the following steps: Acquire the collected image data and remove abnormal image data through preprocessing; The image is divided into several regions, and the weight of each region is calculated. The image is divided into the following 7 regions: in, Let (x, y) represent the i-th rectangular region, and let (x, y) represent the starting point coordinates of the i-th rectangular region; w and h represent the width and height of the i-th rectangular region, respectively; width and height represent the width and height of the entire image, respectively. The method for calculating the weights of each region is as follows: Calculate the mean and variance of the grayscale values within each rectangular region, and then normalize the mean and variance of the grayscale values within each rectangular region. The normalization formula is as follows: in, , Let these represent the mean and variance of the gray values within the i-th rectangular region, respectively. , Let represent the mean and variance of the i-th rectangular region after normalization, respectively; The normalized mean and variance of the i-th region are combined into a weight, and the merging formula is as follows: in, This represents the weight of the i-th region; The effective reference value of the current image is obtained based on the weight of each region; the method for obtaining the effective reference value of the current image is as follows. Sort the weights of each region in the current image in ascending order; The weight value with index 3 is taken as the minimum value, denoted as . Take the weight value with index 5 as the maximum value, denoted as . ; The valid reference value of the current image is calculated using the following formula: Wherein, Valid represents the valid reference value of the current image; Determine whether the valid reference value of the current image is less than a threshold. If it is less, the image is considered valid; otherwise, it is considered invalid. The threshold is obtained using the following method: A large amount of image data was acquired to construct a sample set, in which valid images accounted for 3 / 5 of the sample set; Calculate the effective reference value for each image sample in the sample set, and sort the effective reference values of each image sample in ascending order; The valid reference value at the 3 / 5 position of the sorted sequence is taken as the threshold.
2. The image validity analysis method as described in claim 1, characterized in that, Methods for preprocessing images include detecting the brightness, contrast, or sharpness of the image and removing images with abnormal brightness, contrast, or sharpness.
3. An image validity analysis system, based on the image validity analysis method according to claim 1 or 2, characterized in that, include: The image acquisition module is used to acquire image data; The preprocessing module is used to remove abnormal image data; The region segmentation module is used to divide the image into several regions; The weight calculation module is used to calculate the weight of each region; The acquisition module is used to obtain the valid reference values of the current image based on the weights of each region; The judgment module is used to determine whether the valid reference value of the current image is less than the threshold. If it is less than the threshold, the image is judged as a valid image; otherwise, the image is judged as an invalid image.
4. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the image validity analysis method as described in claim 1 or 2.
5. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the image validity analysis method as described in claim 1 or 2.
Citation Information
Patent Citations
Image data set validity evaluation method and device, equipment and storage medium
CN114782731A
Power equipment infrared image segmentation method and device and terminal equipment
CN115908259A
Wire damage assessment method
CN116703870A
