Composite material hole tearing defect area automatic measurement method based on yolo11n-seg instance segmentation and camera calibration
Patent Information
- Application Number
- CN202611228429.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-11-03
AI Technical Summary
Existing technologies cannot achieve high-precision segmentation and quantitative measurement of hole tearing defects in carbon fiber composite materials, and lack an end-to-end automated inspection chain, making it difficult to meet the needs of rapid, objective, and quantitative online quality inspection in aerospace production lines.
The method of YOLO11n-seg instance segmentation and camera calibration is adopted. Image distortion is corrected by camera calibration. Combined with two-level mask optimization and pixel equivalent conversion, high-precision pixel segmentation and accurate area calculation of defects are achieved, forming a fully automated detection link.
It achieves high-precision pixel segmentation and accurate area calculation for hole tearing defects in composite materials, with a single image processing time of ≤100ms. It is suitable for quantitative non-destructive testing in aerospace production lines, improving testing efficiency and accuracy.
Smart Images

Figure CN123032776A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of composite material processing quality inspection technology, specifically involving an automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration. Background Technology
[0002] Carbon fiber reinforced composites (CFRP) are widely used in the processing of aerospace structural components due to their lightweight and high strength properties. Hole making is a key processing step for composite components. The processing is prone to hole tearing defects. Tear defects have irregular edges, low contrast, and large size differences, which directly affect the fatigue performance of the components. Quantitative area detection of tear defects is required to complete the quality rating.
[0003] However, existing technologies have the following shortcomings: they rely on manual defect interpretation, resulting in low detection efficiency and inability to adapt to automated production lines; traditional machine vision relies on manually designed features, which leads to poor segmentation results and large measurement errors when faced with complex textures and irregular tear defects in composite materials; existing deep learning instance segmentation technologies can only achieve qualitative defect identification and do not combine with camera calibration to complete quantitative calculation of physical dimensions.
[0004] Defect image acquisition, segmentation and recognition, and geometric parameter measurement are independent of each other, and no end-to-end automated detection link has been formed; the instance segmentation output mask generally suffers from fragmentation and internal hole problems, resulting in large deviations in area measurement; at the same time, there is a lack of an integrated calibration-segmentation-measurement scheme adapted to multi-light and multi-scale tear defects in composite materials, which makes it difficult to meet the needs of rapid, objective, and quantitative online quality inspection in aerospace production lines.
[0005] Therefore, a new method is urgently needed to achieve high-precision segmentation, low-error quantitative calculation of area, and end-to-end automated real-time detection of hole tearing defects in carbon fiber composite materials. Summary of the Invention
[0006] The purpose of this invention is to provide an automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration. This method integrates camera calibration, YOLO11n-seg segmentation and mask two-level optimization to achieve high-precision pixel segmentation and accurate area calculation of hole tearing defects in composite materials. The entire process is automated, with single image processing time ≤100ms, and it is suitable for quantitative non-destructive testing in aerospace production lines.
[0007] To achieve the above objectives, this invention provides an automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration, comprising the following steps: S1. Acquire images of the multi-pose checkerboard calibration plate and the original workpiece image of the carbon fiber composite material hole making. Use Zhang Zhengyou calibration method to solve the camera intrinsic parameters and distortion coefficients, complete all image distortion corrections and calculate pixel equivalent conversion coefficients, and output the distortion correction parameters and pixel equivalents to S2 and S4 simultaneously. S2 receives the distortion correction parameters and multi-gradient brightness hole-making original image output by S1, completes image cropping, hole-position isolation dataset partitioning, pixel-level defect annotation and online data augmentation, builds and trains the YOLO11n-seg lightweight instance segmentation network, and outputs the trained segmentation model weights to S3. S3 receives the segmentation model trained by S2 and the distortion correction parameters output by S1, infers the original defect mask from the corrected image of the workpiece to be tested, performs hole filling and connected component ratio filtering to complete the two-level optimization of the mask, and outputs the optimized complete defect mask to S4. S4 receives the optimized defect mask output by S3 and the pixel equivalent coefficient output by S1, counts the total number of defect pixels and calculates the actual physical area of the defect. Optionally, a regression model can be introduced to compensate for systematic measurement deviations. Alternatively, offline accuracy verification can be performed, and the original defect area, the compensated accurate area, and optional accuracy evaluation indicators can be output to S5 simultaneously. S5 receives the physical area of the defect output by S4, the optimized defect mask contour output by S3, and the coordinate information of the image of the workpiece to be tested. It integrates the defect positioning coordinates, closed contour, and physical area to generate a standardized detection data package. After completing the full-process time-consuming verification, it outputs the structured defect detection results to the production line's upper-level quality control system.
[0008] Preferably, in S1, the pixel equivalent satisfies the following conversion formula: ; In the formula, In pixel equivalents, in units ; The actual physical side length of each square in the chessboard. This represents the average pixel distance between the corner points of adjacent chessboard squares.
[0009] Preferably, in S1, a 12×9 checkerboard calibration board is used, with the physical side length of the squares being... Collect 30 to 40 calibration images in different poses. After calibration, the average reprojection error is ≤0.2 pixels. Distortion correction calls the undistortImage function, and the correction is based on the camera intrinsic parameter matrix, radial distortion coefficient, and tangential distortion coefficient.
[0010] Preferably, in S2, image acquisition and dataset partitioning satisfy the following constraints: The light source brightness ranges from 60 to 240, divided into 10 brightness levels with a step size of 20. Each hole corresponds to 10 images with different brightness levels. The image size after correction is 1201×1201 pixels. The dataset is divided in a ratio of 8:1:1 between the training set and the validation set. Each hole position is used as the dividing unit, and all images of the same hole position are assigned to a single subset. Model training configuration constraints: The optimizer used is AdamW, the initial learning rate is set to 0.001, the learning rate adopts a cosine decay strategy, and the number of early stopping rounds is set to 15 rounds; the metrics of the trained segmentation model meet the following requirements: mask mAP@0.5≥0.99, bounding box and mask recall ≥0.999.
[0011] Preferably, in S3, the two-level mask optimization satisfies the following constraints: The closing operation uses a disk-shaped structuring element with a radius of 2. It first performs an expansion operation followed by an erosion operation. This closing operation only brings... The average area perturbation of the defects; The criteria for filtering connected components are as follows: retain connected components whose area ratio with the largest connected component in the mask is ≥1%, and remove fragmented connected components whose area ratio is less than 1%; the total area ratio of residual fragments is ≤1%.
[0012] Preferably, in S4, the actual physical area of the defect satisfies the following calculation formula: ; In the formula, The actual physical area of the defect, in units ; To optimize the total number of pixels in the defect area within the mask; The pixel equivalent obtained by S1 calibration, in units .
[0013] Preferably, S4 also includes using a pre-calibrated regression compensation model to... Make corrections to obtain the accurate area after compensation, and then output the accurate area after compensation to S5 simultaneously.
[0014] Preferably, in S5, the process processing time meets the following constraints: The total time for completing the entire operation of distortion correction, model reasoning, mask optimization, pixel statistics, and area conversion for a single workpiece image is ≤100ms. The standardized output includes three types of structured data: defect pixel location coordinates, smooth and complete defect mask outline, and converted or compensated physical area of the defect. The output data package is connected to the production line quality control system to complete the hole quality grading judgment.
[0015] Therefore, the present invention employs the above-mentioned automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration. Compared with the prior art, the technical solution of the present invention has the following beneficial effects: (1) This invention uses the YOLO11n-seg lightweight instance segmentation network, combined with multi-brightness gradient image acquisition and online multi-dimensional data enhancement to construct a dedicated dataset. It achieves pixel-level accurate segmentation for low contrast, irregular edges and multi-scale features of hole tearing defects in carbon fiber composite materials. The mask mAP@0.5 is not less than 0.99, and the defect bounding box and mask recall rate is ≥0.999, which effectively solves the problems of insufficient feature extraction in traditional visual algorithms and missed detection of small defects in deep learning methods. (2) The present invention first completes the global distortion correction of the camera through Zhang Zhengyou calibration method to eliminate the size deviation caused by lens distortion; then designs a two-level mask optimization process to fill the internal holes of the mask with low disturbance and adaptively filter fragmented noise; combined with pixel equivalent conversion and error compensation model, accurately calculates the real physical area of tearing defects, solves the defect of measurement distortion caused by mask jaggedness and fragments, and significantly improves the measurement stability of small and irregular tearing defects. (3) This invention integrates the entire process of camera calibration, dataset construction, model reasoning, mask optimization, and area calculation to form an integrated automated detection link without the need for manual intervention in intermediate links; the lightweight network combined with the simplified post-processing algorithm can complete the processing of a single workpiece image in no more than 100ms, and can be directly deployed on the automated hole-making production line of aerospace composite materials to achieve rapid, objective, quantitative, and non-destructive detection of defects.
[0016] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0017] Figure 1 This is a flowchart of an embodiment of the present invention, which is based on YOLO11n-seg instance segmentation and camera calibration for automatic measurement of the area of composite material hole tearing defects. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Unless otherwise defined, the technical or scientific terms used in the present invention should have the ordinary meaning understood by those skilled in the art.
[0019] Example 1 like Figure 1 As shown, this embodiment provides an automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration. It should be understood that the specific parameters, models and protocols mentioned in this embodiment are only examples to help those skilled in the art understand the present invention, and are not intended to limit the present invention.
[0020] The present invention provides an automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration, comprising the following steps: S1. Receive the acquired multi-pose checkerboard calibration plate image and the original image of the hole-making process of carbon fiber composite material. Solve the internal and external distortion coefficients of the camera based on Zhang Zhengyou calibration method, complete the distortion correction of the full image and calculate the pixel equivalent conversion reference coefficient.
[0021] Calculated distortion correction parameters and pixel equivalents The data is passed to steps S2 and S4, which are used for dataset image preprocessing and defect physical area conversion, respectively.
[0022] This step employs a combined approach of global uniform distortion correction and pixel scale calibration. Unlike the simpler approach that calibrates only a single measurement image, this step solves for the universal correction parameters in one go, eliminating the systematic dimensional interference of lens radial and tangential distortion on segmentation contours and area statistics from the source.
[0023] The calibration was completed based on 30-40 12×9 chessboard images with different positions and orientations. All images were uniformly corrected based on the undistortImage function. The pixel equivalent was calculated based on the pixel distance between the chessboard corner points and the actual side length.
[0024] The formula for converting pixels to equivalent pixels is as follows: ; In the formula, In pixel equivalents, in units ; The actual physical side length of each square in the chessboard. This represents the average pixel distance between the corner points of adjacent chessboard squares.
[0025] Calibration constraints: Collect 30-40 images of a 12×9 checkerboard calibration board, including the physical side length of each square. After calibration and nonlinear optimization, the average reprojection error is ≤0.2 pixels.
[0026] Distortion correction implementation logic: Based on the solved camera intrinsic parameter matrix and radial distortion coefficient Tangential distortion coefficient The undistortImage function is called to perform uniform distortion correction on all calibration images and workpiece hole images, removing image stretching and deformation caused by lens distortion.
[0027] Corner pixel distance calculation logic: The coordinates of the corner points within the checkerboard pattern are detected frame by frame in the calibrated image. The pixel spacing between the corner points of all adjacent squares is calculated and the average value is taken as the result. Substituting into the formula yields the fixed pixel equivalent. .
[0028] Complete the entire process of calibration, correction, and scale conversion in batches; output general distortion correction parameters and fixed pixel equivalent coefficients. This provides a unified physical scale benchmark for dataset construction and quantitative measurement of defects; S2: Receive the distortion correction parameters output by S1 and the original CFRP hole-making image acquired by multi-gradient brightness acquisition, and complete image cropping, dataset partitioning, pixel-level annotation and online enhancement training of lightweight instance segmentation model; the weight file of the trained high-precision segmentation model is passed to step S3 for the inference output of the defect mask of the workpiece image under test.
[0029] This step employs a joint training scheme that uses hole-isolation dataset partitioning and online enhancement under multiple illuminations. Unlike traditional dataset segmentation schemes that randomly shuffle samples, this step avoids data leakage across subsets of similar images with the same hole, significantly improving the model's ability to generalize and identify low-contrast, multi-scale tearing defects.
[0030] The process of image preprocessing, dataset partitioning, annotation transformation, and model training is performed separately, including the following sub-steps: S201: Call the distortion correction parameters output by S1 to perform distortion correction on all original images of the hole. Crop the central area of the corrected image to obtain a uniform 1201×1201 pixel effective image containing only the hole tear defect. The LED ring light source collects the brightness range of the original image from 60 to 240, sets 10 brightness levels with a step size of 20, and 10 different illumination samples for each hole.
[0031] S202. Using a single borehole position as the smallest unit of division, the overall sample is allocated as follows: 80% for the training set, 10% for the validation set, and 10% for the test set. All 10 multi-brightness images corresponding to the same borehole position are constrained to be assigned to the same data subset only. The same borehole sample is prohibited from being distributed across the training / validation / test sets to eliminate data leakage.
[0032] S203. Use the LabelMe tool to draw polygonal pixel-level annotation contours for internal hole tearing defects in the image, and batch convert the annotation JSON files into YOLO segmentation model compatible TXT files. The files store the defect category number and the normalized polygon vertex coordinate sequence.
[0033] S204. Real-time image enhancement without offline storage is performed during model training iterations. Enhancement strategies include ±180° random rotation, horizontal / vertical flipping, random scaling, brightness and contrast perturbation, mosaic blending enhancement, and expansion of defect morphology and lighting sample diversity.
[0034] S205. Construct a lightweight instance segmentation network, YOLO11n-seg, and load publicly available pre-trained weights to perform transfer learning. The optimizer is AdamW, with an initial learning rate of 0.001, and a cosine decay strategy is used to dynamically adjust the learning rate. A 15-round early stopping mechanism is set, and training is terminated if the accuracy of the validation set mask and bounding boxes does not improve for 15 consecutive rounds. The optimal model weights that meet the accuracy threshold are selected, with the constraints being that the mask mAP@0.5 ≥ 0.99 and the recall rate of defective bounding boxes and masks ≥ 0.999.
[0035] The optimal model network weights and image standardized size parameters are stored uniformly; invalid samples with extreme lighting distortion are filtered out, and only valid training samples that are suitable for production line conditions are retained.
[0036] The output YOLO11n-seg model weight file and image normalization preprocessing parameters that meet the high-precision segmentation index are used as the sole network input for defect mask inference in step S3. S3: Receive the YOLO11n-seg segmentation model output from S2, the distortion correction parameters output from S1, and the corrected image of the workpiece to be tested. After the model inferences and outputs the original defect mask, perform morphological two-level noise reduction optimization. The optimized complete and fragment-free defect mask is passed to step S4 for total defect pixel statistics and physical area conversion.
[0037] This step employs a joint optimization scheme combining low-perturbation closing operation filling and connected component area ratio screening. Unlike traditional morphological processing schemes that rely solely on opening and closing operations, this step only introduces... Average area deviation preserves the true edge size of defects to the greatest extent possible, while simultaneously eliminating mask holes and fragmentation noise.
[0038] The mask hole filling and debris noise filtering are performed separately, including the following sub-steps: S301. Input the distortion-corrected image of the hole to be tested into the YOLO11n-seg model. The forward inference outputs the original binary mask containing the pixel region of the tear defect. The original mask contains internal micro-holes, edge jaggedness, and scattered micro-fragment noise.
[0039] S302. Construct a disk-shaped morphological structure element with a radius of 2, and perform a closing operation (dilation followed by erosion) on the original defect mask to fill the discrete micro-holes inside the mask; preliminary experiments have verified that the closing operation under these parameters only causes the average area of the defect to be affected. Minor offsets will not erode the true boundary of the defect's outer contour.
[0040] S303. Extract all eight-connected pixel regions of the mask after the closing operation, and calculate the pixel area of each connected region. Based on the area of the largest connected region in the mask, calculate the area ratio of the remaining connected regions to the largest connected region, retain only the connected regions with an area ratio of ≥1%, merge the filtered effective connected regions into a single complete defect mask, and directly remove fragmented noise regions with a ratio of less than 1%.
[0041] Output a complete, standardized defect mask image free of internal holes and tiny debris noise, which serves as the basic input for pixel statistics and area conversion in step S4.
[0042] S4, Receive the optimized complete defect mask output from S3, and the pixel equivalent coefficient output from S1. The total number of pixels in the mask defect is counted and the actual physical area of the defect is calculated by combining the pixel equivalent. A regression model can be optionally introduced to complete the systematic error compensation.
[0043] The calculated original defect area and the compensated accurate physical area are transferred to step S5 for the integrated output of the detection results.
[0044] This step employs a combined calculation scheme of total mask pixel statistics, pixel equivalent square conversion, and regression error compensation. Unlike the simple conversion scheme with a fixed pixel-area ratio, this step corrects for deviations caused by overestimation of small defects and underestimation of large defects, significantly improving the stability of quantitative measurement of irregular tear defects. An optional offline accuracy verification step is added to facilitate measurement error assessment during the algorithm development stage. This sub-step can be skipped when the production line is running online.
[0045] The regionprops function is used to count the total number of defective pixels. The pixel area is converted to the physical area based on the square of the pixel equivalent. The systematic measurement bias is corrected based on the pre-calibrated regression model.
[0046] The formula for converting the physical area of defects is as follows: ; In the formula, The actual physical area of the defect, in units ; To optimize the total number of pixels in the defect area within the mask; The pixel equivalent obtained by S1 calibration, in units .
[0047] Total pixel statistics logic: The `regionprops` function is called to iterate through all pixels of the optimized defect mask, summing the number of pixels in all valid connected components within the mask to obtain the total number of global defect pixels. .
[0048] Error compensation constraint logic: Preliminary experiments were conducted to construct a linear regression compensation model, with the original converted area as input. Output accurate area after compensation Systematic biases are corrected for both minor and large-area tear defects to reduce relative measurement errors.
[0049] In scenarios without compensation, output can be performed directly. Regression compensation output is enabled in high-precision quantitative detection scenarios. .
[0050] The entire process of batch pixel statistics, area conversion, and deviation compensation is completed; the original pixel area of the defect and the accurate physical area value after compensation are output, providing quantitative parameters for the generation of a complete inspection report in step S5.
[0051] S5 receives the physical area of the defect output from S4, the optimized defect mask contour output from S3, and the coordinate information of the image of the workpiece under test, and integrates the three types of detection parameters—defect location, contour, and area—to generate standardized detection results.
[0052] The complete set of test data can be transmitted to the host computer production line quality control system for the classification and determination of composite material hole-making quality.
[0053] This step integrates the entire process of image correction, model inference, mask optimization, and area calculation into a single package for output. Unlike traditional detection solutions that output fragmented intermediate data in segments, this step uniformly encapsulates all qualitative and quantitative defect information, adapting to the data interaction needs of automated production lines.
[0054] The three types of core detection information are summarized in a fixed time sequence, and the total time consumed for a single image processing step of the entire process is calculated to complete the real-time verification.
[0055] Constraints on the total time consumption of a single graph: The total time for the complete link of image distortion correction, model mask inference, two-level mask optimization, pixel statistics and area conversion is ≤100ms, which meets the production line's online real-time detection cycle.
[0056] The standardized output content includes three types of information: 1. Pixel coordinate localization of tear defects within a 1201×1201 aperture image; 2. Optimized closed contour coordinate sequence of mask without jagged edges or fragmentation defects; 3. The actual physical area of the defect after pixel equivalent conversion / regression compensation.
[0057] Industrial cameras perform frame-by-frame detection and data encapsulation according to the production line acquisition frequency; output standardized structured defect detection data packages, directly connect to the production line's automated quality control platform, and complete rapid quantitative non-destructive detection of composite material hole tearing defects.
[0058] Therefore, this invention adopts the above-mentioned automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration. This method integrates camera calibration, YOLO11n-seg segmentation and mask two-level optimization to achieve high-precision pixel segmentation and accurate area calculation of hole tearing defects in composite materials. The whole process is automated, and the single image processing time is ≤100ms, which is suitable for quantitative non-destructive testing in aerospace production lines.
[0059] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. An automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration, characterized in that, Includes the following steps: S1. Acquire images of the multi-pose checkerboard calibration plate and the original workpiece image of the carbon fiber composite material hole making. Use Zhang Zhengyou calibration method to solve the camera intrinsic parameters and distortion coefficients, complete all image distortion corrections and calculate pixel equivalent conversion coefficients, and output the distortion correction parameters and pixel equivalents to S2 and S4 simultaneously. S2 receives the distortion correction parameters and multi-gradient brightness hole-making original image output by S1, completes image cropping, hole-position isolation dataset partitioning, pixel-level defect annotation and online data augmentation, builds and trains the YOLO11n-seg lightweight instance segmentation network, and outputs the trained segmentation model weights to S3. S3 receives the segmentation model trained by S2 and the distortion correction parameters output by S1, infers the original defect mask from the corrected image of the workpiece to be tested, performs hole filling and connected component ratio filtering to complete the two-level optimization of the mask, and outputs the optimized complete defect mask to S4. S4 receives the optimized defect mask output by S3 and the pixel equivalent coefficient output by S1, counts the total number of defect pixels and calculates the actual physical area of the defect. Optionally, a regression model can be introduced to compensate for systematic measurement deviations. Alternatively, offline accuracy verification can be performed, and the original defect area, the compensated accurate area, and optional accuracy evaluation indicators can be output to S5 simultaneously. S5 receives the physical area of the defect output by S4, the optimized defect mask contour output by S3, and the coordinate information of the image of the workpiece to be tested. It integrates the defect positioning coordinates, closed contour, and physical area to generate a standardized detection data package. After completing the full-process time-consuming verification, it outputs the structured defect detection results to the production line's upper-level quality control system.
2. The automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration according to claim 1, characterized in that, In S1, the pixel equivalent satisfies the following conversion formula: ; In the formula, In pixel equivalents, in units ; The actual physical side length of each square in the chessboard. This represents the average pixel distance between the corner points of adjacent chessboard squares.
3. The automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration according to claim 2, characterized in that, In S1, a 12×9 checkerboard calibration board is used, with the physical side length of the squares... Collect 30 to 40 calibration images in different poses. After calibration, the average reprojection error is ≤0.2 pixels. Distortion correction calls the undistortImage function, and the correction is based on the camera intrinsic parameter matrix, radial distortion coefficient, and tangential distortion coefficient.
4. The automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration according to claim 3, characterized in that, In S2, image acquisition and dataset partitioning satisfy the following constraints: The light source brightness range is 60 to 240, divided into 10 brightness levels with a step size of 20. Each hole corresponds to 10 images with different brightness levels. The image is cropped to 1201×1201 pixels after correction. The dataset is divided in a ratio of 8:1:1 between the training set and the validation set, with each hole location serving as the unit of division. All images of the same hole location are assigned to a single subset. Model training configuration constraints: The optimizer used is AdamW, the initial learning rate is set to 0.001, the learning rate adopts a cosine decay strategy, and the number of early stopping rounds is set to 15. The trained segmentation model meets the following metrics: mask mAP@0.5≥0.99, bounding box and mask recall≥0.
999.
5. The automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration according to claim 4, characterized in that, In S3, the two-level mask optimization satisfies the following constraints: The closing operation uses a disk-shaped structuring element with a radius of 2. It first performs an expansion operation followed by an erosion operation. This closing operation only brings... The average area perturbation of the defects; The criteria for filtering connected components are as follows: retain connected components whose area ratio with the largest connected component in the mask is ≥1%, and remove fragmented connected components whose area ratio is less than 1%; the total area ratio of residual fragments is ≤1%.
6. The automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration according to claim 5, characterized in that, In S4, the actual physical area of the defect satisfies the following calculation formula: ; In the formula, The actual physical area of the defect, in units ; To optimize the total number of pixels in the defect area within the mask; The pixel equivalent obtained by S1 calibration, in units .
7. The automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration according to claim 6, characterized in that, S4 also includes the use of a pre-calibrated regression compensation model for... Make corrections to obtain the accurate area after compensation, and then output the accurate area after compensation to S5 simultaneously.
8. The automatic measurement method for the area of hole tearing defects in composite materials based on YOLO11n-seg instance segmentation and camera calibration according to claim 7, characterized in that, In S5, the process processing time meets the following constraints: The total time for completing the entire operation of distortion correction, model reasoning, mask optimization, pixel statistics, and area conversion for a single workpiece image is ≤100ms. The standardized output includes three types of structured data: defect pixel location coordinates, smooth and complete defect mask outline, and converted or compensated physical area of the defect. The output data package is connected to the production line quality control system to complete the hole quality grading judgment.
9. A computer device, characterized in that, include: A processor configured to be coupled to a memory, read and execute instructions and / or program code in the memory to perform the method as described in any one of claims 1-8.
10. A computer-readable medium, characterized in that, The computer-readable medium stores computer program code that, when executed on a computer, causes the computer to perform the method as described in any one of claims 1-8.
