Ancient building appearance corrosion degree evaluation method and system based on artificial intelligence
Through technical means such as atmospheric scattering model, circulating channel compensation, local adaptive contrast enhancement and multi-weight pyramid fusion, the problem of sunlight angle and shadow impact in the corrosion degree assessment of ancient buildings is solved, and the accuracy and fault tolerance of the assessment are improved through multi-branch feature extraction and dynamic weighting technology.
Patent Information
- Application Number
- CN202510653384.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-05-21
AI Technical Summary
The existing methods for evaluating the corrosion degree of ancient buildings ignore the influence of sunlight angle and shadow, resulting in poor accuracy of the evaluation results, and insufficient feature extraction conflicts and detailed excavation, making it difficult to deal with shooting noise and compression artifacts.
The atmospheric scattering model is used to estimate the transmittance to restore scene radiation, remove the graying caused by haze and dust; the circulation channel is used to compensate for the color casting caused by daylight, shadow and shooting angle; the local adaptive contrast enhancement is used to highlight the tiny cracks and peeling edges; the IMF component weighting fusion is used in each layer of the pyramid with three weights: crack significance, texture frequency and illuminance balance; the multi-branch exclusive feature extraction is designed, and the SE-type coding attention and disturbance activation function is embedded to dynamically weight and adjust the noise intensity.
It improves the accuracy and effect of the corrosion assessment of the appearance of ancient buildings, ensures that the original textures such as stone and brickwork are accurately restored, and enhances the fault tolerance of shooting noise and compression artifacts.
Smart Images

Figure CN120182835A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and specifically refers to a method and system for evaluating the corrosion degree of the appearance of ancient buildings based on artificial intelligence. Background Art
[0002] The method for evaluating the corrosion degree of the appearance of ancient buildings is a series of methods that comprehensively use a variety of technologies and means to quantitatively analyze and grade the corrosion status of the appearance of ancient buildings caused by natural environment, human factors, etc. However, the general method for evaluating the corrosion degree of the appearance of ancient buildings has problems such as ignoring the influence of sunlight angle and shadow, misjudging the degree of material damage due to color cast in the evaluation result, and it is difficult for contrast adjustment to adapt to light or material differences, resulting in poor accuracy of the final corrosion degree evaluation; the general method for evaluating the corrosion degree of the appearance of ancient buildings has problems such as easy occurrence of feature extraction conflicts, insufficient detail mining, and insufficient ability to process shooting noise and compression artifacts, resulting in poor evaluation effect of the appearance corrosion degree. Summary of the Invention
[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a method and system for evaluating the corrosion degree of the appearance of ancient buildings based on artificial intelligence. Aiming at the problems of the general method for evaluating the corrosion degree of the appearance of ancient buildings, such as ignoring the influence of sunlight angle and shadow, misjudging the degree of material damage due to color cast in the evaluation result, and it is difficult for contrast adjustment to adapt to light or material differences, resulting in poor accuracy of the final corrosion degree evaluation, this solution estimates the transmittance through the atmospheric scattering model to restore the scene radiation, removes the overall gray caused by haze and dust, and improves the detail and color authenticity of the distant view; uses cyclic channel compensation to adaptively correct the color cast caused by sunlight, shadow and shooting angle under the goal of minimizing the sum of squared channel differences, ensuring that the original textures such as stone and brickwork are accurately restored; adopts local adaptive contrast enhancement to adaptively amplify the light and dark differences, thereby highlighting tiny cracks and peeling edges; uses three types of weights, namely crack saliency, texture frequency and illuminance balance, to weight and fuse the IMF components at each layer of the pyramid, which not only retains the optimal details but also avoids visual mutations between different scales; thereby improving the accuracy of corrosion degree evaluation; aiming at the problems of the general method for evaluating the corrosion degree of the appearance of ancient buildings, such as easy occurrence of feature extraction conflicts, insufficient detail mining, and insufficient ability to process shooting noise and compression artifacts, resulting in poor evaluation effect of the appearance corrosion degree, this solution designs multi-branch exclusive feature extraction, which focuses on color spot fading, micro-crack pitting and macroscopic peeling contour respectively, avoids redundant interference between different feature channels, and improves the richness and discriminability of the overall feature expression; embeds SE-style encoding attention in the three-layer convolution to realize dynamic weighting of the features of each channel under different corrosion stages and lighting conditions; designs a perturbation activation function to adaptively adjust the noise intensity based on the local variance, alleviates channel death and improves the fault tolerance ability to shooting noise and compression artifacts; thereby improving the evaluation effect of the appearance corrosion degree.
[0004] The technical solution adopted by the present invention is as follows: The method for evaluating the corrosion degree of the exterior of ancient buildings based on artificial intelligence provided by the present invention includes the following steps:
[0005] Step S1: Image acquisition;
[0006] Step S2: Image enhancement;
[0007] Step S3: Establish an evaluation model for the corrosion degree of the exterior of ancient buildings;
[0008] Step S4: Evaluate the corrosion degree of the exterior of ancient buildings.
[0009] Further, in step S1, the image acquisition is to acquire historical ancient building images and corrosion levels; the corrosion level is used as an image label.
[0010] Further, in step S2, the image enhancement specifically includes the following steps:
[0011] Step S21: Atmospheric scattering dehazing; For the original image, calculate the transmittance , expressed as: ; where x is the image pixel position; is the empirical weight; is the local window centered on x, and y is the pixel position index within the local window; is the global atmospheric light component; is the original image brightness; Restore the scene radiance, expressed as: ; where c is the RGB color channel index; is the lower limit of the transmittance; is the true color image after dehazing; I(·) is the pixel value of the original image; A is the color value of the background atmosphere; Obtain the dehazed image J;
[0012] Step S22: Circular channel compensation; Denote the RGB three-channel pixel values of the dehazed image J as , and , then ; ; ; where, and are respectively the minimum and maximum values of the red channel within the entire image range; and are respectively the maximum and minimum values of the green channel; , and are the compensated red, green, and blue channel values; Taking the minimization of the sum of the squares of the channel differences as the convergence target, expressed as: ; where Loss is the color loss; output the image after color compensation;
[0013] Step S23: Local adaptive contrast enhancement; for the processed image after color compensation, it includes: local average brightness , ; local brightness variance , ; contrast amplification factor , ; local brightness linear stretching, ; where H and W are the height and width of the image respectively; i and j are the image coordinate indices; B is the set of local block coordinates; is the brightness value of the pixel in the local block; is the enhanced local brightness; is the maximum coefficient; is the global brightness standard deviation; obtain the image after local contrast enhancement;
[0014] Step S24: Iterative decomposition; adopt the iterative decomposition method for the image after local contrast enhancement to obtain the intrinsic mode functions { }, and the convergence criterion is expressed as: ; where SL is the convergence criterion; D is the pixel area; and are the pixel values at the corresponding positions of the IMF components in the (t + 1)-th iteration and the t-th iteration respectively; after all converge, obtain the IMF components ; where, is the k-th IMF component; K is the total number of components;
[0015] Step S25: Multi-weight image pyramid fusion; fuse each IMF component according to three types of weights: crack significance, texture frequency, and illumination balance. For each IMF component, ; where, for the l-th layer of the pyramid, ; finally, reconstruct from bottom to top to obtain the enhanced historical ancient building image ; where, is the fusion result of the l-th layer of the image pyramid; is the regularization constant; is the weighting coefficient for each level; is the image result of the l-th layer of the pyramid; , and are the crack significance weight, texture frequency weight, and illumination balance weight under the k-th IMF component respectively; , and are the crack significance weight, texture frequency weight, and illumination balance weight under the m-th IMF component respectively.
[0016] Further, in step S3, the establishment of the ancient building appearance corrosion degree evaluation model is based on deep learning and enhanced historical ancient building images to establish an ancient building appearance corrosion degree evaluation model; specifically, it includes the following steps:
[0017] Step S31: Overall model design; the enhanced ancient building appearance image is input into the model; after being processed by the three-branch layer and the hybrid coding attention layer, it is processed by fully connected + softmax to obtain the prediction distribution, and finally the corrosion level predicted by the model is output; the cross-entropy loss function is used, and forward propagation is based on the gradient descent method;
[0018] Step S32: Three-branch layer design; the color branch, texture branch, and morphology branch are respectively constructed; the color branch captures the color distribution changes in the mottled and faded areas; the texture branch extracts the detailed textures of microcracks and pitting corrosion; the morphology branch captures the peeling edges and macroscopic contour changes; the color branch uses 3×64 2D convolutional kernels to extract the color spot and fading features; and 3×128 1D convolutional kernels to strengthen the color difference distribution; the texture branch uses 8 layers of densely connected 3×3 convolutions with a max-pooling layer inserted in the middle; the morphology branch has the same structure as the color branch, but the number of kernels is reduced by S; the three branches are spliced to obtain ;
[0019] Step S33: Hybrid coding layer design; perform three-layer convolutions on in sequence, perform SE processing on the output of each layer of convolution, and use the output of SE processing as the input of the lower layer of convolution; including: convolution processing; perturbation activation function processing; global average pooling; sigmoid processing; reweighting processing;
[0020] Step S34: Perturbation activation function design; introduce the dynamic noise intensity , and the perturbation activation function is expressed as: ; ; where u is the perturbation activation function variable; , and a group of noises are sampled during each forward propagation and injected into the activation; is the noise bias, which is used to enhance the tolerance of the input image to shooting noise and artifacts; is the initial noise intensity; is the attenuation coefficient; is the standard deviation of the pixel values of the input in the local window.
[0021] Further, in step S4, the evaluation of the ancient building appearance corrosion degree is based on the established ancient building appearance corrosion degree evaluation model, the ancient building images are collected in real time, and after image enhancement processing, they are input into the ancient building appearance corrosion degree evaluation model, and the corrosion level output by the model is used as the evaluation result of the appearance corrosion degree.
[0022] The ancient building appearance corrosion degree evaluation system based on artificial intelligence provided by the present invention includes an image acquisition module, an image enhancement module, an ancient building appearance corrosion degree evaluation model establishment module, and an ancient building appearance corrosion degree evaluation module;
[0023] The image acquisition module acquires historical ancient building appearance images and annotates the corrosion grades;
[0024] The image enhancement module realizes the enhancement of historical ancient building appearance images through atmospheric scattering dehazing, cyclic channel compensation, local adaptive contrast enhancement, multi-scale intrinsic mode function decomposition, and multi-weight pyramid fusion;
[0025] The ancient building appearance corrosion degree evaluation model establishment module takes the enhanced image as the input, extracts through color, texture, and morphology three branches and integrates a hybrid coding layer with SE attention, and establishes an ancient building appearance corrosion degree evaluation model based on a perturbation activation function;
[0026] The ancient building appearance corrosion degree evaluation module realizes the evaluation of the appearance corrosion degree of the ancient building appearance images collected in real time based on the ancient building appearance corrosion degree evaluation model.
[0027] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0028] (1) Aiming at the problems existing in the general ancient building appearance corrosion degree evaluation method, such as ignoring the influence of sunlight angle and shadow, the evaluation result misjudges the material damage degree due to color cast, and the contrast adjustment is difficult to adapt to the differences in light or material, resulting in poor accuracy of the final corrosion degree evaluation. This scheme estimates the transmittance through the atmospheric scattering model to restore the scene radiation, removes the overall gray caused by haze and dust, and improves the long-distance detail and color authenticity; uses cyclic channel compensation to adaptively correct the color cast caused by sunlight, shadow, and shooting angle under the goal of minimizing the sum of squared channel differences, ensuring the accurate restoration of the original texture such as stone and brickwork; adopts local adaptive contrast enhancement to adaptively amplify the light and dark differences, thereby highlighting tiny cracks and peeling edges; weights and fuses the IMF components with three types of weights of crack saliency, texture frequency, and illuminance balance at each layer of the pyramid, not only retaining the optimal details but also avoiding visual mutations between different scales; thereby improving the accuracy of corrosion degree evaluation.
[0029] (2) Aiming at the problems existing in the general ancient building appearance corrosion degree evaluation method, such as easy occurrence of feature extraction conflicts, insufficient detail mining, and insufficient ability to process shooting noise and compression artifacts, which lead to poor evaluation effect of the appearance corrosion degree. This solution designs multi-branch exclusive feature extraction, focusing on color spot fading, micro-crack pitting, and macroscopic peeling contour respectively, avoiding redundant interference between different feature channels, and improving the richness and discriminability of the overall feature expression; embeds SE-style encoding attention in the three-layer convolution to realize dynamic weighting of the features of each channel under different corrosion stages and lighting conditions; designs a perturbation activation function to adaptively adjust the noise intensity based on the local variance, alleviates channel death and improves the fault tolerance ability to shooting noise and compression artifacts; thereby improving the evaluation effect of the appearance corrosion degree. Description of the Drawings
[0030] Figure 1 It is a schematic flow chart of the method for evaluating the corrosion degree of the ancient building appearance based on artificial intelligence provided by the present invention;
[0031] Figure 2 It is a schematic diagram of the system for evaluating the corrosion degree of the ancient building appearance based on artificial intelligence provided by the present invention;
[0032] Figure 3 It is a schematic flow chart of step S2.
[0033] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention. Detailed Embodiments
[0034] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the scope of protection of the present invention.
[0035] In the description of the present invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the system or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation to the present invention.
[0036] Example 1, refer to Figure 1 , the method for evaluating the corrosion degree of the ancient building appearance based on artificial intelligence provided by the present invention, the method includes the following steps:
[0037] Step S1: Image acquisition; acquire the appearance image of historical ancient buildings and label the corrosion level;
[0038] Step S2: Image enhancement; enhance the appearance image of historical ancient buildings through atmospheric scattering dehazing, cyclic channel compensation, local adaptive contrast enhancement, multi-scale intrinsic mode decomposition, and multi-weight pyramid fusion;
[0039] Step S3: Establish an evaluation model for the corrosion degree of the appearance of ancient buildings; use the enhanced image as the input, pass through a hybrid coding layer that extracts and integrates SE attention through three branches of color, texture, and morphology, and establish an evaluation model for the corrosion degree of the appearance of ancient buildings based on a perturbation activation function;
[0040] Step S4: Evaluate the corrosion degree of the appearance of ancient buildings; based on the evaluation model for the corrosion degree of the appearance of ancient buildings, evaluate the appearance corrosion degree of the real-time acquired appearance image of ancient buildings.
[0041] Example 2, refer to Figure 1 , based on the above example, in step S1, the corrosion level is used as the image label; the image label includes no corrosion, mild corrosion, moderate corrosion, and severe corrosion.
[0042] Example 3, refer to Figure 1 and Figure 3 , based on the above example, in step S2, the image enhancement specifically includes the following steps:
[0043] Step S21: Atmospheric scattering dehazing; the exterior of ancient buildings is often affected by dust and haze, resulting in the overall image being grayish. Restore the distant view details and true colors through atmospheric scattering dehazing; for the original image, calculate the transmittance , which represents the remaining proportion of the light from the scene to the camera after passing through the atmosphere, expressed as: ; where x is the image pixel position; is the empirical weight; is the local window centered on x, and y is the pixel position index within the local window; is the global atmospheric light component; is the original image brightness; restore the scene radiance, expressed as: ; where c is the RGB color channel index; is the transmittance lower limit; is the true color image after dehazing; I(·) is the pixel value of the original image; A is the color value of the background atmosphere; obtain the dehazed image J;
[0044] Step S22: Loop channel compensation; used to remove color cast caused by sunlight, shadow, and shooting angle, ensure the accurate restoration of the natural color of stone and brickwork, and perform adaptive correction on large-area wall surfaces and eaves shadows; denote the RGB three-channel pixel values of the dehazed image J as , and , then ; ; ; where, and are respectively the minimum and maximum values of the red channel within the entire image; and are respectively the maximum and minimum values of the green channel; , and are the values of the compensated red, green, and blue channels; with minimizing the sum of squared channel differences as the convergence objective, expressed as: ; where, Loss is the color loss; output the image after color compensation;
[0045] Step S23: Local adaptive contrast enhancement; for the image after color compensation, amplify the light and dark differences within the local block to highlight the peeling edges and cracks; including: local average brightness , ; local brightness variance , ; contrast amplification factor , ; local brightness linear stretching, ; where, H and W are respectively the height and width of the image; i and j are the image coordinate indices; B is the set of local block coordinates; is the brightness value of the pixel in the local block; is the enhanced local brightness; is the maximum coefficient; is the global brightness standard deviation; obtain the image after local contrast enhancement;
[0046] Step S24: Iterative decomposition; in the evaluation of the appearance of ancient buildings, the crack width is tiny and the mottled scale is diverse, requiring multi-scale simultaneous processing; use the iterative decomposition method for the image after local contrast enhancement to obtain the intrinsic mode functions { }, and the convergence criterion is expressed as: ; the threshold is selected as 0.2; where, SL is the convergence criterion of the image; D is the pixel area; and are respectively the pixel values at the corresponding positions of the IMF component in the (t + 1)-th iteration and the t-th iteration; after all converge, obtain the IMF component ; where, is the k-th IMF component; K is the total number of components;
[0047] Step S25: Multi-weight image pyramid fusion; fuse each IMF component according to three types of weights: crack significance, texture frequency, and illumination balance, retain the optimal details at each scale and smoothly transition. For each IMF component, ; where, for the l-th layer of the pyramid, ; finally, reconstruct from bottom to top to obtain the enhanced historical ancient building image ; where, is the fusion result of the l-th layer of the image pyramid; is the regularization constant; is the weighting coefficient for each level; is the image result of the l-th layer of the pyramid; 、 and are the crack significance weight, texture frequency weight, and illumination balance weight under the k-th IMF component respectively; 、 and are the crack significance weight, texture frequency weight, and illumination balance weight under the m-th IMF component respectively; the crack significance weight is obtained by extracting the gradient magnitude based on the Sobel operator, calculating the gradient and summing over the whole image, and finally normalizing; the texture frequency weight is obtained by using Laplacian high-pass filtering, then averaging the absolute values, and finally normalizing; the illumination balance weight is obtained by taking the reciprocal of the image variance and normalizing.
[0048] By performing the above operations, for the general ancient building appearance corrosion degree evaluation method, there are problems such as ignoring the influence of sunlight angle and shadow, misjudging the material damage degree due to color cast in the evaluation result, and it is difficult for contrast adjustment to adapt to light or material differences, which leads to poor accuracy in the final corrosion degree evaluation. In this solution, the transmittance is estimated by the atmospheric scattering model to restore the scene radiation, remove the overall graying caused by haze and dust, and improve the distant view details and color authenticity; use cyclic channel compensation to adaptively correct the color cast caused by sunlight, shadow, and shooting angle under the goal of minimizing the sum of squared channel differences, ensuring that the original textures such as stone and brickwork are accurately restored; adopt local adaptive contrast enhancement to adaptively amplify the light and dark differences, thereby highlighting the tiny cracks and peeling edges; use three types of weights of crack significance, texture frequency, and illumination balance to weight and fuse the IMF components at each layer of the pyramid, which not only retains the optimal details but also avoids visual mutations between different scales; thereby improving the accuracy of corrosion degree evaluation.
[0049] Example 4, refer to Figure 1, based on the above embodiment, in step S3, the establishment of the ancient building appearance corrosion degree evaluation model is based on deep learning and enhanced historical ancient building images to establish an ancient building appearance corrosion degree evaluation model; specifically including the following steps:
[0050] Step S31: Overall model design; the enhanced ancient building appearance image is input into the model; after being processed by the three-branch layer and the hybrid coding attention layer, it undergoes a fully connected + softmax process to obtain the prediction distribution, and finally outputs the corrosion level predicted by the model; the cross-entropy loss function is used, and forward propagation is based on the gradient descent method;
[0051] Step S32: Three-branch layer design; respectively construct a color branch, a texture branch, and a morphology branch; the color branch captures the color distribution changes in the mottled and faded areas, efficiently separates the color information, and avoids repeated learning in the texture branch; the texture branch extracts the detailed textures of microcracks and pitting corrosion, and enhances the detection of crack connectivity; the morphology branch captures the peeling edges and macroscopic contour changes, highlighting the structural fracture and peeling areas; the color branch uses 3×64 2D convolutional kernels to extract the features of color patches and fading; and 3×128 1D convolutional kernels to strengthen the color difference distribution; the texture branch uses 8 layers of densely connected 3×3 convolutions, with a maximum pooling layer inserted in the middle; the morphology branch has the same structure as the color branch, but the number of kernels is reduced by S; the three branches are spliced, expressed as: ; where, is the feature map tensor obtained by splicing; is the splicing operation; , and are the feature tensors extracted by the color branch, the texture branch, and the morphology branch respectively; X is the enhanced ancient building appearance image;
[0052] Step S33: Hybrid coding layer design; perform three-layer convolutions on in sequence, perform SE processing on the output of each layer of convolution, and use the output of the SE processing as the input of the next layer of convolution to dynamically adjust the weights of each channel in different lighting and corrosion stages; including: convolution processing, expressed as: ; where, is the l-th layer of convolution; is the result of the l-th layer of convolution; is the input of the l-th layer of convolution; perturbation activation function processing, expressed as: ; where, is the perturbation activation function; is the output of the perturbation activation function; perform global average pooling on to obtain ; sigmoid processing, expressed as: ; where, is the sigmoid function; and are learnable weight matrices; the reweighting process is expressed as: wherein, is the output of the reweighting process of the l-th layer and serves as the convolutional input of the (l + 1)-th layer;
[0053] Step S34: Design of perturbed activation function; Historical ancient building images often contain shooting noise and compression artifacts. By designing the activation function, channel death is reduced and the robustness to shooting noise is enhanced; introducing dynamic noise intensity , adaptively adjusted based on the local variance of the input features: increasing the noise in flat areas to improve the robustness to artifact removal, and weakening the noise in high-texture areas to protect details; the perturbed activation function is expressed as: ; ; where u is the variable of the perturbed activation function; , a group of noises is sampled during each forward propagation and injected into the activation; is the noise bias, used to enhance the tolerance of the input image to shooting noise and artifacts; is the initial noise intensity; is the attenuation coefficient; is the standard deviation of the pixel values of the input in the local window.
[0054] By performing the above operations, for the general ancient building appearance corrosion degree evaluation method, there are problems such as easy occurrence of feature extraction conflicts, insufficient detail mining, and insufficient ability to process shooting noise and compression artifacts, which in turn lead to poor evaluation effects of the appearance corrosion degree. In this solution, by designing multi-branch exclusive feature extraction, focusing on color spot fading, micro crack pitting, and macroscopic peeling contours respectively, redundant interference between different feature channels is avoided, and the richness and discriminability of the overall feature expression are improved; embedding SE-style encoded attention in the three-layer convolution to achieve dynamic weighting of the features of each channel under different corrosion stages and lighting conditions; by designing a perturbed activation function, adaptively adjusting the noise intensity based on the local variance, alleviating channel death and enhancing the tolerance to shooting noise and compression artifacts; thereby improving the evaluation effect of the appearance corrosion degree.
[0055] Example Five, refer to Figure 1 , based on the above example, in step S4, the evaluation of the ancient building appearance corrosion degree is based on the established ancient building appearance corrosion degree evaluation model. Ancient building images are collected in real time, and after image enhancement processing, they are input into the ancient building appearance corrosion degree evaluation model, and the corrosion level output by the model is used as the evaluation result of the appearance corrosion degree.
[0056] Example Eight, refer to Figure 2, based on the above embodiment, the artificial intelligence-based ancient building appearance corrosion degree evaluation system provided by the present invention includes an image acquisition module, an image enhancement module, an ancient building appearance corrosion degree evaluation model establishment module, and an ancient building appearance corrosion degree evaluation module;
[0057] The image acquisition module acquires historical ancient building appearance images and annotates the corrosion levels;
[0058] The image enhancement module realizes the enhancement of historical ancient building appearance images through atmospheric scattering dehazing, cyclic channel compensation, local adaptive contrast enhancement, multi-scale intrinsic mode decomposition, and multi-weight pyramid fusion;
[0059] The ancient building appearance corrosion degree evaluation model establishment module takes the enhanced image as input, extracts through color, texture, and morphology three branches and integrates a hybrid coding layer with SE attention, and establishes an ancient building appearance corrosion degree evaluation model based on a perturbation activation function;
[0060] The ancient building appearance corrosion degree evaluation module realizes the evaluation of the appearance corrosion degree of the ancient building appearance images collected in real time based on the ancient building appearance corrosion degree evaluation model.
[0061] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprises", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not expressly listed, or elements inherent to such process, method, article or device.
[0062] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principle and spirit of the present invention.
[0063] The above describes the present invention and its implementation manners. This description is not restrictive. What is shown in the drawings is only one of the implementation manners of the present invention, and the actual structure is not limited thereto. Generally speaking, if those of ordinary skill in the art are inspired by it and design similar structural manners and embodiments without creative efforts without departing from the purpose of the present invention, they should all fall within the protection scope of the present invention.
Claims
1. An artificial intelligence-based method for evaluating the degree of corrosion of ancient building exteriors, characterized by: The method comprises the following steps: Step S1: Image acquisition: Acquire the appearance image of the historical ancient building and mark the corrosion level; Step S2: Image enhancement: The appearance image of the historical building is enhanced by atmospheric scattering defogging, cyclic channel compensation, local adaptive contrast enhancement, multi-scale intrinsic mode decomposition and multi-weighted pyramid fusion; Step S3: Establishing an assessment model for the degree of corrosion of the appearance of ancient buildings; taking the enhanced image as input, extracting the color, texture, and morphology branches and integrating them into the hybrid coding layer of SE attention, and establishing an assessment model for the degree of corrosion of the appearance of ancient buildings based on the perturbation activation function; Step S4: evaluating the degree of corrosion of the ancient building exterior; based on the ancient building exterior corrosion degree evaluation model, evaluating the degree of corrosion of the ancient building exterior image collected in real time.
2. The method for evaluating the degree of corrosion of the appearance of ancient buildings based on artificial intelligence according to claim 1 is characterized by: Furthermore, in step S2, the image enhancement specifically includes the following steps: Step S21: atmospheric scattering defogging; for the original image, calculate the transmittance , expressed as: ; where x is the image pixel position; is the experience weight; is the local window centered at x, and y is the pixel position index within the local window; is the global atmospheric illumination component; is the original image brightness; the restored scene radiance is expressed as: ; Where c is the RGB color channel index; is the lower limit of transmittance; is the true color image after defogging; I(·) is the pixel value of the original image; A is the color value of the background atmosphere; the defogging image J is obtained; Step S22: Circular channel compensation; the pixel values of the RGB channels of the dehazed image J are recorded as , and ,but ; ; ;in, and They are the minimum and maximum values of the red channel in the entire image; and are the maximum and minimum values of the green channel respectively; , and are the values of the red, green, and blue channels after compensation; the convergence goal is to minimize the sum of squares of channel differences, expressed as: ; Where Loss is the color loss; Output the color compensated image; Step S23: Local adaptive contrast enhancement; for image processing after color compensation, including: local average brightness , ; Local brightness variance , ; Contrast magnification factor , ; Local brightness linear stretching, ; Where H and W are the height and width of the image respectively; i and j are image coordinate indices; B is the local block coordinate set; is the brightness value of the pixel in the local block; is the enhanced local brightness; is the maximum coefficient; is the global brightness standard deviation; the image with local contrast enhancement is obtained; Step S24: iterative decomposition; Step S25: Multi-weight image pyramid fusion.
3. The method for evaluating the degree of corrosion of the appearance of ancient buildings based on artificial intelligence according to claim 2 is characterized in that: In step S2, the iterative decomposition is to obtain the intrinsic mode function { }, the convergence criterion is expressed as: ; Where SL is the convergence criterion; D is the pixel area; and They are the pixel values of the IMF components at the corresponding positions at the t+1th iteration and the tth iteration respectively; after all convergence, the IMF components are obtained ;in, is the kth IMF component; K is the total number of components.
4. The method for evaluating the degree of corrosion of ancient building appearance based on artificial intelligence according to claim 3 is characterized in that: In step S2, the multi-weighted image pyramid fusion is to fuse the IMF components according to the three weights of crack significance, texture frequency and illumination balance. For each IMF component, ; Among them, for the first level of the pyramid, ; Finally, the enhanced image of the historical ancient building is reconstructed from the bottom up ;in, is the fusion result of the lth layer of the image pyramid; is the regularization constant; is the weighting coefficient of each level; is the image result of the pyramid level l; , and They are the crack significance weight, texture frequency weight and illumination balance weight under the kth IMF component; , and are the crack significance weight, texture frequency weight and illumination balance weight under the mth IMF component respectively.
5. The method for evaluating the degree of corrosion of the appearance of ancient buildings based on artificial intelligence according to claim 4 is characterized in that: In step S3, the establishment of an ancient building appearance corrosion degree assessment model is based on the historical ancient building image completed by deep learning and enhancement, and the establishment of an ancient building appearance corrosion degree assessment model specifically includes the following steps: Step S31: overall model design; the model inputs the enhanced ancient building appearance image; after being processed by the three-branch layer and the hybrid coding attention layer, the predicted distribution is obtained through full connection + softmax processing, and finally the corrosion level predicted by the model is output; the cross entropy loss function is used, and forward propagation is performed based on the gradient descent method; Step S32: Three-branch layer design; construct color branch, texture branch and morphology branch respectively; the color branch captures the color distribution changes in mottled and faded areas; the texture branch extracts the detailed texture of microcracks and pitting; the morphology branch captures the peeling edge and macro contour changes; the color branch uses 3×64 2D convolution kernels to extract color spots and fading features; and 3×128 1D convolution kernels to enhance the color difference distribution; the texture branch uses 8 layers of densely connected 3×3 convolutions, and inserts a maximum pooling layer in the middle; the morphology branch has the same structure as the color branch, but the number of kernels is reduced by S; the three branches are spliced to obtain ; Step S33: hybrid coding layer design; Perform three layers of convolution in sequence, perform SE processing on the output of each layer of convolution, and use the SE processing output as the input of the next layer of convolution; including: convolution processing; perturbation activation function processing; global average pooling; sigmoid processing; reweighting processing; Step S34: perturbation activation function design.
6. The method for evaluating the degree of corrosion of ancient building appearance based on artificial intelligence according to claim 5 is characterized in that: In step S3, the perturbation activation function is designed to introduce dynamic noise intensity , the perturbation activation function is expressed as: ; ; Where u is the perturbation activation function variable; , a set of noise is sampled and injected into the activation each time forward propagation; is the noise bias, which is used to enhance the input image’s tolerance to shooting noise and artifacts; is the initial noise intensity; is the attenuation coefficient; is the standard deviation of the input pixel values in the local window.
7. The method for evaluating the degree of corrosion of ancient building appearance based on artificial intelligence according to claim 6 is characterized in that: In step S4, the ancient building appearance corrosion degree assessment is based on the established ancient building appearance corrosion degree assessment model, and the ancient building image is collected in real time. After image enhancement processing, it is input into the ancient building appearance corrosion degree assessment model, and the corrosion level output by the model is used as the appearance corrosion degree assessment result.
8. The method for evaluating the degree of corrosion of ancient building appearance based on artificial intelligence according to claim 7 is characterized in that: In step S1 , the corrosion level is used as an image label; the image label includes no corrosion, slight corrosion, moderate corrosion and severe corrosion.
9. An artificial intelligence-based ancient building exterior corrosion degree assessment system, used to implement an artificial intelligence-based ancient building exterior corrosion degree assessment method as described in any one of claims 1 to 8, characterized in that: It includes an image acquisition module, an image enhancement module, an ancient building exterior corrosion degree assessment model establishment module and an ancient building exterior corrosion degree assessment module; The image acquisition module acquires the appearance image of the historical ancient building and marks the corrosion level; The image enhancement module enhances the appearance image of the historical ancient building through atmospheric scattering defogging, cyclic channel compensation, local adaptive contrast enhancement, multi-scale intrinsic mode decomposition and multi-weighted pyramid fusion; The module for establishing a model for assessing the degree of corrosion of the appearance of ancient buildings takes the enhanced image as input, extracts it through three branches of color, texture, and morphology, and integrates it into the mixed coding layer of SE attention, and establishes a model for assessing the degree of corrosion of the appearance of ancient buildings based on a perturbation activation function; The ancient building appearance corrosion degree assessment module is based on the ancient building appearance corrosion degree assessment model, and implements appearance corrosion degree assessment on the ancient building appearance images collected in real time.
Citation Information
Patent Citations
Method for evaluating building damage after natural disaster based on neural network
CN114091897A
Regional building damage grade evaluation method based on image multi-parameter extraction
CN115512247A
Method, device and equipment for identifying corrosion degree of power transmission line tower and medium
CN117058543A
Fruit quality evaluation system based on deep learning
CN117252459A
Logo detection method and device based on YOLOv7 model
CN117830732A