Stone surface defect detection method and system
By using YOLOv5 deep learning neural network model and data augmentation technology, the accuracy and quantitative evaluation of stone facade damage detection are solved, and rapid and accurate damage detection and repair plan formulation are achieved.
Patent Information
- Application Number
- PCT/CN2024/089949
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-18
- Filing Date
- 2024-04-26
- Publication Date
- 2025-07-24
AI Technical Summary
The prior art has problems in the detection of stone facade damage detection with low detection accuracy and incomplete damage types, making it difficult to achieve accurate quantitative evaluation and repair.
The YOLOv5 deep learning neural network model is adopted, and the learning rate is dynamically adjusted by combining the first-order moment estimation and second-order moment estimation of the learning rate gradient function, a prediction model is constructed, and stone facade images are collected through handheld cameras or drones, data augmentation and feature fusion are carried out to achieve rapid detection of damage location and type.
It realizes rapid and accurate detection of stone facade damage, can quantify the degree of damage and provide repair suggestions, and improves the scientificity and efficiency of the inspection.
Smart Images

Figure CN2024089949_24072025_PF_FP_ABST
Abstract
Description
A stone surface defect detection method and system Technical Field
[0001] The present invention relates to the technical field of product defect detection, and in particular to a method and system for detecting stone surface defects. Background Art
[0002] Damage detection for stone facades is a critical step in building maintenance and restoration. Traditional detection methods rely primarily on manual inspections, but due to the diverse and complex nature of damage to stone facades, this method is both time-consuming and prone to false positives and missed inspections.
[0003] In recent years, the development of deep learning technology has provided new solutions for image processing. Object detection algorithms are the most widely used in the construction industry. However, existing models still suffer from issues such as incomplete coverage of damage types, low detection accuracy, and fragmented data. Consequently, accurately quantifying and assessing visible damage to stone facades remains a challenge, as does repairing it.
[0004] Summary of the Invention
[0005] The present invention provides a stone surface defect detection method and system to solve the above technical problems.
[0006] In order to solve the above technical problems, the present invention provides a method for detecting stone surface defects, comprising the following steps:
[0007] Step 1: Collect sample images of stone facades, wherein the sample images include undamaged images and damaged images marked with damage types; divide the sample images into a training set and a test set;
[0008] Step 2: Measure the actual facade dimensions on site;
[0009] Step 3: Build a basic model and train the basic model using the training set; the basic model adopts the YOLOv5 deep learning neural network model;
[0010] Step 4: Use the first-order moment estimation and second-order moment estimation of the learning rate gradient function to dynamically adjust the learning rate; use the test set to test the trained basic model, and obtain the prediction model if the test passes;
[0011] Step 5: Acquire an actual image, input the actual image into the prediction model, and output a prediction result, which includes a picture with a damage type labeling box and classification statistics of the damage type.
[0012] Preferably, the sample image is collected by a handheld camera or a drone.
[0013] Preferably, the damage-free image accounts for 10% of the sample image.
[0014] Preferably, step 1 further includes performing data enhancement on the sample image.
[0015] Preferably, the data enhancement method includes image rotation, image mirroring, image filling, image splicing, and changing image brightness, contrast, and saturation.
[0016] Preferably, the ratio of the number of sample images in the training set to that in the test set is 8:2.
[0017] Preferably, the YOLOv5 deep learning neural network model includes a backbone network layer, an intermediate layer and a prediction layer. An attention mechanism module is introduced into the backbone network layer to extract features of the input image; the intermediate layer uses an adaptive feature fusion network to perform multi-scale fusion on the extracted features; and the prediction layer performs regression prediction.
[0018] Preferably, the actual images are multiple images of fixed addresses.
[0019] Preferably, the method further comprises:
[0020] Step 6: Compare the predicted result with the actual facade dimensions obtained in step 2, and calculate the size of the damaged area based on the comparison result; and categorize the degree of the damage according to the size and type of the damaged area.
[0021] Step 7: Provide short-term repair plan pre-selection or long-term preventive measures recommendations based on the type and extent of damage.
[0022] The present invention also provides a stone surface defect detection system, including a project management unit, a damage level evaluation unit, a damage database unit and a damage treatment suggestion unit.
[0023] The project management unit is used to obtain the prediction result by using the stone surface defect detection method as described above;
[0024] The damage level evaluation unit is used to classify the degree of the detected damage;
[0025] The damage database unit is used to classify and count the detected items and conduct comparative analysis on previous detection data;
[0026] The damage treatment suggestion unit is used to provide short-term repair plan pre-selection or long-term preventive measure suggestions.
[0027] Compared with the existing technology, the stone surface defect detection method and system provided by the present invention have the following advantages:
[0028] 1. The present invention uses an optimized prediction model to detect stone surface defects, which can quickly and accurately detect the location and type of damage on the stone facade, and can quantitatively evaluate the degree of damage and impact;
[0029] 2. The present invention adds further graded quantitative evaluation of the prediction results and provides repair suggestions for different degrees of damage, which is beneficial to the long-term and reasonable maintenance of the stone facade. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] FIG1 is a flow chart of a method for detecting stone surface defects in one embodiment of the present invention;
[0031] FIG2 is a training flowchart of a YOLOv5 deep learning neural network model in a specific embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to describe the technical solution of the above invention in more detail, specific embodiments are listed below to demonstrate the technical effects; it should be emphasized that these embodiments are used to illustrate the present invention and are not used to limit the scope of the present invention.
[0033] The stone surface defect detection method provided by the present invention, as shown in FIG1 , comprises the following steps:
[0034] Step 1: Establish a data set: Collect sample images of stone facades, including undamaged images and damaged images marked with damaged areas and types; divide the sample images into a training set and a test set.
[0035] Step 2: Measure the actual dimensions: Use a tape measure, vernier feeler gauge or other tools to measure the actual dimensions of the facade. The actual dimensions of the facade may include the block dimensions and joint dimensions of the stone facade.
[0036] Step 3: Model training: Build a basic model and train the basic model using the training set; the basic model adopts the YOLOv5 deep learning neural network model with 52 convolutional layers.
[0037] Step 4: Model fine-tuning: Use the first-order moment estimation and second-order moment estimation of the learning rate gradient function to dynamically adjust the learning rate; use the test set to test the trained basic model, and obtain the prediction model if the test passes.
[0038] Step 5: Model Application: Acquire an actual image, input it into the prediction model, and output prediction results, which include an image with a damage type label and classification statistics of the damage type. This allows the trained prediction model to be used to determine the damage area and type in the actual image, and to quantify the damage severity based on the damage type and extent.
[0039] The present invention uses an optimized prediction model to detect stone surface defects, which can quickly and accurately detect the damage location and type of the stone facade, and can quantitatively evaluate the degree of damage and impact, facilitating the subsequent formulation of a more scientific and specific repair plan.
[0040] In some embodiments, the sample image can be collected by a handheld camera or a drone, and the damage image is annotated after the collection is completed. For example, typical damage is finely annotated, and the typical damage includes cracks, water spots, yellow rust, defects, holes, etc.
[0041] In some embodiments, the damage-free images account for 10% of the sample images; and the ratio of the number of sample images in the training set to that in the test set is 8:2.
[0042] In some embodiments, step 1 further includes data augmentation of the sample images to address the issues of a small sample size and high labeling workload. Specifically, the data augmentation methods include, but are not limited to, image rotation, image mirroring, image padding, image splicing, adding noise, and changing image brightness, contrast, and saturation, as long as they can increase the sample size.
[0043] In some embodiments, please focus on Figure 2. The YOLOv5 deep learning neural network model includes a backbone network layer (backbone layer), an intermediate layer (neck layer) and a prediction layer. The SE attention mechanism module is introduced in the backbone network layer to extract features of the input image; the intermediate layer uses the ASFF adaptive feature fusion network to replace the existing PANet feature fusion network to perform multi-scale fusion on the extracted features, thereby adaptively learning the spatial weights of the grid-scale feature map fusion to improve detection accuracy; the prediction layer performs regression prediction and outputs the prediction results.
[0044] In some embodiments, the actual image may be multiple images of a fixed address, thereby achieving batch detection and improving detection efficiency.
[0045] In some embodiments, the method further comprises:
[0046] Step 6: The experts compare the predicted results with the actual facade dimensions obtained in step 2, and calculate the area of damage based on the comparison results; and categorize the degree of damage according to the area and type of damage.
[0047] Step 7: Provide short-term repair plan pre-selection or long-term preventive measures recommendations based on the type and extent of damage.
[0048] The present invention adds a further graded quantitative evaluation of the prediction results and provides repair suggestions for different degrees of damage, which is beneficial to the long-term and reasonable maintenance of the stone facade.
[0049] The present invention also provides a stone surface defect detection system, comprising a project management unit, a damage level evaluation unit, a damage database unit, and a damage treatment suggestion unit, wherein:
[0050] The project management unit is used to obtain the prediction result by adopting the stone surface defect detection method as described above.
[0051] The damage level evaluation unit is used to classify the degree of the detected damage.
[0052] The damage database unit is used to classify and count the detected items and conduct comparative analysis on past detection data, so that users can access the database to view the specific conditions of the detected items and the classification statistics of the damage quantity.
[0053] The damage treatment suggestion unit is used to provide short-term repair plan pre-selection or long-term preventive measures suggestions, provide users with detection conclusions of visible defects on the facade of building stone materials, and provide a direct basis for daily repair and maintenance of buildings.
[0054] In addition, the method and system of the present invention can be extended to damage detection of other materials and surfaces, and has broad application prospects.
[0055] In summary, the present invention provides a method and system for detecting stone surface defects, which includes the following steps: Step 1: Collecting sample images of a stone facade, wherein the sample images include undamaged images and damaged images labeled with damage areas and types; dividing the sample images into a training set and a test set; Step 2: On-site measurement of the actual facade dimensions; Step 3: Constructing a basic model and training the basic model using the training set; the basic model adopts a YOLOv5 deep learning neural network model; Step 4: Dynamically adjusting the learning rate using the first-order moment estimation and second-order moment estimation of the learning rate gradient function; Testing the trained basic model using the test set, and obtaining a prediction model if the test passes; Step 5: Acquiring an actual image, inputting the actual image into the prediction model, and outputting a prediction result, which includes an image with a damage type labeling box and classification statistics of the damage type. The present invention uses an optimized prediction model for stone surface defect detection, which can quickly and accurately detect the damage location and type of the stone facade, and can quantitatively assess the damage extent and impact, facilitating the subsequent formulation of a more scientific and specific repair plan.
[0056] Obviously, those skilled in the art may make various changes and modifications to the invention without departing from the spirit and scope of the invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A method for detecting surface defects of stone materials, characterized in that, It includes the following steps: Step 1: Collect sample images of the stone facade. The sample images include non-damaged images and damaged images marked with damage types; divide the sample images into a training set and a test set; Step 2: Measure the actual facade size on-site; Step 3: Construct a basic model and train the basic model using the training set; the basic model adopts the YOLOv5 deep learning neural network model; Step 4: Dynamically adjust the learning rate using the first-order moment estimation and second-order moment estimation of the learning rate gradient function; use the test set to test the trained basic model, and obtain a prediction model if the test is qualified; Step 5: Obtain the actual image, input the actual image into the prediction model, and output the prediction result. The prediction result includes a picture with a damage type annotation box and the classification and statistical result of the damage type.
2. The stone surface defect detection method according to claim 1, wherein The sample images are collected by a handheld camera or a drone.
3. The stone surface defect detection method according to claim 1, wherein The non-damaged images account for 10% of the sample images.
4. The stone surface defect detection method according to claim 1, wherein, In Step 1, it also includes data augmentation of the sample images.
5. The stone surface defect detection method according to claim 4, wherein The data augmentation methods include image rotation, image mirroring, image padding, image stitching, and changing image brightness, contrast, and saturation.
6. The stone surface defect detection method according to claim 1, wherein The ratio of the number of sample images in the training set and the test set is 8:
2.
7. The stone surface defect detection method according to claim 1, characterized in that The YOLOv5 deep learning neural network model includes a backbone network layer, an intermediate layer, and a prediction layer. An attention mechanism module is introduced in the backbone network layer to extract features from the input image; the intermediate layer uses an adaptive feature fusion network to perform multi-scale fusion on the extracted features; the prediction layer performs regression prediction.
8. The stone surface defect detection method according to claim 1, wherein, The actual image is multiple images at a fixed address.
9. The stone surface defect detection method according to claim 1, characterized in that, It also includes: Step 6: Compare the prediction result with the actual facade size obtained in Step 2, calculate the size of the damaged area based on the comparison result; classify the degree of the damage according to the size and type of the damage; Step 7: Provide pre-selection of short-term repair plans or suggestions for long-term preventive measures according to the damage type and degree.
10. A stone surface defect detection system, characterized in that, It includes a project management unit, a damage level evaluation unit, a damage database unit, and a damage treatment suggestion unit, The project management unit is used to obtain the prediction result by using the stone surface defect detection method described in any one of claims 1 to 9; The damage level evaluation unit is used to classify the degree of the detected damage; The damage database unit is used to classify and statistically analyze the detected projects and compare and analyze the past detection data; The damage treatment suggestion unit is used to provide pre-selection of short-term repair plans or suggestions for long-term preventive measures.
Citation Information
Patent Citations
Strip steel surface defect detection method based on improved YOLOv5 network
CN114663346A
Composite material processing surface defect detection and evaluation method based on deep learning
CN115661071A
Improved YOLOv5s-based injection molding part surface defect detection method
CN116542932A
Visual inspection and evaluation method for scratch damage on surface of ceramic material
CN117218086A
Automated defect classification and detection
EP4266246A1
Cited By
Cultural relic damaged form evaluation method and device, electronic equipment and storage medium
CN121353241A