Search

CN-121982409-A - Grotto degradation degree identification grading method and system based on transfer learning

CN121982409ACN 121982409 ACN121982409 ACN 121982409ACN-121982409-A

Abstract

The invention discloses a grotto degradation degree identification grading method and system based on transfer learning, which are used for collecting grotto temple images and constructing a grotto temple image data set; the method comprises the steps of preprocessing acquired grotto temple images, slicing sliding windows, establishing a training set, a verification set and a test set, loading a pretrained VGG deep learning network as a backbone network, constructing a multi-task combined training frame, generating three types of labels of main category, sub category and degradation level for each training sample, calculating the losses of the labels by adopting corresponding loss functions, weighting to obtain total losses, finishing training by updating network parameters through back propagation, and testing the trained model by adopting test images from an internal data set and test images from an external data set. The invention can realize the automatic and refined detection and classification of various typical diseases (such as cracks, flaking, erosion and the like) on the surface of the stone cave temple wall painting.

Inventors

  • ZHANG WENGANG
  • MA BIN
  • WANG LUQI
  • WANG SHUO
  • LIN SICHENG
  • SUN WEIXIN

Assignees

  • 重庆大学

Dates

Publication Date
20260505
Application Date
20260128

Claims (10)

  1. 1. A method for identifying and grading a grotto degradation degree based on transfer learning, the method comprising: Collecting grotto temple images and constructing a grotto temple image data set; Preprocessing and sliding window slicing are carried out on the collected grotto temple images, and a training set, a verification set and a test set are established; loading a pre-trained VGG deep learning network as a backbone network, constructing a multi-task combined training frame, generating three types of labels of a main class, a sub class and a degradation class for each training sample, calculating the losses of the labels by adopting a corresponding loss function, weighting to obtain total losses, and finishing training by updating network parameters through back propagation; Testing the trained model by adopting a test image from an internal data set, outputting a main category, a sub-category and a degradation level prediction result, and evaluating the performance of the model by combining a real label; and testing the trained model by adopting a test image from an external data set, and evaluating the generalization capability and cross-domain robustness of the model.
  2. 2. A method for identifying and grading a stone cave degradation degree based on transfer learning as claimed in claim 1, wherein preprocessing and sliding window slicing are performed on the acquired stone cave temple image, and a sample set is established, specifically comprising: The preprocessing comprises adopting white balance to match with Retinex or CLAHE algorithm for illumination normalization; the sliding window slicing process adopts a window with a preset side length to carry out sliding slicing on the whole picture, prevents crack features at the edge from being cut off by reserving 20% -30% of overlapping areas, and simultaneously removes non-mural backgrounds automatically; And when the slice is trained, scaling the short sides of the slice in an equal ratio, randomly cutting out a preset pixel area input model, adopting a test-time enhancement strategy, and mapping the multi-view prediction result back to the original image coordinate system after fusion.
  3. 3. A grotto degradation degree identification grading method based on transfer learning as claimed in claim 1, characterized in that loading a pre-trained VGG deep learning network as a backbone network specifically comprises: The VGG deep learning network is a VGG-16 or VGG-19 network pre-trained on an ImageNet data set, and comprises a plurality of stacked convolution blocks, wherein each convolution block comprises a plurality of Convolutional layer+ReLU, and then a maximum pooling is connected for downsampling.
  4. 4. A grotto degradation degree identification grading method based on transfer learning as claimed in claim 1, characterized in that three types of labels of main category, sub-category and degradation level are generated for each training sample, and specifically comprising: a main category label, which is used for representing the overall disease major category existing on the surface of the grotto rock and reflecting the most main degradation type of the area; Sub-category labels, namely carrying out detailed description on specific disease expression forms under the main category, and adapting to a scene with multiple concurrent disease forms in the same image area; And (3) a degradation grade label which describes the severity of the disease and reflects the continuous change trend of the disease from light to heavy.
  5. 5. A grotto degradation degree identification grading method based on transfer learning as claimed in claim 1, characterized in that the method comprises the steps of calculating various label losses by adopting corresponding loss functions and weighting to obtain total losses, and specifically comprises the following steps: in the multi-task combined training stage, the loss functions of three tasks are weighted and summed according to preset weights to form a total loss function: Wherein, the Weights lost by three classes of tasks, In order to account for the loss of the primary category, For the loss of the sub-category, Is a degradation level loss.
  6. 6. A grotto degradation level identification classification method based on transfer learning as set forth in claim 5, characterized in that said main category loss comprises: The difference between the predicted result and the real label is measured by adopting a cross entropy loss function, and the loss function is expressed as: Wherein, the Representing the number of samples in a training batch, Represent the first The predicted probability of individual samples on the true dominant class.
  7. 7. A method for identifying and grading a grotto degradation level based on transfer learning as set forth in claim 5, wherein said subcategory loss comprises: the multi-label binary cross entropy loss function is adopted to represent that a plurality of disease forms exist in the same image, and the loss function is expressed as follows: Wherein, the The total number of subcategories is represented, Represent the first The first sample is at The true tag value on the sub-category, Representing the corresponding prediction probability.
  8. 8.A grotto degradation level identification classification method based on transfer learning as claimed in claim 5, characterized in that said degradation level loss comprises: degradation level loss is used to measure the difference between the model predicted degradation level result and the true level, using a sequence classification loss that can reflect the level order relationship, whose loss function is expressed as: first of all The first sample is at Prediction probabilities at the individual level thresholds; first of all The first sample is at Binary true labels under the individual level thresholds are defined as: The total number of degradation levels is calculated, Is the actual degradation level scalar value corresponding to the i-th sample.
  9. 9. A grotto degradation degree identification grading method based on transfer learning as claimed in claim 1, characterized in that the degradation grade is classified into 0-3 grades, and the degradation grade of each typical disease is established by a quantifiable parameter to establish a judgment threshold value: The crack disease is characterized in that the crack length L, the width W and the depth B are used as parameters, the level 0 is no crack, the level 1 is L <10cm, W <0.5mm, B=0 and no active signs, the level 2 is 10-L <50cm or 0.5-W <2mm or B-1, the possible slight activity is realized, and the level 3 is L-50 cm or W-2 mm or the clear active signs are realized; Peeling disease, namely taking the peeling area ratio D% or the exposed condition of the substrate as a parameter, wherein the level 0 is no peeling, the level 1 is 0.5 percent to less than or equal to D percent and less than 3 percent, the substrate is slightly exposed, the level 2 is 3 percent to less than or equal to D percent and less than 10 percent, or the substrate is obviously exposed, and the level 3 is D percent to more than or equal to 10 percent, or the substrate is deeply peeled and influences the structure; The erosion disease is subdivided according to erosion types, the water erosion takes the water erosion area occupation ratio E% or the water penetration amount as parameters, the salt erosion takes the salt erosion area occupation ratio S% or the salt layer thickness as parameters, the bioerosion takes the bioerosion area occupation ratio B% or the erosion cluster density as parameters, and the thresholds of all stages are set based on the 'stone degradation phenomenon graphic glossary'.
  10. 10. A grotto degradation level identification classification system based on transfer learning, the system comprising: the data acquisition module is used for acquiring the grotto temple images and constructing a grotto temple image data set; the data processing module is used for preprocessing the acquired grotto temple images and sliding window slicing, and establishing a training set, a verification set and a test set; The model training module is used for loading a pre-trained VGG deep learning network as a backbone network, constructing a multi-task combined training frame, generating three types of labels of a main class, a sub class and a degradation class for each training sample, calculating the losses of the labels by adopting a corresponding loss function, weighting to obtain total losses, and finishing training by updating network parameters through back propagation; The internal test module is used for testing the trained model by adopting a test image from an internal data set, outputting a main category, a sub-category and a degradation level prediction result, and evaluating the performance of the model by combining a real label; and the external test module is used for testing the trained model by adopting a test image from an external data set and evaluating the generalization capability and cross-domain robustness of the model.

Description

Grotto degradation degree identification grading method and system based on transfer learning Technical Field The invention relates to the technical field of deep learning, in particular to a grotto degradation degree identification grading method and system based on transfer learning. Background The grottoes temple is taken as a sign of long history and rich culture, and the protection work is important. In the protection process, prioritization is required according to the degree of degradation. Firstly, the areas with larger damage area or serious damage degree should be focused on the most fragile areas, the resources and efforts are concentrated, the damage range is prevented from being further collapsed or expanded, and remarkable protection effect is achieved in a short time, so that the historic life and cultural value of the grotto temple are prolonged to the greatest extent. Therefore, there is a need to establish a scientific and accurate grotto degradation identification and classification system. Disclosure of Invention The invention provides a grotto degradation degree identification grading method and system based on transfer learning, which are used for realizing automatic and refined detection and grading of various typical diseases (such as cracks, flaking, erosion and the like) on the surface of a grotto temple wall painting. According to a first aspect, in one embodiment, there is provided a method for identifying and grading a grotto degradation level based on transfer learning, the method comprising: Collecting grotto temple images and constructing a grotto temple image data set; Preprocessing and sliding window slicing are carried out on the collected grotto temple images, and a training set, a verification set and a test set are established; loading a pre-trained VGG deep learning network as a backbone network, constructing a multi-task combined training frame, generating three types of labels of a main class, a sub class and a degradation class for each training sample, calculating the losses of the labels by adopting a corresponding loss function, weighting to obtain total losses, and finishing training by updating network parameters through back propagation; Testing the trained model by adopting a test image from an internal data set, outputting a main category, a sub-category and a degradation level prediction result, and evaluating the performance of the model by combining a real label; and testing the trained model by adopting a test image from an external data set, and evaluating the generalization capability and cross-domain robustness of the model. Further, preprocessing and sliding window slicing are carried out on the collected grotto temple images, and a sample set is established, which specifically comprises: The preprocessing comprises adopting white balance to match with Retinex or CLAHE algorithm for illumination normalization; the sliding window slicing process adopts a window with a preset side length to carry out sliding slicing on the whole picture, prevents crack features at the edge from being cut off by reserving 20% -30% of overlapping areas, and simultaneously removes non-mural backgrounds automatically; And when the slice is trained, scaling the short sides of the slice in an equal ratio, randomly cutting out a preset pixel area input model, adopting a test-time enhancement strategy, and mapping the multi-view prediction result back to the original image coordinate system after fusion. Further, loading the pretrained VGG deep learning network as a backbone network specifically includes: The VGG deep learning network is a VGG-16 or VGG-19 network pre-trained on an ImageNet data set, and comprises a plurality of stacked convolution blocks, wherein each convolution block comprises a plurality of Convolutional layer+ReLU, and then a maximum pooling is connected for downsampling. Further, three types of labels of main category, sub-category and degradation level are generated for each training sample, and specifically include: a main category label, which is used for representing the overall disease major category existing on the surface of the grotto rock and reflecting the most main degradation type of the area; Sub-category labels, namely carrying out detailed description on specific disease expression forms under the main category, and adapting to a scene with multiple concurrent disease forms in the same image area; And (3) a degradation grade label which describes the severity of the disease and reflects the continuous change trend of the disease from light to heavy. Further, the method comprises the steps of calculating the loss of various labels by adopting the corresponding loss function and weighting to obtain the total loss, and specifically comprises the following steps: in the multi-task combined training stage, the loss functions of three tasks are weighted and summed according to preset weights to form a total loss function: Wherein, the Weights l