A high-precision detection method based on image analysis

By using technical means such as multi-scale feature conversion, correlation adaptive fusion and significance scoring in image analysis, the problems of poor abnormal detection effect and insufficient scale feature weighting in the prior art are solved, and high-precision and high-reliability abnormal area detection are achieved.

CN119251232BActive Publication Date: 2025-04-01LUDONG UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411783212.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-01
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The prior art has poor abnormal detection effect on local details, easy to miss important information, and cannot achieve dynamic weighting between features of different scales, resulting in inaccurate positioning of abnormal areas and poor visualization effect.

Method used

High-precision detection methods based on image analysis, including multi-scale feature conversion, correlation adaptive fusion, significance score calculation and morphological operation, are used to generate clear and visual abnormality detection results.

Benefits of technology

Through multi-scale feature transformation and adaptive fusion, information redundancy is eliminated, and the recognition and detection accuracy of abnormal areas are improved; through significance scores and morphological processing, the reliability and accuracy of detection are enhanced, ensuring that abnormal areas are confirmed in multi-level evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251232B_ABST
    Figure CN119251232B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image analysis and processing, and in particular to a high-precision detection method based on image analysis, comprising the following steps: obtaining an original image to be detected, performing preprocessing operations on the original image data, including normalization processing, denoising processing and brightness adjustment, converting the preprocessed image into feature matrices of different scales through multi-scale feature conversion, calculating the correlation between the feature matrices through an associated adaptive fusion module, and generating a fusion feature map; calculating the significance score of each pixel point in the fusion feature map, generating an abnormal score matrix, and determining a significant abnormal area in combination with a deviation matrix; decomposing the original image information into different scales through a multi-scale feature conversion module, capturing the local and global abnormal features of the image by using the comprehensive information of the feature matrices of different scales, eliminating the information redundancy between the features of each scale, and improving the recognition of the abnormal area and the accuracy of detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image analysis and processing, and in particular to a high-precision detection method based on image analysis. Background Art

[0002] Based on the rapid development of image processing and computer vision in recent years, especially in application scenarios such as intelligent image analysis, industrial monitoring, medical image analysis and public safety, the demand for image anomaly detection technology is increasing. Image anomaly detection is a key technology that automatically identifies areas in images that do not conform to normal features or have abnormal areas. It has broad application potential in early fault warning, abnormal behavior recognition, automatic defect detection, etc. With the continuous advancement of machine vision and deep learning, traditional detection methods are gradually replaced by efficient automated detection technologies, which has promoted the development of more intelligent and accurate image anomaly detection methods.

[0003] In specific applications, the scenarios and requirements of image anomaly detection vary. For example, in industrial quality inspection, it is necessary to accurately locate tiny defects on the surface of the product to ensure that the product is of qualified quality; in the medical field, image anomaly detection can help doctors quickly find abnormal tissues in medical images and improve diagnostic efficiency and accuracy; in the field of public safety, automatic identification of abnormal behaviors in surveillance video images can provide early warnings before dangerous events occur, such as fire warnings in the event of a fire. These application scenarios usually require detection methods to be able to identify abnormal areas with high precision at different scales and under complex backgrounds. Therefore, image anomaly detection technology not only requires high sensitivity and accuracy, but also good robustness and adaptability to cope with the diversity of image environments.

[0004] However, the existing technology has poor anomaly detection effect on local details and is prone to missing important information, thereby reducing the accuracy of detection; it is unable to achieve dynamic weighting between features of different scales, resulting in serious information redundancy or loss of features of each scale during the fusion process, and thus is unable to accurately reflect the multi-scale comprehensive characteristics of the abnormal area, resulting in inaccurate positioning of the abnormal area and poor visualization effect. Summary of the invention

[0005] The present invention provides a high-precision detection method based on image analysis to solve the problems that the prior art has poor abnormality detection effect on local details, easily misses important information, and thus reduces the accuracy of detection; it is unable to realize dynamic weighting between features of different scales, resulting in serious information redundancy or loss of each scale feature during the fusion process, thereby failing to accurately reflect the multi-scale comprehensive characteristics of the abnormal area, resulting in inaccurate positioning of the abnormal area and poor visualization effect.

[0006] A high-precision detection method based on image analysis of the present invention comprises the following steps:

[0007] S1. Obtaining the original image to be detected, and performing preprocessing operations on the original image data, including normalization, denoising and brightness adjustment;

[0008] S2, the preprocessed image generates feature matrices of different scales through multi-scale feature conversion, and calculates the correlation between feature matrices through the correlation adaptive fusion module to generate a fusion feature map;

[0009] S3, calculate the significance score of each pixel in the fusion feature map, generate anomaly score matrix, determine the significant abnormal area by combining with the deviation matrix, and mark the abnormal area by adaptive threshold segmentation;

[0010] S4. Further apply morphological operations to accurately extract the contours of the abnormal area and generate clear and visual anomaly detection results.

[0011] Furthermore, the normalization processing in S1 is used to map the image pixel values ​​to a unified numerical range [0, 1] to reduce the distribution differences of data under different input conditions and ensure that the feature extraction modules of each scale can work within a consistent data range; the denoising processing mainly adopts methods such as Gaussian filtering to reduce the high-frequency noise components in the image, thereby avoiding the influence of noise interference on the generation of the feature matrix; the brightness adjustment adaptively adjusts the brightness distribution so that the image still maintains the consistency of features under different brightness conditions, so as to improve the significance performance of the subsequent feature matrix at different scales.

[0012] Furthermore, the preprocessed input image With higher consistency and data quality, in order to extract image feature information at different scales, the preprocessed input image After the decomposition operation of the multi-scale feature conversion module, a set of initial feature matrices of different scales are generated;

[0013] Specifically, the input image At each different scale, it is combined with the adaptive feature transformation matrix, and then the initial feature matrix is ​​obtained through the activation function. For each different scale i, the generation formula of the feature matrix is:

[0014]

[0015] in, is the feature matrix generated under scale i, are the row and column coordinates of the feature matrix respectively; is the adaptive transformation matrix of scale i, which is used to extract scale-specific features. Its element values ​​are determined by row coordinates. and column coordinates Decide; is a bias term used to balance feature outputs of different scales; Indicates the size of the convolution kernel of scale i, which controls the receptive field range of feature extraction;

[0016] Through the activation function The nonlinear transformation generates multiple feature matrices of different scales, ensuring that each feature matrix retains the image feature information at different scales, providing sufficient data for subsequent multi-scale fusion.

[0017] Furthermore, in order to effectively integrate feature matrices of different scales, a correlation adaptive fusion module is proposed. By quantifying the similarity between features of different scales, the accuracy of feature fusion is further optimized, the correlation between feature matrices is calculated, and the relationship between feature matrices of different scales is encoded through the correlation matrix;

[0018] For any two feature matrices and , the specific definition of its correlation matrix elements is as follows:

[0019]

[0020] in, is the feature matrix and The correlation value between them is used to describe the similarity between features of different scales; is the feature matrix generated under scale j; and It represents the dimension of the feature matrix, that is, the number of rows and columns. By performing an exponential transformation on the sum of squares of feature differences, the similarity between matrices can be quantified. The larger the correlation value, the higher the similarity between feature matrices, which is suitable for subsequent adaptive weight adjustment.

[0021] Furthermore, the similarity between feature matrices of different scales is quantified through the correlation matrix. In order to further give higher weights to feature matrices with high similarity during the fusion process, an asymmetric weighting matrix is ​​defined to optimize feature fusion. The generation of each weight element is combined with the norm of the correlation matrix and the feature matrix, which is defined as follows:

[0022]

[0023] in, is the feature matrix and The weighted value between and is the L2 norm of the feature matrix. The feature amplitude is taken into account through the norm to enhance the expression effect of high-amplitude features. The denominator is the same as the feature matrix The associated values ​​and of all features involved; is the number of multi-scale feature matrices; is a constant used to prevent the denominator from being zero;

[0024] The generation of weight matrices ensures the adaptive weighting of multi-scale features and enhances the contribution of highly correlated feature matrices in the fusion process.

[0025] Further, in obtaining the weighted matrix and the incidence matrix Afterwards, the feature matrix is ​​fused hierarchically and progressively to form the final multi-scale fusion feature matrix. The fusion process adopts hierarchical progressive superposition, and each feature matrix is ​​gradually weighted and superimposed to generate the final fusion feature map. The formula for progressive fusion is as follows:

[0026]

[0027] in, Represents the fused feature matrix, which contains the comprehensive features of feature matrices of different scales; It is used to further perform nonlinear transformation on the values ​​of the feature matrix so that the feature superposition results have a higher contribution when the similarity is high, thereby realizing the dynamic fusion of multi-scale features.

[0028] Furthermore, the fused feature matrix contains significant information of the abnormal area and enters the progressive anomaly assessment module for anomaly detection;

[0029] First, the significance score of each point is calculated to evaluate the degree of abnormality at different positions in the feature map and form an abnormality score matrix; the significance score is calculated based on the local difference of each point in the fusion feature matrix, combined with the Gaussian deviation and entropy difference method, using the following formula:

[0030]

[0031] in, is an element in the abnormal score matrix, representing a pixel point Significance score in the fused feature matrix; and are the mean and standard deviation of the fused feature map, respectively, which are used to measure the overall distribution of the normal area of ​​the image; is the adjustment coefficient, which is used to balance the contribution of the deviation term and the entropy difference term; The sensitivity of abnormal region scoring is enhanced so that abnormal regions get higher values ​​in the scoring matrix.

[0032] Furthermore, in order to further locate the significant abnormal area, the abnormal deviation matrix is ​​formed by calculating the deviation value, which is used to mark the significant difference of the abnormal area in the feature map. The calculation formula of the abnormal deviation matrix is ​​as follows:

[0033]

[0034] in, Represents the value in the deviation matrix, reflecting the difference between the fusion feature matrix and the significance score; and are the mean and standard deviation of the significance score matrix, which are used to correct the central tendency of the deviation values; the high-order power terms of the deviation values The anomaly scores of locations with larger deviations are further improved, so that the truly abnormal areas can be highlighted in the deviation matrix.

[0035] Furthermore, the results of the significance score matrix and the deviation matrix are combined to generate the final anomaly detection map, which is used to mark the abnormal area. The generation formula of the final detection map is as follows:

[0036]

[0037] in, is an element of the anomaly detection map, indicating that Abnormal score at is the Sigmoid activation function, which normalizes the detection results to the range of [0,1]; the square term in the formula The scores of highly significant areas are further enhanced, so that the final detection results have high discrimination and can accurately mark abnormal areas.

[0038] Furthermore, the anomaly detection graph Apply adaptive threshold segmentation, set an adaptive threshold T, The area is marked as abnormal area, and the remaining area is marked as normal area;

[0039] Adaptive thresholds can be obtained by maximum inter-class variance method or local mean difference calculation to ensure that the thresholds are flexibly adjusted in different images to adapt to various abnormal features;

[0040] Apply morphological operations (such as dilation and erosion) on the binary anomaly map obtained by segmentation to further optimize the edges of the anomaly area, remove noise, ensure the connectivity of the area, eliminate isolated noise points, and smooth the edges of the area, so as to obtain a clearer and more accurate outline of the anomaly area;

[0041] Perform contour detection on the binary image after morphological processing to mark the specific contour of the abnormal area. For example, methods such as Canny edge detection can be used to obtain accurate boundary information of the abnormal area to ensure effective positioning of the abnormality on a high-precision basis.

[0042] The detected abnormal area is superimposed on the original image to generate a visualization result, highlighting the abnormal area, or the location information of the abnormal area is output as coordinate data for subsequent analysis and processing.

[0043] The beneficial effects of the technical solution of the present invention are:

[0044] 1. The original image information is decomposed into different scales through the multi-scale feature conversion module, and the comprehensive information of the feature matrices of different scales is used to capture the local and global abnormal features of the image. The information redundancy between the features of each scale is eliminated through the adaptive fusion of multi-scale correlation and asymmetric weighting, so that the fused feature matrix can fully reflect the multi-level information of the abnormal area, thereby improving the recognition of the abnormal area and the accuracy of detection;

[0045] 2. Adaptive correlation matrix calculation ensures that feature information of different scales is appropriately quantized during the fusion process, avoiding interference from low-correlation features and improving detection performance in noisy environments or complex backgrounds. Dynamic weighting of high-correlation feature matrices is achieved through correlation and asymmetric weighting matrices, avoiding the problem of amplifying or weakening the importance of a single feature. The generated fusion feature matrix effectively highlights the significant features of the abnormal area, showing stronger sensitivity in the comparison between the abnormal area and the normal area, making detection more efficient.

[0046] 3. By combining the Gaussian deviation and entropy difference to construct a significant scoring matrix, the significant abnormal areas in the fused feature map are given high scores, which improves the ability to distinguish abnormal areas. Further deviation matrix calculations screen potential abnormal points through high-order deviation scores, increase the reliability and accuracy of anomaly detection, and ensure that abnormal areas are gradually confirmed in multi-level evaluations.

[0047] 4. The final anomaly detection map is segmented by adaptive threshold, morphological processing and contour detection, which not only accurately demarcates the scope of the abnormal area, but also effectively removes the interference of noise and non-target areas. The contour of the segmented abnormal area can be directly superimposed on the original image to highlight the abnormal position in a visual way. In addition, the position information can also be output as coordinate data, which is convenient for further analysis and processing based on the detection results, meeting the needs of various image anomaly detection scenarios, such as fire warning in case of fire. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0049] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0051] A specific scheme of a high-precision detection method based on image analysis provided by the present invention is described in detail below with reference to the accompanying drawings.

[0052] See attached Figure 1 , which shows a flow chart of a high-precision detection method based on image analysis of the present invention, the method comprising the following steps:

[0053] S1. Obtain the original image to be detected and perform preprocessing operations on the original image data, including normalization, denoising and brightness adjustment.

[0054] Normalization is used to map image pixel values ​​to a uniform numerical range [0, 1] to reduce the distribution differences of data under different input conditions and ensure that feature extraction modules at each scale can work within a consistent data range. De-noising mainly uses methods such as Gaussian filtering to reduce high-frequency noise components in the image, thereby avoiding the influence of noise interference on the generation of feature matrices. Brightness adjustment adaptively adjusts the brightness distribution so that the image still maintains feature consistency under different brightness conditions, thereby improving the saliency of subsequent feature matrices at different scales.

[0055] S2. The preprocessed image generates feature matrices of different scales through multi-scale feature transformation, and the correlation between feature matrices is calculated through the correlation adaptive fusion module to generate a fusion feature map.

[0056] The preprocessed input image With higher consistency and data quality, in order to extract image feature information at different scales, the preprocessed input image is decomposed by the multi-scale feature conversion module to generate a set of initial feature matrices at different scales. Specifically, the input image At each specific scale, it is combined with the adaptive feature transformation matrix and then passed through the activation function to obtain the initial feature matrix. For each scale i, the formula for generating the feature matrix is:

[0057]

[0058] in, is the feature matrix generated under scale i, are the row and column coordinates of the feature matrix respectively; is the adaptive transformation matrix of scale i, which is used to extract scale-specific features. Its element values ​​are determined by row coordinates. and column coordinates Decide; is a bias term used to balance feature outputs of different scales; Indicates the size of the convolution kernel of scale i, which controls the receptive field range of feature extraction. The nonlinear transformation generates multiple feature matrices of different scales, ensuring that each feature matrix retains the image feature information at different scales, providing sufficient data for subsequent multi-scale fusion.

[0059] In order to effectively integrate feature matrices of different scales, a correlation adaptive fusion module is proposed to further optimize the accuracy of feature fusion by quantifying the similarity between features of different scales; calculate the correlation between feature matrices, and encode the relationship between feature matrices of different scales through the correlation matrix. and , the specific definition of its correlation matrix elements is as follows:

[0060]

[0061] in, is the feature matrix and The correlation value between them is used to describe the similarity between features of different scales; is the feature matrix generated under scale j; and Represents the dimension of the feature matrix, that is, the number of rows and columns. By performing an exponential transformation on the sum of squares of feature differences, the similarity between matrices can be quantified. The larger the correlation value, the higher the similarity between feature matrices, which is suitable for subsequent adaptive weight adjustment.

[0062] The similarity between feature matrices of different scales is quantified through the correlation matrix. In order to further give higher weights to feature matrices with high similarity during the fusion process, an asymmetric weighting matrix is ​​defined to optimize feature fusion. Each weight element is generated by combining the norm of the correlation matrix with the feature matrix, which is defined as follows:

[0063]

[0064] in, is the feature matrix and The weighted value between and is the L2 norm of the feature matrix. The feature amplitude is taken into account through the norm to enhance the expression effect of high-amplitude features. The denominator is the same as the feature matrix The associated values ​​and of all features involved; is the number of multi-scale feature matrices; is a constant used to prevent the denominator from being zero; the generation of the weight matrix ensures the adaptive weighting of multi-scale features and enhances the contribution of feature matrices with strong correlation in the fusion process.

[0065] In obtaining the weighted matrix and the incidence matrix Afterwards, the feature matrix is ​​fused hierarchically and progressively to form the final multi-scale fusion feature matrix. The fusion process adopts hierarchical progressive superposition, and each feature matrix is ​​gradually weighted and superimposed to generate the final fusion feature map. The formula for progressive fusion is as follows:

[0066]

[0067] in, Represents the fused feature matrix, which contains the comprehensive features of feature matrices of different scales; It is used to further perform nonlinear transformation on the values ​​of the feature matrix so that the feature superposition results have a higher contribution when the similarity is high, thereby realizing the dynamic fusion of multi-scale features.

[0068] S3. Calculate the significance score of each pixel in the fused feature map, generate an anomaly score matrix, combine the deviation matrix to determine the significant anomaly area, and mark the anomaly area through adaptive threshold segmentation.

[0069] The fused feature matrix contains the significant information of the abnormal area and enters the progressive anomaly assessment module for anomaly detection. First, the significance score of each point is calculated to evaluate the degree of abnormality at different positions in the feature map and form an anomaly score matrix; the significance score is based on the local difference of each point in the fused feature matrix, combined with the Gaussian deviation and entropy difference method, and is calculated using the following formula:

[0070]

[0071] in, is an element in the abnormal score matrix, representing a pixel point The significance score in the fused feature matrix, and are the mean and standard deviation of the fused feature map, respectively, which are used to measure the overall distribution of the normal area of ​​the image; is the adjustment coefficient, which is used to balance the contribution of the deviation term and the entropy difference term; The sensitivity of abnormal region scoring is enhanced so that abnormal regions get higher values ​​in the scoring matrix.

[0072] In order to further locate the significant abnormal area, the abnormal deviation matrix is ​​formed by calculating the deviation value, which is used to mark the significant difference of the abnormal area in the feature map. The calculation formula of the abnormal deviation matrix is ​​as follows:

[0073]

[0074] in, Represents the value in the deviation matrix, reflecting the difference between the fusion feature matrix and the significance score; and are the mean and standard deviation of the significance score matrix, which are used to correct the central tendency of the deviation values; the high-order power terms of the deviation values The anomaly scores of locations with larger deviations are further improved, so that the truly abnormal areas can be highlighted in the deviation matrix.

[0075] The results of the significance score matrix and the deviation matrix are combined to generate the final anomaly detection map, which is used to mark the abnormal area. The generation formula of the final detection map is as follows:

[0076]

[0077] in, is an element of the anomaly detection map, indicating that Abnormal score at is the Sigmoid activation function, which normalizes the detection results to the range of [0,1]; the square term in the formula The scores of highly significant areas are further enhanced, so that the final detection results have high discrimination and can accurately mark abnormal areas.

[0078] Anomaly detection graph Apply adaptive threshold segmentation, set an adaptive threshold T, The area with abnormal value is marked as abnormal area, and the remaining area is marked as normal area. The adaptive threshold can be obtained by the maximum inter-class variance method or the local mean difference calculation to ensure that the threshold is flexibly adjusted in different images to adapt to various abnormal features.

[0079] S4. Further apply morphological operations to accurately extract the contours of the abnormal area and generate clear and visual anomaly detection results.

[0080] Apply morphological operations (such as dilation and erosion) to the binary anomaly map obtained by segmentation to further optimize the edges of the abnormal area, remove noise, ensure the connectivity of the area, eliminate isolated noise points, and smooth the edges of the area, so as to obtain a clearer and more accurate outline of the abnormal area. Perform contour detection on the binary image that has been processed by morphology to mark the specific outline of the abnormal area. Methods such as Canny edge detection can be used to obtain accurate boundary information of the abnormal area to ensure effective positioning of the anomaly on a high-precision basis. Superimpose the detected abnormal area on the original image to generate a visualization result, highlight the abnormal area, or output the location information of the abnormal area as coordinate data for subsequent analysis and processing.

[0081] In summary, the processing of a high-precision detection method based on image analysis has been completed.

[0082] The original image information is decomposed into different scales through the multi-scale feature conversion module, and the local and global abnormal features of the image are captured by using the comprehensive information of feature matrices of different scales. The information redundancy between features of different scales is eliminated through adaptive fusion of multi-scale correlation and asymmetric weighting, so that the fused feature matrix can fully reflect the multi-level information of the abnormal area, thereby improving the recognition of the abnormal area and the accuracy of detection;

[0083] Adaptive correlation matrix calculation ensures that feature information of different scales is appropriately quantized during the fusion process, avoiding interference from low-correlation features and improving detection performance in noisy environments or complex backgrounds. Dynamic weighting of high-correlation feature matrices is achieved through correlation and asymmetric weighting matrices, avoiding the problem of amplifying or weakening the importance of a single feature. The generated fusion feature matrix effectively highlights the significant features of the abnormal area, showing stronger sensitivity in the comparison between the abnormal area and the normal area, making detection more efficient.

[0084] By combining the Gaussian deviation and entropy difference to construct a significant scoring matrix, the significant abnormal areas in the fused feature map can obtain high scores, which improves the ability to distinguish abnormal areas. Further deviation matrix calculation screens potential abnormal points through high-order deviation scores, increases the reliability and accuracy of anomaly detection, and ensures that abnormal areas are gradually confirmed in multi-level evaluations.

[0085] The final anomaly detection map is generated through adaptive threshold segmentation, morphological processing and contour detection, which not only accurately demarcates the scope of the abnormal area, but also effectively removes the interference of noise and non-target areas; the contour of the segmented abnormal area can be directly superimposed on the original image to highlight the abnormal position in a visual way; in addition, the position information can also be output as coordinate data, which is convenient for further analysis and processing based on the detection results, meeting the needs of various image anomaly detection scenarios, such as fire warning in the event of a fire.

[0086] The order of the embodiments of the invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0087] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0088] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A high-precision detection method based on image analysis, characterized in that: The method comprises the following steps: S1. Obtaining the original image to be detected, and performing preprocessing operations on the original image data, including normalization, denoising and brightness adjustment; S2, the preprocessed image generates feature matrices of different scales through multi-scale feature conversion, and calculates the correlation between feature matrices through the correlation adaptive fusion module to generate a fusion feature map; In order to effectively integrate feature matrices of different scales, quantify the similarity between features of different scales, calculate the correlation between feature matrices, and encode the relationship between feature matrices of different scales through the correlation matrix; For any two feature matrices and , the specific definition of its correlation matrix elements is as follows: ; in, is the feature matrix and The correlation value between them is used to describe the similarity between features of different scales; is the feature matrix generated under scale j; and Represents the dimension of the feature matrix, that is, the number of rows and columns; In order to further define the weighted matrix to give higher weights to the high similarity feature matrix in the fusion process, the generation of each weight element is combined with the norm of the feature matrix through the association matrix, which is defined as follows: ; in, is the feature matrix and The weighted value between and is the L2 norm of the feature matrix. The feature amplitude is taken into account through the norm to enhance the expression effect of high-amplitude features. The denominator is the feature matrix The associated values ​​and of all features involved; is the number of multi-scale feature matrices; is a constant used to prevent the denominator from being zero; S3, calculate the significance score of each pixel in the fusion feature map, generate anomaly score matrix, determine the significant abnormal area by combining with the deviation matrix, and mark the abnormal area by adaptive threshold segmentation; In obtaining the weighted matrix and the incidence matrix Afterwards, the feature matrix is ​​fused hierarchically and progressively to form the final multi-scale fused feature matrix; The fused feature matrix contains significant information of the abnormal area and enters the progressive anomaly assessment module for anomaly detection; First, the significance score of each point is calculated to evaluate the degree of abnormality at different positions in the feature map and form an abnormality score matrix; the significance score is calculated based on the local difference of each point in the fusion feature matrix, combined with the Gaussian deviation and entropy difference method, using the following formula: ; in, is an element in the abnormal score matrix, representing a pixel point Significance score in the fused feature matrix; and are the mean and standard deviation of the fused feature map, respectively, which are used to measure the overall distribution of the normal area of ​​the image; is the adjustment coefficient, which is used to balance the contribution of the deviation term and the entropy difference term; The sensitivity of abnormal region scoring is enhanced, so that abnormal regions get higher values ​​in the abnormality scoring matrix; In order to further locate the significant abnormal area, the deviation value is calculated to form an abnormal deviation matrix to locate the significant abnormal area, which is used to mark the significant difference of the abnormal area in the feature map. The calculation formula of the deviation matrix is ​​as follows: ; in, Represents the value in the deviation matrix, reflecting the difference between the fusion feature matrix and the significance score; and are the mean and standard deviation of the anomaly score matrix, respectively, which are used to correct the central tendency of the deviation values; the high-order power terms of the deviation values The anomaly scores of locations with large deviations are further improved, so that the truly abnormal areas can be highlighted in the deviation matrix; S4. Further apply morphological operations to accurately extract the contours of the abnormal area and generate clear and visual anomaly detection results.

2. A high-precision detection method based on image analysis according to claim 1, characterized in that: The normalization process in S1 is used to map the image pixel values ​​to a uniform numerical range [0, 1], the denoising process adopts a Gaussian filtering method, and the brightness adjustment is performed by adaptively adjusting the brightness distribution.

3. A high-precision detection method based on image analysis according to claim 2, characterized in that: In order to extract image feature information at different scales, the preprocessed input image After the decomposition operation of the multi-scale feature conversion module, a set of feature matrices of different scales are generated; Specifically, the input image At each different scale, it is combined with the adaptive feature transformation matrix and then the feature matrix is ​​obtained through the activation function. For each different scale i, the generation formula of the feature matrix is: ; in, is the feature matrix generated under scale i, are the row and column coordinates of the feature matrix respectively; is the adaptive feature transformation matrix of scale i, which is used to extract scale-specific features. Its element values ​​are determined by row coordinates. and column coordinates Decide; is a bias term used to balance feature outputs of different scales; Represents the size of the convolution kernel of scale i, which controls the receptive field range of feature extraction.

4. A high-precision detection method based on image analysis according to claim 3, characterized in that: The fusion process adopts hierarchical progressive superposition, gradually weighting and superimposing each feature matrix to generate the final fusion feature map. The formula for progressive fusion is as follows: ; in, Represents the fused feature matrix, which contains the comprehensive features of feature matrices of different scales; It is used to further perform nonlinear transformation on the values ​​of the feature matrix so that the feature superposition results have a higher contribution when the similarity is high, thereby realizing the dynamic fusion of multi-scale features.

5. A high-precision detection method based on image analysis according to claim 4, characterized in that: The results of the anomaly scoring matrix and the deviation matrix are combined to generate the final anomaly detection map, which is used to mark the abnormal area. The generation formula of the final anomaly detection map is as follows: ; in, is an element of the anomaly detection map, indicating that Abnormal score at is the Sigmoid activation function, which normalizes the detection results to the range of [0,1]; the square term in the formula Further strengthen the scores of high-significance areas.

6. A high-precision detection method based on image analysis according to claim 5, characterized in that: Anomaly detection graph Apply adaptive threshold segmentation, set an adaptive threshold T, The area is marked as abnormal area, and the remaining area is marked as normal area; The adaptive threshold is obtained by the maximum between-class variance method or local mean difference calculation; Apply the morphological operations of dilation and erosion to the binary anomaly map obtained by segmentation to further optimize the edge of the anomaly area, remove noise, ensure the connectivity of the area, eliminate isolated noise points, and smooth the area edge, so as to obtain a clear and accurate outline of the anomaly area; Perform contour detection on the binary anomaly image that has been processed by morphology, mark the specific contour of the abnormal area, and use the Canny edge detection method to obtain the precise boundary information of the abnormal area to ensure the effective positioning of the anomaly on the basis of high precision; The detected abnormal area is superimposed on the original image to generate a visualization result, highlighting the abnormal area, or the location information of the abnormal area is output as coordinate data for subsequent analysis and processing.

Citation Information

Patent Citations

  • Abnormity detection method and system based on similarity learning fusion model

    CN115169426A

  • Image anomaly detection method based on multilevel feature fusion network

    CN115661480A