Ancient building repair effect evaluation method based on image enhancement
By adopting an image-enhancing method in the evaluation of the repair effect of ancient buildings, combining the block average grayscale positioning and feature map attention fusion, the problem of difficulty in capturing micro-local defects and taking into account noise suppression and micro-crack gradient response is solved, and a more efficient repair effect evaluation is achieved.
Patent Information
- Application Number
- CN202510725414.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-06-03
AI Technical Summary
The existing methods for the repair effect evaluation of ancient buildings are difficult to capture small local defects, resulting in a lack of targeted evaluation results, and it is difficult to take into account noise suppression and micro-crack gradient response, resulting in poor accuracy in the evaluation of repair effect.
Using an image enhancement method, the evaluation area is automatically positioned through block average grayscale, and details are reinforced under the premise of retaining structures, color square variance, gradient difference and spatial distance are fused to accurately find reference blocks, and feature map attention fusion is performed in the intermediate layer, channel attention mechanism and fractional gradient operator are introduced, adaptive noise suppression and significant texture retention.
It improves the pertinence and accuracy of the repair evaluation of ancient buildings, can effectively highlight local defects and take into account noise suppression and micro-crack gradient response, and improves the overall effect of the repair effect evaluation.
Smart Images

Figure CN120235778A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and specifically refers to a method for evaluating the renovation effect of ancient buildings based on image enhancement. Background Art
[0002] The method for evaluating the renovation effect of ancient buildings refers to collecting images and related data of the renovated building, and comprehensively evaluating the quality of the renovation results by using image processing and enhancement, and calculating quantitative indicators. However, the general method for evaluating the renovation effect of ancient buildings focuses on global comparison or color difference analysis, and it is difficult to capture tiny local defects, resulting in a lack of pertinence in the evaluation results, and thus a poor renovation evaluation effect; the general method for evaluating the renovation effect of ancient buildings has difficulty in balancing noise suppression and micro-crack gradient response, and is not sensitive enough to tiny cracks, erosion textures, and light changes, resulting in a poor accuracy of the renovation effect evaluation. 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 for evaluating the renovation effect of ancient buildings based on image enhancement. Aiming at the problem that the general method for evaluating the renovation effect of ancient buildings focuses on global comparison or color difference analysis, and it is difficult to capture tiny local defects, resulting in a lack of pertinence in the evaluation results, and thus a poor renovation evaluation effect, this solution automatically and accurately locates the evaluation area based on the block average gray level, strengthens the details on the premise of retaining the structure, accurately finds the reference block by priority sorting and defining the matching block metric, fuses the color square difference, gradient difference and spatial distance, and references its high-quality texture to the area to be enhanced, strengthening the details without changing the original renovation structure; while ensuring the overall contour is consistent, maximizing the highlighting of local defects; thereby improving the final renovation evaluation effect; aiming at the problem that the general method for evaluating the renovation effect of ancient buildings has difficulty in balancing noise suppression and micro-crack gradient response, and is not sensitive enough to tiny cracks, erosion textures, and light changes, resulting in a poor accuracy of the renovation effect evaluation, this solution performs feature map attention fusion in the middle layer, and introduces a channel attention mechanism to automatically highlight the channels sensitive to cracks and erosion; by defining a renovation activation function and introducing a channel adaptive threshold, adaptive noise suppression and significant texture retention are performed, and a fractional gradient operator is introduced to balance local smoothness and long-range dependence, amplifying the gradient response of tiny cracks and texture edges; thereby improving the accuracy of the renovation effect evaluation.
[0004] The technical solution adopted by the present invention is as follows: The method for evaluating the renovation effect of ancient buildings based on image enhancement 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 renovation effect of ancient buildings;
[0008] Step S4: Evaluate the renovation effect of ancient buildings.
[0009] Furthermore, in step S1, the image acquisition is to obtain the renovation images of historical ancient buildings; and perform image annotation on the renovation images of historical ancient buildings, annotate the renovation effect evaluation level; and use the renovation effect evaluation level as the image label.
[0010] Furthermore, in step S2, the image enhancement specifically includes the following steps:
[0011] Step S21: Automatically segment the stone weathering, dew, high-reflection area and stain area in the renovation image of historical ancient buildings, and locate the renovation parts; the formula used is: ; ; ; where N is the total number of pixels in the segmentation block; n is the pixel index of the segmentation block; is the pixel gray value; 、 and are the red, green, and blue channel intensities of the pixel respectively; is the binary segmentation result; p is the pixel position; T is the gray threshold; is the average gray value of the segmentation block where the pixel position p is located;
[0012] Step S22: Evaluate the priority of surface defects of ancient buildings; introduce a brightness term to evaluate the enhancement priority of each segmentation block; the formula used is: ; where, is the enhancement priority score of the pixel position p; is the weight coefficient; is the defect confidence; is the local depth, obtained by Canny edge detection, and high values correspond to obvious gaps;
[0013] Step S23: Define a matching block metric function, find the reference block most similar to the area to be enhanced, regard the segmentation block as a sub-region, introduce local coordinate indices (i, j) to represent the pixel in the i-th row and j-th column within this sub-region; The center coordinate of the sub-region is ; similarly, the center coordinate of the segmentation block is ; the formula used for the matching block metric function is: ; ; ; ; where, is the matching block metric function; 、 and are auxiliary functions; and are equally sized divided blocks centered on pixel positions p and q; 、 and are the divided blocks at the channel intensity of the pixel at coordinate (i, j); 、 and are the divided blocks at the channel intensity of the pixel at coordinate (i, j); and are respectively and at the gradient magnitude of the nth pixel; Select the divided block to be enhanced in the historical ancient building renovation image through enhanced priority scoring, and select the most similar reference block of the divided block to be enhanced based on the matching block metric function; Copy the pixel values at the corresponding positions in the most similar reference block to the divided block to be enhanced to complete the local enhancement of the divided block to be enhanced; Set the matching threshold, and when there is no matching block metric function value of the divided block to be enhanced higher than the matching threshold, the local enhancement is completed;
[0014] Step S24: Adaptive SSIM weighted fusion; Perform base-detail decomposition on the original image, enhance them respectively and then fuse; Use guided filtering to perform edge-preserving smoothing on the original image to obtain the base layer, and then subtract the base layer from the original image to obtain the detail layer; Apply adaptive histogram equalization processing to the base layer image for enhancement, and use Unsharp Masking processing for the detail layer for enhancement; Complete global enhancement; According to the enhanced base layer and the detail layer and the structural similarity of the original image I, dynamically allocate fusion weights to generate the final image that retains both the overall contour and highlights local defects; The formula used is: ; ; where, is the finally enhanced image; is the fusion weight; is the structural similarity index; Obtain the ancient building renovation effect evaluation image set.
[0015] Furthermore, in step S3, the established ancient building renovation effect evaluation model divides the ancient building renovation effect evaluation image set into a training set and a test set, and trains based on a deep learning model; Specifically, it includes the following steps:
[0016] Step S31: Network architecture design; The backbone uses a lightweight convolutional network, and a custom activation function is used to process after each convolutional layer; Feature maps are attentively fused in the intermediate layer, and a channel attention mechanism is introduced; The output layer uses softmax to output the evaluation level of the renovation effect; The model uses the cross-entropy loss function; Parameters are updated based on the gradient descent algorithm and the backpropagation algorithm;
[0017] Step S32: Define the renovation activation function; The renovation activation function is expressed as: ; Design the channel adaptive threshold, expressed as: ; where x is the input of the activation function; is the adaptive threshold on the u-th channel; and are the global mean and standard deviation on the u-th channel respectively; is a trainable parameter learned through backpropagation; is the normalization index; is the attention weight of the u-th channel output by the channel attention mechanism in the intermediate layer; When , the output is constantly 0; When , perform denoising threshold shift on the input;
[0018] Step S33: Define the derivative of the activation function; For any scalar function f(t), when , define the optimized fractional derivative operator, expressed as: ; where t is the auxiliary variable; is the smoothing term; r is the integer part of the order; is the fractional parameter; is the r-th derivative of the scalar function; is the fractional derivative operator; For the positive interval , let , examine ; Take the fractional order : If , then the order r = 0; If , then r = 1; When , ; When , , at this time the result is a constant independent of t, so select , uniformly expressed as the fractional gradient, expressed as: ; where is the derivative of the renovation activation function, in the form of the fractional gradient;
[0019] Step S34: Model determination; set an evaluation threshold. When the evaluation accuracy rate of the ancient building renovation effect evaluation model for the test set after training is higher than the evaluation threshold, the establishment of the ancient building renovation effect evaluation model is completed; otherwise, model tuning is performed based on the particle swarm search algorithm.
[0020] Further, in step S4, the evaluation of the ancient building renovation effect is based on the established ancient building renovation effect evaluation model. The images of the ancient building renovation are collected in real time, enhanced, and then input into the ancient building renovation effect evaluation model. The renovation effect evaluation level output by the model is used as the renovation effect evaluation result.
[0021] The beneficial effects achieved by the present invention using the above solution are as follows:
[0022] (1) Aiming at the problem that the general ancient building renovation effect evaluation method focuses on global comparison or color difference analysis, making it difficult to capture minor local defects, resulting in a lack of pertinence in the evaluation results and thus poor renovation evaluation effects. This solution automatically and accurately locates the evaluation area based on the block average gray value, performs detail reinforcement while retaining the structure, precisely finds the reference block by priority sorting and defining the matching block metric, fuses the color square difference, gradient difference, and spatial distance, and references its high-quality texture to the area to be enhanced, strengthening the details without changing the original renovation structure; maximizing the highlighting of local defects while ensuring the consistency of the overall contour; thereby improving the final renovation evaluation effect.
[0023] (2) Aiming at the problem that the general ancient building renovation effect evaluation method is difficult to balance noise suppression and micro-crack gradient response, being less sensitive to micro-cracks, erosion textures, and light changes, resulting in poor accuracy of the renovation effect evaluation. This solution performs feature map attention fusion in the middle layer and introduces a channel attention mechanism to automatically highlight the channels sensitive to cracks and erosion; defines a renovation activation function, introduces a channel adaptive threshold for adaptive noise suppression and significant texture retention, and introduces a fractional gradient operator to balance local smoothness and long-range dependence, amplifying the gradient response of micro-cracks and texture edges; thereby improving the accuracy of the renovation effect evaluation. Description of the Drawings
[0024] Figure 1 It is a schematic flowchart of the method for evaluating the ancient building renovation effect based on image enhancement provided by the present invention;
[0025] Figure 2 It is a schematic flowchart of step S3.
[0026] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention, and do not constitute a limitation to the present invention. Detailed Embodiments
[0027] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying 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. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0028] 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. indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying 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 should not be construed as a limitation of the present invention.
[0029] Embodiment 1, refer to Figure 1 , the method for evaluating the restoration effect of ancient buildings based on image enhancement provided by the present invention includes the following steps:
[0030] Step S1: Image acquisition; acquire the restoration images of historical ancient buildings;
[0031] Step S2: Image enhancement; perform image enhancement on the restoration images of historical ancient buildings on the premise of retaining the overall real restoration structure;
[0032] Step S3: Establish an evaluation model for the restoration effect of ancient buildings; based on the enhanced restoration images of historical ancient buildings, perform model training through a lightweight convolutional network combined with a custom activation function and an attention mechanism;
[0033] Step S4: Evaluate the restoration effect of ancient buildings; evaluate the restoration effect of the ancient building restoration images based on the evaluation model for the restoration effect of ancient buildings.
[0034] Embodiment 2, refer to Figure 1 , based on the above embodiment, in step S1, perform image annotation on the restoration images of historical ancient buildings, and annotate the evaluation level of the restoration effect; use the evaluation level of the restoration effect as the image label.
[0035] Embodiment 3, refer to Figure 1 , based on the above embodiment, in step S2, the image enhancement is to maximize the amplification of the key details required for evaluation on the basis of retaining the overall structure after real restoration; specifically includes the following steps:
[0036] Step S21: Automatically segment the stone weathering, dew, high-reflection area and stain area in the restoration images of historical ancient buildings, and locate the restoration parts; the formula used is: ; ; ; where N is the total number of pixels in the segmentation block; n is the pixel index of the segmentation block; is the pixel grayscale value; 、 and are the red, green, and blue channel intensities of the pixel, respectively; is the binary segmentation result; p is the pixel position; T is the grayscale threshold; is the average grayscale of the segmentation block where pixel position p is located;
[0037] Step S22: Evaluation of the priority of ancient building surface defects; Introduce a brightness term, combine texture confidence and edge depth, and evaluate the enhancement priority of each segmentation block; The formula used is: ; where is the enhancement priority score of pixel position p; is the weight coefficient; is the defect confidence given by the texture classifier; is the local depth, obtained by Canny edge detection, and high values correspond to obvious gaps;
[0038] Step S23: Define a matching block metric function to find the reference block most similar to the area to be enhanced, which is used for detail reinforcement without changing the original renovation structure, only for improving visual quality; Consider the segmentation block as a sub-region, and introduce local coordinate indices (i, j) to represent the pixel in the i-th row and j-th column within this sub-region; The center coordinates of the sub-region are ; Similarly, the center coordinates of the segmentation block are ; The formula used for the matching block metric function is: ; ; ; ; where is the matching block metric function; 、 and are auxiliary functions; and are segmentation blocks of the same size centered at pixel positions p and q; 、 and are the channel intensities of the pixels at coordinate (i, j) in the segmentation block ; 、 and are the channel intensities of the pixels at coordinate (i, j) in the segmentation block ; and are respectively and The gradient magnitude of the nth pixel is calculated by Sobel; the segmentation block to be enhanced in the historical ancient building restoration image is selected by enhancing the priority score, and the most similar reference block of the segmentation block to be enhanced is selected based on the matching block metric function; the pixel values at the corresponding positions in the most similar reference block are copied into the segmentation block to be enhanced to complete the local enhancement of the segmentation block to be enhanced; a matching threshold is set, and when there is no matching block metric function value of the segmentation block to be enhanced higher than the matching threshold, the local enhancement is completed;
[0039] Step S24: Adaptive SSIM weighted fusion; perform base-detail decomposition on the original image, enhance them separately and then fuse them to balance the visibility of the overall contour and local defects; use guided filtering to perform edge-preserving smoothing on the original image to obtain the base layer, and then subtract the base layer from the original image to obtain the detail layer; apply adaptive histogram equalization processing to enhance the base layer image, and use Unsharp Masking processing to enhance the detail layer; complete the global enhancement; according to the enhanced base layer and the detail layer and the structural similarity of the original image I, dynamically allocate the fusion weight to generate the final image that not only retains the overall contour but also highlights the local defects; the formula used is: ; ; where is the finally enhanced image; is the fusion weight; is the structural similarity index; obtain the ancient building restoration effect evaluation image set.
[0040] By performing the above operations, aiming at the problem that the general ancient building restoration effect evaluation method focuses on global comparison or color difference analysis, it is difficult to capture tiny local defects, resulting in the lack of pertinence of the evaluation results and thus poor restoration evaluation effect. This solution automatically and accurately locates the evaluation area based on the block average gray level, performs detail reinforcement on the premise of retaining the structure, precisely finds the reference block by priority sorting and defining the matching block metric, fuses the color square difference, gradient difference and spatial distance, references its high-quality texture to the area to be enhanced, strengthens the details without changing the original restoration structure; maximizes the highlighting of local defects while ensuring the consistency of the overall contour; thereby improving the final restoration evaluation effect.
[0041] Example 4, refer to Figure 1 and Figure 2 , this example is based on the above example. In step S3, an ancient building restoration effect evaluation model is established to divide the ancient building restoration effect evaluation image set into a training set and a test set, and training is performed based on a deep learning model; specifically including the following steps:
[0042] Step S31: Network architecture design; the backbone uses a lightweight convolutional network, and a custom activation function is used for processing after each convolutional layer; feature map attention fusion is performed in the intermediate layer, and a channel attention mechanism is introduced; the output layer uses softmax to output the repair effect evaluation level; the model uses a cross-entropy loss function; parameters are updated based on the gradient descent algorithm and the backpropagation algorithm;
[0043] Step S32: Define the repair activation function; the repair activation function is expressed as: ; design the channel adaptive threshold, expressed as: ; where x is the input of the activation function; is the adaptive threshold on the u-th channel; and are the global mean and standard deviation on the u-th channel respectively; is a trainable parameter learned through backpropagation, which automatically adjusts the noise suppression intensity; is the normalization index; is the attention weight of the u-th channel output by the channel attention mechanism in the intermediate layer, which is used to emphasize the channels that are particularly sensitive to crack and erosion details; when , the output is constantly 0, filtering out small noises and irrelevant details; when , it is equivalent to performing a denoising threshold shift on the input, retaining significant textures; combined with it automatically adapts to the lighting and material differences in different parts, highlighting the real damage areas;
[0044] Step S33: Define the derivative of the activation function; for any scalar function f(t), when , define the optimized fractional derivative operator, expressed as: ; where t is the auxiliary variable; is the smoothing term; r is the integer part of the order; is the fractional order parameter; is the r-th derivative of the scalar function; is the fractional derivative operator; the optimized fractional operator can capture the long-range dependence features of the crack network and erosion texture at multiple scales while taking into account local smoothing; for the positive interval , let , examine ; take the fractional order : if , then the order r = 0; if , then r = 1; when , , amplify the gradient response of small activations and tiny cracks; when , , at this time, the result is a constant independent of t, lacking flexibility when describing the variation of features with position. Therefore, is selected. , which is uniformly represented as a fractional gradient and expressed as: ; where is the derivative of the repair activation function, in the form of a fractional gradient; the fractional gradient is adaptively smoothed under different α values to avoid the dead zone phenomenon; it is more sensitive to the gradients of crack vertices and texture edges, which helps with detail restoration and quantitative evaluation.
[0045] Step S34: Model determination; set an evaluation threshold. When the evaluation accuracy rate of the trained ancient building repair effect evaluation model for the test set is higher than the evaluation threshold, the ancient building repair effect evaluation model is established; otherwise, model tuning is performed based on the particle swarm search algorithm.
[0046] By performing the above operations, aiming at the problem that the general ancient building repair effect evaluation method is difficult to balance noise suppression and micro-crack gradient response, and is not sensitive enough to micro-cracks, eroded textures, and light changes, resulting in poor accuracy of the repair effect evaluation. In this solution, feature map attention fusion is performed in the intermediate layer, and a channel attention mechanism is introduced to automatically highlight the channels sensitive to cracks and erosion; by defining the repair activation function and introducing a channel adaptive threshold, adaptive noise suppression and significant texture retention are performed, and a fractional gradient operator is introduced to balance local smoothing and long-range dependence, and amplify the gradient response of micro-cracks and texture edges; thereby improving the accuracy of the repair effect evaluation.
[0047] Example Five, refer to Figure 1 , based on the above example, in step S4, the ancient building repair effect evaluation is based on the established ancient building repair effect evaluation model. The ancient building repair images are collected in real time, enhanced, and then input into the ancient building repair effect evaluation model, and the repair effect evaluation level output by the model is used as the repair effect evaluation result.
[0048] 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 "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device.
[0049] Although embodiments of the present invention have been shown and described, those of ordinary skill in the art will appreciate that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention.
[0050] The present invention and its embodiments have been described above. Such description is not restrictive. What is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. In general, if those of ordinary skill in the art are inspired by it and, without departing from the gist of the present invention, creatively design a structural mode and embodiments similar to the technical solution, they shall fall within the protection scope of the present invention.
Claims
1. An evaluation method for the renovation effect of ancient buildings based on image enhancement, characterized in that: The method includes the following steps: Step S1: Image acquisition; acquiring images of the repair of historical ancient buildings; Step S2: Image enhancement; performing image enhancement on the images of the repair of historical ancient buildings while preserving the overall real repair structure; Step S3: Establishing an evaluation model for the repair effect of ancient buildings; based on the enhanced images of the repair of historical ancient buildings, training the model through a lightweight convolutional network combined with a custom activation function and an attention mechanism; Step S4: Evaluating the repair effect of ancient buildings; evaluating the repair effect of the images of the repair of ancient buildings based on the evaluation model for the repair effect of ancient buildings.
2. The method for evaluating the renovation effect of ancient buildings based on image enhancement according to claim 1, wherein: In step S2, the image enhancement specifically includes the following steps: Step S21: Automatically segment the stone weathering, dew, high-reflection areas and stain areas in the historical ancient building renovation images to locate the renovation parts; the formula used is: ; ; ; where N is the total number of pixels in the segmentation block; n is the pixel index of the segmentation block; is the pixel gray value; , and are the red, green, and blue channel intensities of the pixel respectively; is the binary segmentation result; p is the pixel position; T is the gray threshold; is the average gray value of the segmentation block where the pixel position p is located; Step S22: Evaluation of the priority of surface defects of ancient buildings; introducing a brightness term to evaluate the enhancement priority of each segmented block; the formula used is: ; where is the enhancement priority score at pixel position p; is the weight coefficient; is the defect confidence; is the local depth, obtained by Canny edge detection, and high values correspond to obvious gaps; Step S23: Defining a matching block metric function; Step S24: Adaptive SSIM weighted fusion.
3. The method for evaluating the renovation effect of ancient buildings based on image enhancement according to claim 2, wherein: In step S23, the defined matching block metric function is to find the reference block most similar to the area to be enhanced, and regard the segmented block as a sub-region, and introduce local coordinate indices (i, j) to represent the pixel in the i-th row and j-th column within this sub-region; The central coordinate of the sub-region is ; Similarly, the central coordinate of the segmented block is ; The formula used for the matching block metric function is: ; ; ; ; where is the matching block metric function; , and are auxiliary functions; and are segmented blocks of the same size centered at pixel positions p and q; , and are the channel intensities of the pixels of the segmented block at the coordinate (i, j); , and are the channel intensities of the pixels of the segmented block at the coordinate (i, j); and are respectively and at the gradient magnitude of the n-th pixel; The segmented block to be enhanced in the historical ancient building renovation image is selected through the enhancement priority score, and the most similar reference block of the segmented block to be enhanced is selected based on the matching block metric function; The pixel values at the corresponding positions in the most similar reference block are copied into the segmented block to be enhanced to complete the local enhancement of the segmented block to be enhanced; A matching threshold is set, and when there is no matching block metric function value of the segmented block to be enhanced higher than the matching threshold, the local enhancement is completed.
4. The method for evaluating the renovation effect of ancient buildings based on image enhancement according to claim 3, wherein: In step S24, the adaptive SSIM weighted fusion is to perform base-detail decomposition on the original image, enhance them separately and then fuse them; using guided filtering to perform edge-preserving smoothing on the original image to obtain the base layer, and then subtracting the base layer from the original image to obtain the detail layer; Applying adaptive histogram equalization processing to enhance the base layer image, and using Unsharp Masking processing to enhance the detail layer; Completing global enhancement; According to the enhanced base layer and the detail layer and the structural similarity of the original image I, dynamically allocate the fusion weights to generate the final image that retains both the overall contour and highlights the local defects; the formula used is: ; ; where is the finally enhanced image; is the fusion weight; is the structural similarity index; obtain the evaluation image set of the ancient building renovation effect.
5. The method for evaluating the renovation effect of ancient buildings based on image enhancement according to claim 4, characterized in that: In step S3, the establishment of the evaluation model for the repair effect of ancient buildings divides the image set for evaluating the repair effect of ancient buildings into a training set and a test set, and trains based on a deep learning model; specifically including the following steps: Step S31: Network architecture design; the backbone uses a lightweight convolutional network, and a custom activation function is used for processing after each convolutional layer; attention fusion is performed on the feature maps in the middle layer, and a channel attention mechanism is introduced; the output layer uses softmax to output the evaluation level of the repair effect; the model uses a cross-entropy loss function; the parameters are updated based on the gradient descent algorithm and the backpropagation algorithm; Step S32: Define the repair activation function; the repair activation function is expressed as: ; Design the channel adaptive threshold, which is expressed as: ; where x is the input of the activation function; is the adaptive threshold on the u-th channel; and are the global mean and standard deviation on the u-th channel respectively; is a trainable parameter obtained through backpropagation learning; is the normalization index; is the attention weight of the u-th channel output by the middle layer through the channel attention mechanism; when the output is constantly 0; when the input is subjected to a denoising threshold shift; Step S33: Defining the derivative of the activation function; Step S34: Model determination; setting an evaluation threshold. When the evaluation accuracy rate of the trained evaluation model for the repair effect of ancient buildings on the test set is higher than the evaluation threshold, the evaluation model for the repair effect of ancient buildings is established; otherwise, model tuning is performed based on the particle swarm search algorithm.
6. The method for evaluating the renovation effect of ancient buildings based on image enhancement according to claim 5, wherein: In step S33, the definition of the derivative of the activation function is that for any scalar function f(t), when , the optimized fractional derivative operator is defined as: ; where t is an auxiliary variable; is a smoothing term; r is the integer part of the order; is the fractional order parameter; is the r-th derivative of the scalar function; is the fractional derivative operator; for the positive interval , let , and examine ; take the fractional order : If , then the order r = 0; if , then r = 1; when , ; when , , and at this time the result is a constant independent of t, so is selected and uniformly expressed as the fractional gradient, which is expressed as: ; where is the derivative of the repaired activation function in the form of a fractional gradient.
7. The method for evaluating the restoration effect of ancient buildings based on image enhancement according to claim 6, wherein: In step S1, the images of the repair of historical ancient buildings are image-annotated, and the evaluation level of the repair effect is annotated; the evaluation level of the repair effect is used as the image label.
8. The method for evaluating the renovation effect of ancient buildings based on image enhancement according to claim 7, wherein: In step S4, the evaluation of the repair effect of ancient buildings is based on the established evaluation model for the repair effect of ancient buildings. The images of the repair of ancient buildings are collected in real time, enhanced and then input into the evaluation model for the repair effect of ancient buildings, and the evaluation level of the repair effect output by the model is used as the evaluation result of the repair effect.
Citation Information
Patent Citations
Image restoration method based on enhanced neural network, storage medium and system
CN109087273A
Method for evaluating building damage after natural disaster based on neural network
CN114091897A
Endoscope image enhancement method, device, equipment and medium
CN116109533A
Image defogging method and device, equipment and storage medium
CN119067872A
Cited By
Digital auxiliary repairing system for historical building
CN120764047A
A digitalization-assisted repair system for historic buildings
CN120764047B
