Automatic identification method for great wall brick body diseases
By building a Great Wall wall disease recognition system based on InceptionV3 model, using drones to acquire images and train models, the accuracy and efficiency of automated identification of Great Wall brick diseases are solved, and efficient and accurate disease recognition is achieved.
Patent Information
- Application Number
- CN202510357319.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-07-08
AI Technical Summary
The prior art lacks automated and non-contact identification methods for Great Wall brick diseases, resulting in low identification accuracy, low efficiency and possible damage to bricks.
The InceptionV3 pre-trained model is used for fine-tuning, and the Great Wall wall disease classification recognition model is built. Image samples are obtained through drones, training sets and test sets are marked and divided. The model is trained using cross-entropy loss function and optimization algorithm to prevent overfitting and set appropriate hyperparameters to improve the generalization ability of the model.
It realizes efficient and accurate identification of Great Wall brick diseases without damaging the bricks, with an identification rate of more than 90%, improving identification efficiency and accuracy.
Smart Images

Figure CN120279319A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wall damage identification, and in particular to an automated identification method for the diseases of the Great Wall bricks. Background Art
[0002] The damage of the Great Wall brick walls is one of the factors that long-term endanger the stability of the side walls and enemy towers. The conventional identification method is to identify these disease information by the naked eyes and experience of experts, which has the disadvantages of strong subjectivity, poor accuracy, low work efficiency, and even damage to the body. The existing technology lacks an automated and non-contact solution for identifying the diseases of the Great Wall brick walls that can avoid damage to the body. Summary of the Invention
[0003] The purpose of the present invention is to provide an automated identification method for the diseases of the Great Wall bricks, which can accurately and efficiently identify the disease types of the bricks on the premise of avoiding contact damage to the brick wall entity and overcome the deficiencies of the existing conventional methods.
[0004] The purpose of the present invention is achieved through the following technical solutions:
[0005] An automated identification method for the diseases of the Great Wall bricks, the method comprising:
[0006] Step 1, first obtain image samples of the Great Wall side walls and enemy towers in the area;
[0007] Step 2, label the disease types of the bricks according to the image samples obtained in Step 1, and divide them into a test set and a training set;
[0008] Step 3, construct a classification and identification model for the diseases of the Great Wall walls based on the fine-tuning method of the InceptionV3 pre-trained model;
[0009] Step 4, use the test set and the training set divided in Step 2 to train the classification and identification model for the diseases of the Great Wall walls, and use the trained classification and identification model for the diseases of the Great Wall walls to output the classification results of the brick wall diseases.
[0010] It can be seen from the above technical solutions provided by the present invention that the above method can accurately and efficiently identify the disease types of the bricks on the premise of avoiding contact damage to the brick wall entity and overcome the deficiencies of the existing conventional methods. Brief Description of the Drawings
[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts.
[0012] Figure 1 Schematic diagram of the process for the automatic identification method of the diseases of the Great Wall bricks provided by the embodiments of the present invention. Detailed implementation manners
[0013] The following combines the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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, which does not constitute a limitation to the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
[0014] As Figure 1 shown is a schematic diagram of the process for the automatic identification method of the diseases of the Great Wall bricks provided by the embodiments of the present invention, and the method includes:
[0015] Step 1: First, obtain image samples of the Great Wall side walls and enemy towers in the area;
[0016] In this step, specifically, the image samples of the Great Wall side walls and enemy towers in the area are obtained by means of the linear flight and circumferential flight of the unmanned aerial vehicle.
[0017] Step 2: Label the types of brick diseases according to the image samples obtained in Step 1, and divide the test set and the training set;
[0018] In this step, first, based on the standards of the diseases and classification specifications of stone and brick cultural relics, combined with the brick wall image samples obtained in Step 1, a preliminary analysis of the actual disease conditions of the brick wall is carried out, and 8 types of diseases of the bricks are summarized, including collapse, crack, biological disease, water rust, exfoliation, discoloration, efflorescence and oxide layer;
[0019] Process the image samples obtained in Step 1 into images with 599*599 pixels and an aspect ratio of 1;
[0020] Label the 8 types of disease types for the processed image samples with 8 serial numbers from 0 to 7;
[0021] For the already labeled image samples, the test set and the training set are allocated according to the random principle in a ratio of 3:1.
[0022] Step 3: Construct a classification and recognition model for the diseases of the Great Wall wall based on the fine-tuning method of the InceptionV3 pre-trained model;
[0023] In this step, the InceptionV3 pre-trained model is trained on the large ImageNet image dataset and can identify and classify common features in images. The InceptionV3 is a convolutional neural network that realizes the learning of features at different scales through a unique module design. This design allows the network to process multiple different-sized convolutional kernels in parallel within the same layer, thereby effectively capturing multi-level features in images from low-level edges to high-level semantic information.
[0024] In the process of constructing the Great Wall wall disease classification and recognition model:
[0025] First, data collection and preprocessing are carried out, including steps such as resizing, cropping, and normalizing the images;
[0026] Next, the InceptionV3 architecture is selected as the model basis, and the prediction results of the input images are calculated through the forward propagation process. The cross-entropy loss function is used to evaluate the difference between the predicted values and the actual labels;
[0027] Then, the gradients of the weights of each layer are calculated via the backpropagation algorithm, and the weights are updated using the optimization algorithm to minimize the loss;
[0028] During this process, to prevent overfitting, the dropout technique can be introduced, with a rate set to 0.5, and L2 regularization is applied, with its weight decay coefficient set to 1e-4. At the same time, the learning rate is adjusted to 0.001, and the batch size is selected as 32 to further improve the model performance.
[0029] The model is evaluated using the validation set during training, and finally the generalization ability of the model is verified on an independent test set, thereby obtaining a multi-level feature representation from low-level edges and textures to high-level semantic information, namely "common knowledge of graphic classification". These knowledge can be applied to specific tasks through transfer learning by fine-tuning the pre-trained model to adapt to the requirements of new tasks.
[0030] Transfer the weight parameters of the trained model to the Great Wall wall disease classification and recognition model. The specific approach is as follows:
[0031] Keep the parameters of each layer before the last layer of the original InceptionV3 pre-trained model, then delete the fully connected layer of the last layer of the model, add a new pooling layer and a fully connected layer, and then fine-tune the parameters of the Great Wall wall disease classification and recognition model through the Great Wall brick dataset, specifically including:
[0032] First, load the InceptionV3 pre-trained model and keep the parameters before its last layer unchanged, delete the fully connected layer of the last layer of the original model, and add a new pooling layer and a fully connected layer to adapt to the new task;
[0033] Next, preprocess the obtained image samples of the Great Wall side walls and enemy towers, and randomly assign them to the training set and the test set. At the same time, apply data augmentation techniques to improve the generalization ability of the model, set training hyperparameters, use cross-entropy as the loss function, and select optimization algorithms such as Adam or SGD to update the weights;
[0034] During the training process, calculate the output through forward propagation, use the backpropagation algorithm to calculate the gradients and update the model parameters, especially the parameters of the newly added layers; after each certain number of batches of training, use the validation set to evaluate the model performance, adjust the learning rate or take other measures to prevent overfitting;
[0035] Finally, use the independent test set to evaluate the average recognition accuracy and other evaluation metrics of the model to ensure that the model has good generalization ability and high-precision disease classification and recognition effects.
[0036] For the fine-tuned Great Wall wall disease classification and recognition model, set the optimal values of multiple key parameters, including:
[0037] Batch Size, which refers to the number of samples used to update the model weights in each iteration; a larger batch size can more efficiently utilize hardware acceleration for calculation and usually brings a faster convergence speed, but an overly large batch size may lead to out-of-memory or a decrease in generalization ability. On the contrary, a smaller batch size may slow down the convergence speed but helps to find a better solution. In the embodiments of the present invention, after experimentally comparing four different batch size values of 32, 64, 128, and 256, 128 is finally selected as the optimal batch size because it achieves the best balance between efficiency and performance;
[0038] Learning Rate, which refers to the size of the step used to control the update of the model weights during model training; an appropriate learning rate can ensure that the model effectively converges to the minimum loss value, while an overly high learning rate may cause the model to fail to converge, and an overly low learning rate will make the training process very slow. In the embodiments of the present invention, after multiple experimental verifications, it is determined that the learning rate of 0.01 is the best choice, which can avoid overfitting while ensuring a relatively fast convergence speed, achieving a good balance between efficiency and model performance;
[0039] The maximum number of training epochs refers to the number of times the entire training dataset is traversed completely. An appropriate maximum number of training epochs can ensure that the model fully learns the patterns in the data. However, too many epochs may lead to overfitting, causing the model to perform well on the training data but poorly on unseen data. Through a series of experiments in the embodiments of the present invention, it is verified that setting the maximum number of training epochs to 30 is an ideal choice, which can not only ensure good learning effects of the model but also effectively avoid the overfitting problem and ensure the generalization ability of the model on new data.
[0040] Then, the formula for calculating the model recognition accuracy Ac (Accuracy, Ac, %) of the Great Wall wall disease classification and recognition model on the test set is as follows:
[0041]
[0042] In the formula, n is the number of correctly predicted for a single disease type; N is the total number of samples for a single disease type.
[0043] The formula for calculating the average recognition accuracy Aa (Average accuracy, Aa, %) of the Great Wall wall disease classification and recognition model is as follows:
[0044]
[0045] In the formula, M is the total number of model sample categories.
[0046] Step 4: Use the test set and training set divided in Step 2 to train the Great Wall wall disease classification and recognition model, and use the trained Great Wall wall disease classification and recognition model to output the brick wall disease classification results.
[0047] For example, first perform data preprocessing, and perform necessary preprocessing on the images in the training set, including operations such as resizing, cropping, and normalization, to ensure that the input data meets the requirements of the model.
[0048] Then train the Great Wall wall disease classification and recognition model, load the fine-tuned InceptionV3 model, set the batch size to 128, the learning rate to 0.01, and set the maximum number of training epochs to 30; then use the training set to train the model, adopt the cross-entropy loss function as the optimization objective, and at the same time use the Adam or SGD optimization algorithm to update the model weights; to prevent overfitting and ensure the generalization ability of the model, after each completion of a certain number of batch training, use the validation set to evaluate the model performance, and adjust the learning rate or other hyperparameters as needed in a timely manner. This process ensures that the model can achieve the optimal recognition accuracy and good generalization effect while ensuring efficient training.
[0049] Then, model evaluation is carried out. After the model training is completed, an independent test set is used to evaluate the finally trained classification and recognition model for the diseases of the Great Wall wall. By calculating the recognition accuracy of each disease type and based on the formula calculate the average recognition accuracy Aa.
[0050] Case analysis: Suppose there is an image dataset containing 5,000 images labeled with 8 different disease types, which is divided into a training set (3,750 images) and a test set (1,250 images) according to the ratio of 3:1. After the training and optimization of the above steps, the model recognition accuracy Ac of the classification and recognition model for the diseases of the Great Wall wall on the test set is as follows:
[0051] Collapse: 92% accuracy; crack: 91% accuracy; biological disease: 89% accuracy; water rust: 90% accuracy; peeling: 93% accuracy; discoloration: 91% accuracy; efflorescence: 90% accuracy; oxide layer: 92% accuracy.
[0052] Then the average recognition accuracy Aa of the classification and recognition model for the diseases of the Great Wall wall = 91%.
[0053] The above example shows that the automatic recognition method for the diseases of the Great Wall bricks described in the embodiments of the present invention has an automatic recognition rate of more than 90% for the set 8 diseases, realizes the efficient and accurate automatic recognition of the diseases of the Great Wall brick walls, and greatly improves the work efficiency and accuracy.
[0054] It should be noted that the content not described in detail in the embodiments of the present invention belongs to the prior art well-known to those skilled in the art.
[0055] In summary, the method described in the embodiments of the present invention has an automatic recognition rate of more than 90% for the set 8 diseases, realizes the automatic recognition of the diseases of the Great Wall brick walls. On the one hand, it overcomes the difficulty of obtaining samples in the steep areas of the Great Wall, and on the other hand, it gets rid of the defects of slow speed and high intensity of relying on the naked eye and experience to distinguish disease information, and has high application value for the recognition of the diseases of the long walls of the Great Wall.
[0056] In addition, those of ordinary skill in the art can understand that all or part of the steps in implementing the method of the above embodiments can be completed by instructing relevant hardware through a program, and the corresponding program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disc, etc.
[0057] As described above, it is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims. The information disclosed in the background art part of this article is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as an admission or any form of implication that this information constitutes the prior art known to those skilled in the art.
Claims
1. An automated recognition method for diseases of the Great Wall bricks, characterized in that, The method includes: Step 1: First, obtain image samples of the Great Wall sidewalls and enemy towers within the area; Step 2: Label the brick disease types based on the image samples obtained in Step 1, and divide them into a test set and a training set; Step 3: Construct a classification and recognition model for the diseases of the Great Wall wall based on the fine-tuning method of the InceptionV3 pre-trained model; Step 4: Use the test set and training set divided in Step 2 to train the classification and recognition model for the diseases of the Great Wall wall, and use the trained classification and recognition model for the diseases of the Great Wall wall to output the classification results of the brick wall diseases.
2. The automated recognition method for the diseases of the Great Wall brick body according to claim 1, wherein, In Step 1, specifically, the image samples of the Great Wall sidewalls and enemy towers within the area are obtained by means of linear flight and circumferential flight of the drone.
3. The automated identification method for the diseases of the Great Wall bricks according to claim 1, characterized in that, In Step 2, based on the disease and classification standard specifications of stone and brick cultural relics, and combined with the brick wall image samples obtained in Step 1, the actual disease situation of the brick wall is preliminarily analyzed, and 8 disease types of the brick body are summarized, including collapse, crack, biological disease, water rust, peeling, discoloration, efflorescence and oxide layer; Process the image samples obtained in Step 1 into images with a pixel size of 599*599 and an aspect ratio of 1; Label the 8 disease types of the processed image samples with 8 serial numbers from 0 to 7; For the already labeled image samples, allocate the test set and the training set according to the ratio of 3:1 based on the random principle.
4. The automated recognition method for the diseases of the Great Wall bricks according to claim 1, characterized in that, In Step 3, based on the InceptionV3 pre-trained model, learn the common knowledge of graphic classification on the ImageNet large image dataset. Specifically: First, perform data collection and preprocessing, including resizing, cropping and normalization of the images; Next, select the InceptionV3 architecture as the model basis, calculate the prediction results of the input images through the forward propagation process, and use the cross-entropy loss function to evaluate the difference between the predicted values and the actual labels; Then, calculate the gradients of the weights of each layer through the backpropagation algorithm, and use the optimization algorithm to update the weights to minimize the loss; During training, use the validation set to evaluate the model, and finally verify the generalization ability of the model on the independent test set, so as to obtain a multi-level feature representation from low-level edges and textures to high-level semantic information, that is, "the common knowledge of graphic classification". These knowledges are applied to specific tasks through transfer learning, and the pre-trained model is fine-tuned to adapt to the needs of the new task.
5. The automated recognition method for the diseases of the Great Wall bricks according to claim 4, wherein In Step 3, transfer the trained model weight parameters to the classification and recognition model for the diseases of the Great Wall wall. The specific method is: Keep the parameters of each layer before the last layer of the original InceptionV3 pre-trained model, then delete the fully connected layer of the last layer of the model, add a new pooling layer and a fully connected layer, and then fine-tune the parameters of the classification and recognition model for the diseases of the Great Wall wall through the Great Wall brick body dataset. The specific process of fine-tuning includes: First, load the InceptionV3 pre-trained model and keep the parameters before its last layer unchanged, delete the fully connected layer of the last layer of the original model, and add a new pooling layer and a fully connected layer to adapt to the new task; Next, preprocess the obtained images of the Great Wall side walls and enemy towers, and randomly assign them to the training set and the test set. At the same time, apply data augmentation techniques to improve the generalization ability of the model, set training hyperparameters, use cross-entropy as the loss function, and select the Adam or SGD optimization algorithm to update the weights; During the training process, calculate the output through forward propagation, use the backpropagation algorithm to calculate the gradients and update the model parameters; after each certain number of batch trainings, use the validation set to evaluate the model performance and adjust the learning rate to prevent overfitting; Finally, use the independent test set to evaluate the average recognition accuracy and other evaluation indicators of the model to ensure that the model has good generalization ability and high-precision disease classification and recognition effects.
6. The automated recognition method for the diseases of the Great Wall bricks according to claim 5, wherein, In step 3, for the fine-tuned Great Wall wall disease classification and recognition model, set the optimal values of multiple key parameters, including: Batch size, which refers to the number of samples used to update the model weights in each iteration; Learning rate, which refers to the size of the step when controlling the update of the model weights during the training of the model; Maximum number of training epochs, which refers to the number of times the entire training dataset is completely traversed; Then the calculation formula for the model recognition accuracy Ac of the Great Wall wall disease classification and recognition model on the test set is as follows: Where n is the number of correctly predicted samples of a single disease type; N is the total number of samples of a single disease type; The calculation formula for the average recognition accuracy Aa of the Great Wall wall disease classification and recognition model is as follows: Where M is the total number of model sample categories.