Hydraulic building surface crack detection method based on plane projection

By combining planar projection-based 3D modeling with YOLOv11 models, small-size image cropping and sliding window detection were used to solve the problems of insufficient memory, local duplicate detection, and annotation distortion in the detection of surface cracks in hydraulic structures. This resulted in efficient and accurate crack detection, improving detection efficiency and accuracy.

CN121661019APending Publication Date: 2026-03-13CHANGJIANG SPATIAL INFORMATION TECH ENG CO LTD (WUHAN)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies for detecting surface cracks in hydraulic structures suffer from problems such as insufficient memory, localized repeated detection, information loss, distorted labeling, low processing efficiency, and low detection accuracy, making it difficult to meet the needs of safety monitoring.

Method used

A planar projection-based approach is adopted, which involves 3D modeling, model clipping, reprojection, image cropping, image stitching, and crack merging. Combined with the YOLOv11 model, intelligent crack detection is performed. By utilizing small-size image cropping and annotation, sliding window detection, and non-maximum suppression techniques, efficient and accurate detection of hydraulic structure surfaces is achieved.

Benefits of technology

It enables intelligent detection of large-sized sloping hydraulic structures, significantly improving detection efficiency and accuracy, reducing the missed detection rate, and providing intuitive visualization results of crack location, size, and spatial distribution, thus meeting the high requirements for safety monitoring of hydraulic structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661019A_ABST
    Figure CN121661019A_ABST
Patent Text Reader

Abstract

The invention provides a hydraulic structure surface crack detection method based on plane projection, and belongs to the technical field of image processing and deep learning, and the method comprises the following steps: collecting an original image of a hydraulic structure surface, and carrying out the preprocessing of the original image; performing three-dimensional modeling and model cutting based on the preprocessed image; the method comprises the following steps: acquiring hydraulic structure point cloud data based on three-dimensional modeling, and then performing plane projection on a detected surface again according to a normal vector of the detected surface to form a re-projection image; performing image cutting and image marking on the collected original image, and training an intelligent crack detection model; and performing crack detection on the cut re-projection image by using the intelligent crack detection model, and splicing the detected images. According to the method, intelligent detection of the large-size slope hydraulic structure is realized, and the precise detection effect of the slender crack on the surface of the hydraulic structure is realized through combination of small-size image cutting, labeling and YOLO series models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing and deep learning technology, and more specifically, it relates to a method for detecting surface cracks in hydraulic structures based on planar projection. Background Technology

[0002] Safety inspection of hydraulic structures is particularly important, as cracks often indirectly reflect other potential problems (such as foundation settlement or material aging), thus possessing early warning value. As a crucial component of national infrastructure, the safety monitoring of hydraulic structures is of paramount importance for safeguarding people's lives and property. However, current surface crack detection technologies for hydraulic structures still have many shortcomings and deficiencies, making it difficult to meet the needs of actual engineering projects.

[0003] In traditional detection methods, crack detection on extremely large sloping structures is prone to system crashes due to insufficient memory caused by the massive model size and extremely high precision of the projected images. Furthermore, traditional methods can only detect cracks from single UAV images or orthophotos, resulting in localized repetitive detection. Additionally, the normal vector of orthophotos is perpendicular to the ground rather than the building surface, leading to significant information loss and hindering accurate target detection on the original building surface. These limitations make it difficult for traditional methods to comprehensively and accurately identify cracks on the surface of hydraulic structures.

[0004] For the detection of slender cracks on the surface of hydraulic structures, traditional manual annotation methods often fail when the crack's middle section is blurry. This is due to visual fatigue or unclear features causing details to be overlooked, leading to continuous annotation of the entire crack. Consequently, the annotation results deviate significantly from the actual crack morphology, affecting the accuracy of subsequent inspections. This annotation distortion problem severely restricts the accuracy and reliability of crack detection.

[0005] At the image processing level, for ultra-large images generated by projection, traditional algorithms can only perform image cropping and stitching, resulting in unsatisfactory merging of detection results and difficulty in ensuring the continuity and completeness of crack detection. Furthermore, traditional detection models are insufficient in capturing minute cracks and adapting to complex crack morphologies, leading to high rates of missed and false detections, which fails to meet the stringent requirements of safety monitoring in hydraulic structures.

[0006] In summary, current surface crack detection technologies for hydraulic structures suffer from numerous problems, including insufficient memory, localized duplicate detection, information loss, labeling distortion, low processing efficiency, and low detection accuracy. These issues severely restrict the efficiency and accuracy of safety monitoring for hydraulic structures, necessitating the development of an efficient, reliable, and precise crack detection method to address these technical challenges. Summary of the Invention

[0007] The purpose of this invention is to provide a method for detecting surface cracks in hydraulic structures based on planar projection, so as to solve at least one of the problems of existing surface crack detection technologies for hydraulic structures, such as insufficient memory, local duplicate detection, information loss, labeling distortion, low processing efficiency, and low detection accuracy.

[0008] To achieve the above objectives, the present invention provides a method for detecting surface cracks in hydraulic structures based on planar projection, comprising the following steps:

[0009] Acquire raw images of the surface of hydraulic structures and preprocess the raw images;

[0010] Based on the preprocessed image, perform 3D modeling and model cropping;

[0011] The point cloud data of the hydraulic structure is obtained based on the model of the three-dimensional modeling, and then the surface to be detected is re-projected according to the normal vector of the surface to be detected to form a reprojected image.

[0012] The original images collected are cropped and annotated to train an intelligent crack detection model;

[0013] The intelligent crack detection model is used to detect cracks in the cropped reprojected image, and the detected images are then stitched together.

[0014] Furthermore, the formation of the reprojected image includes the following steps:

[0015] Obtain the normal vector of each point in the point cloud data within the corresponding region;

[0016] Select the area to be projected onto the hydraulic structure surface as needed, and determine the average point cloud normal vector of all points within the area.

[0017] The reprojected image is formed by projecting the corresponding hydraulic structure facade onto the average point cloud normal vector.

[0018] Furthermore, the training of the intelligent crack detection model includes the following steps:

[0019] When covering the surface of the hydraulic structure under test, samples containing cracks and those without cracks are selected from the original image at a 1:1 ratio to ensure that the samples cover the entire surface of the hydraulic structure under test.

[0020] The samples are uniformly cropped into small-sized images, which are set to 256 pixels × 256 pixels.

[0021] The samples are labeled using a unified labeling rule, and a sample set is generated using labeling software.

[0022] The sample set is divided into a training set and a test set. The YOLOv11 model is used for training, and the model with the best performance on the test set is selected as the intelligent crack detection model.

[0023] Furthermore, the sample set is split into the training set and the test set in an 8:2 ratio.

[0024] Furthermore, the crack detection includes the following steps:

[0025] The reprojected image is cropped to a small size with overlapping areas, and the small size is set to 256 pixels × 256 pixels.

[0026] Based on the intelligent crack detection model, a sliding window detection is performed on the cropped reprojection image. The sliding window detection process is as follows: a 256-pixel x 256-pixel window is taken and slid across the cropped reprojection image with a horizontal overlap rate of 0.2 from left to right and a vertical overlap rate of 0.2 from top to bottom. The size of the cropped reprojection image is the same as the size of the image used to train the intelligent crack detection model.

[0027] For the images that have been detected, stitching and nonmaximum suppression are performed based on their original positions to remove duplicate cracks.

[0028] Furthermore, it includes the following steps:

[0029] The reprojected image is divided into a 256-pixel × 256-pixel grid, and the original cutting position coordinates of each grid are recorded;

[0030] The pre-trained YOLOv11 model is used to perform batch inference on the mesh images, outputting the pixel coordinates, confidence score and category of the crack bounding box, while retaining the mesh index information of each detection result.

[0031] The coordinates of the detection boxes in each grid are transformed from the local coordinate system to the global image coordinate system. Non-maximum suppression is applied to the detection results of overlapping areas to eliminate duplicate detection boxes and retain the crack detection results with the highest confidence.

[0032] The generated detection results are combined with the geographic information of the original reprojected image file to generate a GeoJSON vector file containing the crack location, length, and width.

[0033] Furthermore, the acquisition of the original images includes the following steps: using a drone and a matching high-resolution camera to acquire detailed images of the surface of the hydraulic structure.

[0034] Furthermore, a zigzag route is planned to closely follow the horizontal and vertical surfaces of the hydraulic structures.

[0035] Furthermore, the preprocessing includes the following steps: after completing the acquisition of the original images, photos that are overexposed, have poor clarity, or are severely obscured are deleted, and the surface of the hydraulic structure is re-photographed.

[0036] Furthermore, the 3D modeling includes the following steps: using Context Capture, NAP, or DJI Terra software to perform 3D modeling on the acquired original image; after completing the modeling, using DP Modeler to crop the 3D model and select the surface data to be detected.

[0037] Compared with the prior art, the present invention has the following technical effects:

[0038] This invention presents a method for detecting surface cracks in hydraulic structures based on planar projection. Through 3D modeling, model trimming, reprojection, image trimming, image stitching, and crack merging (removing duplicate cracks), it achieves intelligent detection of extremely large sloping hydraulic structures. Addressing the computational challenges of detecting large models and extremely high-precision projected images, traditional methods are prone to crashing due to insufficient memory. This invention innovatively proposes a "3D modeling → model trimming → reprojection → intelligent detection" technical route, utilizing 3D spatial constraints to optimize 2D detection results, overcoming the limitation of only being able to detect cracks on single UAV images or orthophotos. Traditional methods can only detect cracks on videos or single UAV images, resulting in localized duplicate detection defects. Orthophotos have normal vectors perpendicular to the ground rather than the building surface, losing a significant amount of information and making it impossible to detect targets on the original building surface. This invention's reprojection method overcomes the limitations and redundancy of traditional methods, providing maintenance personnel with intuitive visualizations of crack location, size, and spatial distribution, offering comprehensive support for building monitoring and safety assessment.

[0039] This invention achieves accurate detection of slender cracks on the surface of hydraulic structures by combining small-size image cropping, annotation, and YOLO models. Addressing the distortion caused by blurring in the middle section of slender cracks on hydraulic structures due to manual annotation, this invention innovatively proposes a crack detection method combining small-size image cropping and YOLO model recognition. Traditional manual annotation often overlooks details in the middle section of cracks due to visual fatigue or unclear features, resulting in continuous annotation of the entire crack segment. This leads to a significant deviation between the annotation results and the actual crack morphology, thus affecting subsequent detection accuracy. In contrast, this invention cropps the original image into small sub-images for independent annotation, effectively amplifying the detailed features of the blurred areas. This allows annotators to more accurately identify crack boundaries and avoids the distortion problem of continuous annotation. Based on this, combined with the real-time detection capabilities of the YOLOv11 series models, this invention achieves efficient identification of cracks on the surface of hydraulic structures. Preprocessing with small-size annotations significantly improves the model's sensitivity to blurred areas in the middle section of slender cracks, reducing missed and false detections caused by annotation errors.

[0040] This invention combines a small sliding window with non-maximum suppression technology to achieve efficient and non-redundant detection of cracks on the surface of hydraulic structures. By combining a small sliding window with non-maximum suppression, it innovatively integrates image cropping, stitching, and detection result merging for ultra-large images generated by projection. Compared to the limitations of traditional algorithms that can only perform image cropping and stitching, this invention can perform detection and result fusion for extremely large images in one go using a small sliding window, eliminating the need for repeated cutting and merging. This significantly improves processing efficiency while ensuring the continuity and integrity of crack detection. Furthermore, YOLOv11 exhibits significant advantages over YOLOv5: it employs a more advanced Neck structure design, enhancing the ability to capture minute cracks through cross-scale feature fusion; the optimized Backbone network improves feature extraction efficiency while maintaining lightweight design; and the adaptive anchor box mechanism introduced in YOLOv11 better adapts to the complex crack morphology on the surface of hydraulic structures, improving the detection recall rate by approximately 12% while maintaining a similar accuracy, significantly reducing the false negative rate. This technological breakthrough provides an efficient and reliable solution for safety monitoring of hydraulic structures.

[0041] This invention combines the high maneuverability of UAVs with 3D modeling technology, enabling efficient acquisition of images of hydraulic structures' surfaces and construction of detailed 3D models. After establishing a rough model through an initial flight, precise path planning is performed, achieving adaptive close-up photography of complex slopes and facades of hydraulic structures. This solves the technical challenge of traditional aerial surveying being unable to acquire high-definition images of building sides. Compared to traditional manual inspection, efficiency is increased by more than 10 times, and it can capture millimeter-level crack features. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 A flowchart of a method for detecting surface cracks in hydraulic structures based on planar projection, provided in an embodiment of the present invention;

[0044] Figure 2 The image shows the results of partial crack detection on the surface of a hydraulic structure, provided as an embodiment of the present invention. Detailed Implementation

[0045] To make the technical problem to be solved, the technical solution, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.

[0046] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0047] This invention provides a method for detecting surface cracks in hydraulic structures based on planar projection, the process of which is as follows: Figure 1 As shown, it includes the following steps:

[0048] S1. Image Acquisition and Preprocessing: Acquire raw images of the surface of hydraulic structures and preprocess the raw images;

[0049] S2, 3D Modeling: Based on the preprocessed image, perform 3D modeling and model cropping;

[0050] S3. Planar projection based on normal vectors: The point cloud data of hydraulic structures is obtained based on the 3D model, and then the surface under inspection is re-projected into a plane according to the normal vector of the surface under inspection to form a reprojected image.

[0051] S4. Crack Model Training: Cropping and labeling (labeling crack areas) the acquired original images to train the intelligent crack detection model.

[0052] S5. Crack Detection: The intelligent crack detection model is used to detect cracks in the cropped reprojected image, and the detected images are then stitched together.

[0053] In step S1 above, the acquisition of the original image includes the following steps: using a drone and a matching high-resolution camera to acquire detailed images of the surface of the hydraulic structure. Specifically, based on the structural characteristics of the hydraulic structure, the characteristics of the surrounding environment, and the on-site operating conditions, a specific drone (i.e., selecting the drone based on its load, wind resistance standards, and endurance) and camera (selecting a camera compatible with the drone based on image accuracy requirements) are chosen. An initial flight is conducted over the selected area to establish a rough 3D model, which is then used for detailed path planning. Close-up photographic flights are then performed on the measured surface to acquire high-definition images, such as planning zigzag flight paths close to the horizontal and vertical directions of the hydraulic structure surface.

[0054] Preprocessing includes the following steps: after the original image acquisition is completed, photos that are overexposed, have poor clarity, or are severely obscured are deleted, and the surfaces of hydraulic structures are re-photographed.

[0055] In step S2 above, the 3D modeling includes the following steps: using software such as Context Capture, NAP, or DJITerra to perform 3D modeling on the acquired original image, that is, to perform dense matching and point cloud reconstruction to generate a 3D model with millimeter-level precision; after completing the modeling, using software such as DP Modeler to trim the 3D model to trim redundant areas, retain the detected surface data, and reduce unnecessary computation.

[0056] Since the data collection area must be larger than the area of ​​the hydraulic structure being measured, there will be noise and redundant information after modeling, and it is easy to overload the computer memory. Therefore, in this embodiment of the invention, professional software such as DP Modeler is used to perform three-dimensional trimming of the model and select the parts of the surface to be detected.

[0057] In step S3 above, based on the point cloud data of the clipped model, the average normal vector of the measured surface is calculated. Perspective distortion is eliminated through orthogonal reprojection, generating a planar projection image based on the normal vector, thus maintaining the crack's geometric features at a 1:1 true scale as much as possible. Specifically, the formation of the reprojected image includes the following steps:

[0058] Obtain the normal vector of each point in the point cloud data within the corresponding region;

[0059] Select the area to be projected onto the hydraulic structure surface as needed, and determine the average point cloud normal vector of all points within the area.

[0060] The corresponding hydraulic structure facade is reprojected onto a plane based on the average point cloud normal vector to form a reprojected image.

[0061] In step S4 above, the training of the intelligent crack detection model includes the following steps: For the original dataset of the surface being measured, a certain number of images are randomly selected to cover the entire area. A certain number of UAV images containing cracks are labeled to construct a dataset, and the training set and test set are divided in an 8:2 ratio. Evaluation criteria are set, and the best detection model in the test set is obtained. Specifically, this includes the following steps:

[0062] When covering the surface of the hydraulic structure under inspection, samples with and without cracks are selected from the original image at a 1:1 ratio to ensure that the samples cover the entire surface of the hydraulic structure under inspection.

[0063] The samples are uniformly cropped into small-sized images, which can be set to 256 pixels × 256 pixels.

[0064] The samples are labeled with a uniform small size (e.g., 256 pixels × 256 pixels), and a sample set is generated using labeling software to avoid missing labels or labeling two or more crack segments together.

[0065] The labeled sample set was split into a training set and a test set in an 8:2 ratio. The YOLOv11 (You LookOnly Once) model was used for training, and the model with the best performance on the test set was selected as the intelligent crack detection model.

[0066] In step S5 above, after planar projection based on normal vectors, the original reprojected image is extremely large, which can easily cause computer memory crashes, necessitating cropping. Specifically, crack detection includes the following steps: cropping the reprojected image according to a grid of a certain size, using a trained intelligent crack detection model to perform batch detection on the cropped image, performing non-maximum suppression based on the coordinates of overlapping areas to eliminate duplicate detections, and finally generating a crack distribution vector map with geographic coordinates. Specifically, it includes the following steps:

[0067] The reprojected image is cropped to a smaller size for overlapping areas; the smaller size can be set to 256 pixels × 256 pixels.

[0068] Based on the intelligent crack detection model, a sliding window detection is performed on the cropped reprojection image. The sliding window detection process is as follows: a 256-pixel x 256-pixel window is taken and slid across the cropped reprojection image with a horizontal overlap rate of 0.2 from left to right and a vertical overlap rate of 0.2 from top to bottom. The size of the cropped reprojection image is the same as the size of the image used to train the intelligent crack detection model.

[0069] For the detected images, stitching and non-maximum suppression are performed based on their original positions to remove duplicate cracks. Specifically, based on the detection results of each cropped image and its position in the original image, stitching and non-maximum suppression are applied to obtain the detected image.

[0070] It should be noted that traditional methods have difficulty in handling the detection and visualization of sloping or vertical surfaces. Although the embodiments of this invention have described some specific implementation steps for crack detection on the surface of hydraulic structures, the method of this invention is not limited to certain details in the steps. The target processed by the method of this invention is not limited to sloping or vertical surfaces of buildings, but can also be applied to polyhedral buildings, as well as irregularly shaped buildings such as U-shaped or I-shaped buildings, and can even be applied to buildings with curved facades such as cylinders. The modeling software and trajectory planning software used are not limited to DJI Terra, Context Capture, pix4D, smart3D, NAP, etc.

[0071] The algorithm mentioned in the embodiments of this invention is not limited to this, and can also be other target detection or target segmentation algorithms, etc.; the means of building image acquisition module is not limited to drones, because drones are limited to certain areas and narrow sections, and can also be handheld cameras, vehicle-mounted cameras, robot dogs, or combinations of these image acquisition devices, so as to complete fine modeling.

[0072] Taking the detection of partial cracks on the surface of a hydraulic structure as an example, this invention describes a method for detecting surface cracks in hydraulic structures based on planar projection, specifically including the following steps:

[0073] S1. Image Acquisition and Preprocessing:

[0074] S11. Based on the building's structural characteristics and surrounding environment, select an industry-grade drone (such as the DJI M300 RTK) with a wind resistance rating of ≥5 and a flight time of ≥30 minutes, equipped with at least a 20-megapixel gimbal camera. Set a safe flight altitude based on the height of the hydraulic structure (usually 1.5 times the height of the hydraulic structure), and choose a clear day with no precipitation and wind speed <8m / s between 10:00 and 14:00 for operation.

[0075] Step S12: Obtain the three-dimensional terrain of the survey area and mark the no-fly zone and height-restricted zone. A grid-based segmentation strategy is adopted to divide the large hydraulic structure into multiple aerial survey units, ensuring that each flight covers an area of ​​at least ≤0.2 km², and reserving 15% power redundancy.

[0076] Step S13: In flight path planning software (such as DJI Pilot), determine the flight altitude, ground resolution, flight speed, overlap, and yaw angle, and use a high-resolution imaging drone equipped with a camera of appropriate focal length to take preliminary aerial photos of the surface of the hydraulic structure to obtain preliminary images of the surface of the hydraulic structure.

[0077] Step S14: Select professional UAV image 3D modeling software, import the aerial images from step S13 for aerial triangulation reconstruction, set the output coordinate system (such as CGCS2000), complete the preliminary 3D modeling, and obtain a rough 3D model of the building.

[0078] Step S15: Using the rough 3D model of the building generated in step S14, plan the flight path using professional trajectory planning software (NAP). Based on the structural complexity of the hydraulic structure, automatically generate a variable altitude flight path, maintaining a distance of 20-50 m between the lens and the surface of the hydraulic structure, and fly close to collect original images of the surface of the hydraulic structure.

[0079] Step S16: Manually add no fewer than 5 control points to some key parts (such as corners and eaves) to control the model's planar error. In addition, for areas that are easily obscured or in shadow during the shooting process, take multiple shots from different angles to avoid model distortion or defects.

[0080] S2. 3D Modeling and Model Trimming:

[0081] Step S21, Data Preprocessing: Export the high-resolution images captured by the drone to a computer, and use DJI mapping software or third-party tools (such as Pix4D) for preliminary screening to remove blurry or duplicate images. Simultaneously process POS data (position / attitude information) to ensure data accuracy.

[0082] Step S22, Aerial Triangulation and Point Cloud Generation: Aerial triangulation is performed using photogrammetry software (such as ContextCapture) to establish matching relationships between images and generate a sparse point cloud. Subsequently, a high-precision dense point cloud is generated using a dense matching algorithm, providing foundational data for subsequent modeling.

[0083] Step S23: 3D Mesh Reconstruction, Texture Mapping, and Output: Construct a triangular mesh model based on dense point clouds and adjust the resolution as needed. Perform texture mapping on the model to ensure detail reproduction. Export the model (e.g., OBJ, OSGB, FBX format).

[0084] S3. Plane projection based on normal vector:

[0085] Step S31: Input the detailed 3D model of the building after fine modeling in step S24 into the 3D model visualization software, obtain its point cloud data, and count the normal vector of each point in the set area. The set area is an area where the surface of the hydraulic structure is relatively flat, with few interference objects and a good reconstruction model. Each hydraulic structure facade may have one or more corresponding set areas.

[0086] Step S32: Based on the required reprojection of a certain hydraulic structure facade, select a set area corresponding to the hydraulic structure facade, and calculate the average point cloud normal vector of some or all points within the selected set area.

[0087] Step S33: After solving the average point cloud normal vector of the set area, select any point in the set area to locate the projection plane, thereby obtaining all the parameters of the projection plane.

[0088] Step S34: Project the point cloud of the hydraulic structure facade onto a determined projection plane along the direction of the average point cloud normal vector. For example, a commonly used point cloud library, Point Cloud Library (PCL), can be used for projection to finally form a reprojected surface image perpendicular to the surface of the hydraulic structure.

[0089] S4, Crack Model Training:

[0090] Step S41, Data Labeling and Division: Randomly extract images from the original UAV imagery, ensuring coverage of the target area (including cracked and crack-free areas). Crop the original images into smaller sizes (e.g., 256 pixels × 256 pixels). Using professional software and websites such as LabelImg or MakeSense.ai, manually label the crack locations (rectangular bounding boxes) to construct a labeled dataset. Divide the dataset into training and testing sets at an 8:2 ratio and convert them to YOLO format (e.g., .txt labeled files).

[0091] Step S42: Using the official YOLOv11 configuration file, adjust the input size (e.g., 256 pixels × 256 pixels), number of classes (1 class for cracks), and anchor box parameters. Load the pre-trained weights (e.g., yolov11.pt), train the model on the training set, and set hyperparameters such as learning rate and batch size.

[0092] Step S43: Validate the model on the test set and calculate metrics such as mAP (mean accuracy). Adjust hyperparameters (e.g., learning rate decay, data augmentation strategies) based on the results, and retrain until optimal performance is achieved. Save the optimal model weights for later use.

[0093] S5. Crack Detection:

[0094] S51. Image Mesh Processing: Divide the reprojected image into a 256-pixel × 256-pixel grid, and record the original segmentation coordinates of each grid to ensure consistency with the size of the samples during training. For image patches smaller than the pre-set size, enlarge them to the pre-set size, and then shrink them back to the original size after subsequent detection.

[0095] S52, Batch Model Detection: Use a pre-trained YOLOv11 model to perform batch inference on the grid images, output the pixel coordinates, confidence score and category of the crack bounding box, and retain the grid index information of each detection result.

[0096] S53. Overlapping Area NMS Processing: Transform the coordinates of the detection boxes in each grid from the local coordinate system to the global image coordinate system, perform non-maximum suppression (NMS) on the detection results of the overlapping area (grid boundary), eliminate duplicate detection boxes, and retain the crack detection results with the highest confidence.

[0097] S54. Combine the generated detection results with the geographic information of the original reprojected image file to generate a GeoJSON vector file containing attributes such as crack location, length, and width, thereby visualizing the spatial distribution of cracks. The detection results are as follows: Figure 2 As shown.

[0098] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.

Claims

1. A method for detecting surface cracks in hydraulic structures based on planar projection, characterized in that, Includes the following steps: Acquire raw images of the surface of hydraulic structures and preprocess the raw images; Based on the preprocessed image, perform 3D modeling and model cropping; The point cloud data of the hydraulic structure is obtained based on the model of the three-dimensional modeling, and then the surface to be detected is re-projected according to the normal vector of the surface to be detected to form a reprojected image. The acquired original images are cropped and annotated to train an intelligent crack detection model; The intelligent crack detection model is used to detect cracks in the cropped reprojected image, and the detected images are then stitched together.

2. The method for detecting surface cracks in hydraulic structures based on planar projection as described in claim 1, characterized in that, The formation of the reprojected image includes the following steps: Obtain the normal vector of each point in the point cloud data within the corresponding region; Select the area to be projected onto the surface of the hydraulic structure as required, and determine the average point cloud normal vector of all points within the area. The reprojected image is formed by projecting the corresponding hydraulic structure facade onto the average point cloud normal vector.

3. The method for detecting surface cracks in hydraulic structures based on planar projection as described in claim 1, characterized in that, The training of the intelligent crack detection model includes the following steps: When covering the surface of the hydraulic structure under test, samples containing cracks and those without cracks are selected from the original image at a 1:1 ratio to ensure that the samples cover the entire surface of the hydraulic structure under test. The samples are uniformly cropped into small-sized images, which are set to 256 pixels × 256 pixels. The samples are labeled using a unified labeling rule, and a sample set is generated using labeling software. The sample set is divided into a training set and a test set. The YOLOv11 model is used for training, and the model with the best performance on the test set is selected as the intelligent crack detection model.

4. The method for detecting surface cracks in hydraulic structures based on planar projection as described in claim 3, characterized in that, The sample set is split into the training set and the test set in an 8:2 ratio.

5. The method for detecting surface cracks in hydraulic structures based on planar projection as described in claim 1, characterized in that, The crack detection includes the following steps: The reprojected image is cropped to a small size with overlapping areas, and the small size is set to 256 pixels × 256 pixels. Based on the intelligent crack detection model, a sliding window detection is performed on the cropped reprojection image. The sliding window detection process is as follows: a 256-pixel x 256-pixel window is taken and slid across the cropped reprojection image with a horizontal overlap rate of 0.2 from left to right and a vertical overlap rate of 0.2 from top to bottom. The size of the cropped reprojection image is the same as the size of the image used to train the intelligent crack detection model. For the images that have been detected, stitching and nonmaximum suppression are performed based on their original positions to remove duplicate cracks.

6. The method for detecting surface cracks in hydraulic structures based on planar projection as described in claim 5, characterized in that, Includes the following steps: The reprojected image is divided into a 256-pixel × 256-pixel grid, and the original cutting position coordinates of each grid are recorded; The pre-trained YOLOv11 model is used to perform batch inference on the mesh images, outputting the pixel coordinates, confidence score and category of the crack bounding box, while retaining the mesh index information of each detection result. The coordinates of the detection boxes in each grid are transformed from the local coordinate system to the global image coordinate system. Non-maximum suppression is applied to the detection results of overlapping areas to eliminate duplicate detection boxes and retain the crack detection results with the highest confidence. The generated detection results are combined with the geographic information of the original reprojected image file to generate a GeoJSON vector file containing the crack location, length, and width.

7. The method for detecting surface cracks in hydraulic structures based on planar projection as described in claim 1, characterized in that, The acquisition of the original images includes the following steps: using a drone and a matching high-resolution camera to obtain detailed images of the surface of the hydraulic structure.

8. The method for detecting surface cracks in hydraulic structures based on planar projection as described in claim 6, characterized in that, The plan is to create a zigzag route that runs horizontally and vertically close to the surface of the hydraulic structure.

9. The method for detecting surface cracks in hydraulic structures based on planar projection as described in claim 6, characterized in that, The preprocessing includes the following steps: after the original image acquisition is completed, photos that are overexposed, have poor clarity, or are severely obscured are deleted, and the surface of the hydraulic structure is re-photographed.

10. A method for detecting surface cracks in hydraulic structures based on planar projection as described in any one of claims 1-9, characterized in that, The 3D modeling and model clipping includes the following steps: using Context Capture, NAP, or DJITerra software to perform 3D modeling on the acquired original image; after completing the modeling, using DP Modeler to clip the 3D model and select the surface data to be detected.