EBAPS image defect identification and quantification method and system based on semantic segmentation
By using a semantic segmentation-based method, the problem of high accuracy and high efficiency in EBAPS image defect identification and quantization is solved, achieving accurate identification and comprehensive quantization of minute defects in EBAPS images. This method is applicable to fields such as aerospace remote sensing, night vision imaging, and medical imaging.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies struggle to accurately identify and quantify dark spots, bright spots, and scratches in EBAPS images, and direct deep learning models require high computational resources, while down-resolution processing can result in the loss of critical information.
A semantic segmentation-based approach is adopted. Subgraph datasets are constructed through pixel-level annotation and dataset augmentation. The semantic segmentation model is optimized, and the model is trained using adaptive subgraph cutting and hybrid loss functions. Subgraphs are stitched together using the confidence-grayscale-morphology three criteria to quantify the actual physical size of defects.
It achieves high-precision identification of minute defects in EBAPS images, reduces computing resource requirements, adapts to industrial inspection, provides comprehensive quantitative data support, and has strong model generalization ability.
Smart Images

Figure CN121724930A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to semiconductor imaging device detection technology, in particular to an EBAPS image defect identification and quantification method and system based on semantic segmentation. BACKGROUND
[0002] As a vacuum solid hybrid micro-light detector, Electron Bombarded Active Pixel Sensor (EBAPS) has the advantages of high signal-to-noise ratio, high sensitivity and digital output, and is one of the most promising directions in the field of low-light night vision. However, the working mode of electron bombardment makes it prone to three types of defects: dark spots, bright spots and scratches. These defects will affect the subsequent imaging quality.
[0003] Currently, traditional threshold segmentation and edge detection algorithms have certain limitations and cannot meet the needs of industrial-level high-precision detection. Moreover, when faced with 4096x4096 or even higher resolution EBAPS images, directly inputting the deep learning model for full-image inference requires a huge amount of computing resources, far exceeding the carrying capacity of ordinary industrial equipment; while using reduced resolution processing will lose key information of small defects, leading to missed detection. SUMMARY
[0004] In view of the existing technical defects, the purpose of the present application is to provide an EBAPS image defect identification and quantification method and system based on semantic segmentation, which can realize the detection of EBAPS image defects and obtain the detection results.
[0005] The technical solution for achieving the purpose of the present application is:
[0006] To solve the problem of EBAPS image defect identification, the present application provides an EBAPS image defect identification method, which includes the following steps:
[0007] Step 1, obtaining a high-resolution original image output by an EBAPS device;
[0008] Step 2, pixel-level labeling of the original high-resolution image, construction of a pixel-level labeled dataset containing three types of defects and execution of enhancement;
[0009] Step 3, adaptive cutting of the labeled high-resolution training image into sub-images with 15%-20% overlap rate for model training;
[0010] Step 4, optimizing the semantic segmentation model and training using the cut sub-image dataset, and exporting the completed inference model for deployment;
[0011] Step 5: Cut the image to be tested into sub-images according to the same strategy, use the trained model to identify defects in the sub-images, and then use the confidence-grayscale-morphology three criteria to stitch the sub-images together to restore the complete defect segmentation image.
[0012] Step 6: Obtain the defect and quantify its actual physical size.
[0013] Preferably, in step 2, three types of defect quantification standards are defined:
[0014] Dark spots: The average gray level of the defective area is more than 30% lower than that of the surrounding area;
[0015] Highlight: The average gray level of the defective area is more than 30% higher than that of the surrounding normal area;
[0016] Scratches: The average gray level of scratches is more than 30% lower than that of the surrounding normal area, and the shape is linear.
[0017] Annotators perform initial identification and annotation based on the visual saliency of defects. The system then automatically calculates the grayscale ratio and verifies the annotation results according to the quantification standards to ensure they conform to the definition. It outputs a single-channel mask label image (0 = normal area, 1 = dark spot, 2 = bright spot, 3 = scratch) and a JSON format label mapping file. Dataset augmentation: The dataset is expanded using grayscale perturbation, Gaussian noise addition, and geometric transformations to ensure that the mask label image transforms synchronously with the image, maintaining the authenticity of defect features.
[0018] Preferably, in step 3, when the image resolution is >1024×1024, a sliding window method is used for segmentation, with the sub-image size set to ≤1024×1024, the overlap rate set to 15%-20%, and the window step size calculated. ,in The width of the subgraph. The overlap rate. (Generation) Each subplot is plotted and its coordinate offset from the original plot is recorded. When cutting, prioritize avoiding cutting scratches with a length of ≥50 pixels into ≥3 segments, and ensure that the scratch retains ≥2 / 3 of its linear length in the sub-image.
[0019] Preferably, in step 4, SAM is selected as the base model, leveraging its high-resolution detail capture capability and few-sample segmentation advantage of the ViT backbone network. The pre-trained weights of the base model ViT-H / ViT-B backbone network are frozen, and only the segmentation head is customized. The original binary classification output layer is changed to a four-class classification output layer, and the Softmax activation function is used to output the probability distribution of each pixel belonging to the four categories of normal region, dark spot, bright spot, and scratch. A channel-spatial-morphological attention module is embedded between the convolutional layer and the fully connected layer of the segmentation head. During the implementation process, the feature weight of the defect region is increased by 1.5 to 2.5 times compared with the normal region through element-wise multiplication feature fusion, and the feature weight of the linear region of the scratch is increased by an additional 1.2 times, ensuring that narrow and long strip scratches are not missed in complex backgrounds, thus enhancing the model's sensitivity to the recognition of EBAPS small gray-scale anomalies.
[0020] Preferably, the attention module is implemented by outputting feature maps from the backbone network. Channel branches generate channel weights through global average pooling and fully connected layers. To enhance the spatial localization weights of defective regions, the spatial branch generates spatial weights through 1×1 convolution and sigmoid. ,right A 16-directional Gabor filter bank is applied to extract multi-directional linear edge features and output a linear response map. ,based on Adaptive threshold for calculating local variance Generate shape weights ,Will , , Element-wise multiplication yields the joint weight. Enhanced feature maps This simultaneously enhances the linear features of scratches and the grayscale features of blocky defects, which are then input into a fully connected layer to complete 4-class classification prediction.
[0021] Preferably, in step 4, the dataset is divided into a training set and a validation set in an 8:2 ratio, and a third-order mixture loss function is used to balance classification accuracy, region matching degree, and morphological constraints.
[0022] ;
[0023] in, For cross-entropy weight loss, For Dice weight loss, The morphological loss weights are: CrossEntropyLoss (to optimize pixel-level category classification accuracy), DiceLoss (Dice loss) (to improve the overlap of defect region segmentation, especially to enhance the learning of small-sized scratches), and MorphLoss (morphological loss) (to constrain the linear morphological features of scratches).
[0024] The AdamW optimizer was used, with an initial learning rate of 1e-4. The learning rate was gradually reduced to fine-tune the parameters and avoid overfitting. The ONNX format model was exported for inference, outputting the defect category label and prediction confidence (0~1) for each pixel.
[0025] Preferably, in step 5, based on the sub-image segmentation of the image to be tested in step 3, the trained model is used to identify sub-image defects, and then the overlapping areas are processed using a "confidence-grayscale-morphology three-criteria fusion strategy" to achieve sub-image stitching. For overlapping pixels... If the labels of the two sub-images are consistent, they are directly retained; if the labels are inconsistent, when the confidence difference is >0.1, the higher confidence label is used; when the confidence difference is ≤0.1, the final label is determined by referring to the matching degree between the pixel's grayscale value and the defect labeling rule, and the morphological parameters of the connected component where the pixel is located are extracted. For the stitched defect segmentation image, an additional linear defect coherence check is performed. All regions predicted as scratches are scanned, and for scratch segments cut by the sub-images, the orientation deviation and grayscale consistency of adjacent segments are calculated; if the coherence condition is met, they are merged into the same connected component, and the overall aspect ratio is recalculated to avoid a single scratch being misjudged as multiple scratches due to cutting.
[0026] Preferably, in step 6, an 8-neighborhood connected component analysis algorithm is used to scan the complete defect segmentation map. Differentiated labeling is performed on different types of defects. For labels 1 (dark spots) and 2 (bright spots), block-shaped connected regions are directly labeled, and the number of independent individuals is counted. For label 3 (scratches), connected regions that meet the "morphological constraints" are first filtered, and then the number of independent individuals is counted. The pixel pitch value p of the EBAPS device is obtained. If the specifications do not provide calibration, use a standard scale plate for calibration, then use known dimensions. Scale plate imaging, sub-pixel edge detection, and pixel count statistics. ,calculate Calibration accuracy ≤ 0.1 For dark spots, the area of defective pixels is statistically analyzed for bright spots. Converted to actual area For scratches, the pixel length and pixel width need to be calculated separately.
[0027] An EBAPS image defect recognition and quantization system based on semantic segmentation, comprising:
[0028] The dataset construction unit acquires high-resolution original images output by EBAPS devices to obtain a dataset. It performs pixel-level annotation on the original images, constructs a pixel-level annotation dataset containing three types of defects, and performs dataset augmentation. It adaptively cuts the high-resolution training images labeled in the training set into sub-images according to a set overlap rate to construct a sub-image dataset.
[0029] The image defect detection model construction and training unit constructs an image defect detection model based on a semantic segmentation model and trains it using a sub-image dataset.
[0030] The defect detection image processing unit labels and segments the image to be tested output by the EBAPS device into sub-images, uses a trained image defect detection model to identify defects in the sub-images, obtains the defect category label and prediction confidence of each sub-image, and then uses the confidence-grayscale-morphology three criteria to stitch the sub-images together to restore the complete defect segmentation image.
[0031] The output unit obtains the defects in the complete defect segmentation image and quantifies the actual physical size of the defects.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] High defect recognition accuracy: Through "attention module + hybrid loss function", it can recognize EBAPS subpixel level and weak contrast defects;
[0034] High processing efficiency adaptability: Supports adaptive sub-image cutting, reduces video memory requirements after high-resolution image cutting, and can directly process low-resolution images to meet industrial inspection needs.
[0035] Comprehensive Quantification Dimensions: Achieves "Quantity-Physical Size" quantification, directly linking image defects with the physical performance of EBAPS devices, providing data support for root cause analysis of failures;
[0036] Low data requirements: Based on the transfer learning strategy, only 50 to 100 labeled images are needed to train a high-precision model, solving the industry pain point of scarce defective samples in EBAPS, and the model has strong generalization ability. Attached Figure Description
[0037] Figure 1 This is a flowchart of the method for identifying defects in EBAPS images according to the present invention.
[0038] Figure 2 The types of EBAPS image defects identified in this invention.
[0039] Figure 3 This is a schematic diagram of the semantic segmentation model structure. Specific implementation methods
[0040] The present invention will be described in detail below with reference to specific examples. These examples will be helpful to those skilled in the art.
[0041] This invention is provided to further understand the invention, but is not intended to limit the invention in any way. It should be noted that those skilled in the art can make various changes and modifications without departing from the concept of the invention. These all fall within the scope of protection of this invention.
[0042] This invention discloses an EBAPS image defect identification and quantization method based on semantic segmentation, such as... Figure 1 As shown, it includes the following steps:
[0043] Step 1: Acquire the device output image using the EBAPS imaging system. The imaging scene is a dark room with uniform lighting (illuminance 10). -4 (lx, simulating a low-light detection environment) to obtain defect sample images of different batches of devices, with a single image resolution of 1280×1024 pixels.
[0044] Step 2: Use Label to perform pixel-level annotation on the image, such as... Figure 2 Strictly adhere to the three categories of defect quantification standards:
[0045] Dark spots: The average gray level of the defective area is more than 30% lower than that of the surrounding area;
[0046] Highlight: The average gray level of the defective area is more than 30% higher than that of the surrounding normal area;
[0047] Scratches: The average gray level of scratches is more than 30% lower than that of the surrounding normal area, and the shape is linear.
[0048] The preprocessed images are annotated at the pixel level using an annotation tool, generating two types of files for each image: ① a single-channel mask label image; ② a JSON label mapping file.
[0049] Expand the dataset according to the enhancement method:
[0050] Grayscale perturbation: Only the Mask label is adjusted by ±5% grayscale, while the grayscale of the defect area remains unchanged;
[0051] Gaussian noise: Add Gaussian noise with σ=0.5~1.0;
[0052] Geometric transformations: Perform 90° / 180° / 270° rotations and horizontal / vertical flips to ensure the mask transforms in sync with the image.
[0053] Step 3: The acquired image resolution is 1280×1024. The image is segmented using the sliding window method with an overlap rate of 17%. The window step size is calculated. ,( The width of the subgraph. (overlap rate) The image is cut twice, with a resolution of 850 pixels.
[0054] Step 4, as follows Figure 3 SAM was selected as the base model, leveraging its high-resolution detail capture capability and few-sample segmentation advantage of the ViT backbone. The pre-trained weights of the ViT-H / ViT-B backbone were frozen, and only the segmentation head was customized. The original binary classification output layer was changed to a four-class classification output layer, and a Softmax activation function was used to output the probability distribution of each pixel belonging to one of the four categories: normal region, dark spot, bright spot, and scratch. A channel-spatial-morphological attention module was embedded between the convolutional layer and the fully connected layer of the segmentation head. During implementation, an element-wise multiplication feature fusion method was used to increase the feature weight of defective regions by 1.5 to 2.5 times compared to normal regions, and the feature weight of linear scratch regions was further increased by 1.2 times, ensuring that narrow, long scratches were not missed in complex backgrounds, thus enhancing the model's sensitivity to EBAPS small gray-scale anomalies.
[0055] Step 5: The attention module is implemented by outputting feature maps to the backbone network. Channel branches generate channel weights through global average pooling and fully connected layers. To enhance the spatial localization weights of defective regions, the spatial branch generates spatial weights through 1×1 convolution and sigmoid. ,right A 16-directional Gabor filter bank (0°, 22.5°, 45°, 67.5°, 90°, 112.5°, 135°, 157.5°, 180°, 202.5°, 225°, 247.5°, 270°, 292.5°, 315°, 337.5°) is applied to extract multi-directional linear edge features and output a linear response map. ,based on Adaptive threshold for calculating local variance Generate shape weights ,Will , , Element-wise multiplication yields the joint weight. Enhanced feature maps This simultaneously enhances the linear features of scratches and the grayscale features of blocky defects, which are then input into a fully connected layer to complete 4-class classification prediction.
[0056] Step 6: Divide the dataset into training and validation sets in an 8:2 ratio, and use a third-order mixture loss function to balance classification accuracy, region matching degree, and morphological constraints.
[0057] It is 0.6. It is 0.4. With a value of 0.2, CrossEntropyLoss optimizes pixel-level category classification accuracy, DiceLoss improves the overlap of defect region segmentation, especially enhancing the learning of small-sized scratches, and MorphLoss constrains the linear morphological features of scratches.
[0058] The MorphLoss morphological loss function constrains the linear morphology of the predicted scratch region by analyzing its geometric features. The specific calculation includes:
[0059]
[0060]
[0061] Let be the length of the longer side of the smallest bounding rectangle of the scratch skeleton. The length of the shorter side of the smallest bounding rectangle of the scratch skeleton. =10 -6 Ensure the denominator is greater than 0.
[0062] The AdamW optimizer was used, with an initial learning rate of 1e-4. The learning rate was gradually reduced to fine-tune the parameters and avoid overfitting. The model was exported in ONNX format for inference, outputting the defect category label and prediction confidence for each pixel.
[0063] Step 7: Segment the image to be tested into sub-images, use the trained model to identify defects in the sub-images, and then use a "confidence-grayscale-morphology three-criteria fusion strategy" to process overlapping areas, thus achieving sub-image stitching. The "confidence-grayscale-morphology three-criteria fusion strategy" is used to process overlapping pixels. If the labels of the two sub-images are consistent, they are directly retained; if the labels are inconsistent, the higher confidence label is used when the confidence difference is >0.1, and double verification is performed when the confidence difference is ≤0.1. The final label is determined by referring to the matching degree between the pixel's grayscale value and the defect labeling rule, and the morphological parameters of the connected component where the pixel is located are extracted. For the stitched defect segmentation image, an additional linear defect coherence check is performed. All regions predicted as scratches are scanned, and for scratch segments cut by the sub-images, the orientation deviation and grayscale consistency of adjacent segments are calculated; if the coherence condition is met, they are merged into the same connected component, and the overall aspect ratio is recalculated to avoid a single scratch being misjudged as multiple scratches due to cutting.
[0064] Step 8: Using the 8-neighborhood connected component analysis algorithm, scan the complete defect segmentation map. Perform differentiated labeling on different types of defects. For labels 1 (dark spots) and 2 (bright spots), directly label block-shaped connected regions and count the number of independent individuals. For label 3 (scratches), first filter connected regions that meet the "morphological constraints," and then count the number of independent individuals. The pixel pitch value of the EBAPS device is p=9.76. For dark spots, the area of defective pixels is statistically analyzed for bright spots. Converted to actual area For scratches, the pixel length and pixel width need to be calculated separately.
[0065] This invention also provides an EBAPS image defect recognition and quantization system based on semantic segmentation, comprising:
[0066] The dataset construction unit acquires high-resolution original images output by EBAPS devices to obtain a dataset. It performs pixel-level annotation on the original images, constructs a pixel-level annotation dataset containing three types of defects, and performs dataset augmentation. It adaptively cuts the high-resolution training images labeled in the training set into sub-images according to a set overlap rate to construct a sub-image dataset.
[0067] The image defect detection model construction and training unit constructs an image defect detection model based on a semantic segmentation model and trains it using a sub-image dataset.
[0068] The defect detection image processing unit labels and segments the image to be tested output by the EBAPS device into sub-images, uses a trained image defect detection model to identify defects in the sub-images, obtains the defect category label and prediction confidence of each sub-image, and then uses the confidence-grayscale-morphology three criteria to stitch the sub-images together to restore the complete defect segmentation image.
[0069] The output unit obtains the defects in the complete defect segmentation image and quantifies the actual physical size of the defects.
[0070] This invention is a defect identification method for EBAPS (Electron Bombardment Active Pixel Sensor) images. It solves the processing bottleneck of high-resolution images through a "sub-image cutting-stitching" mechanism, and adopts a transfer learning strategy of "backbone network freezing + segmentation head fine-tuning" to address the challenge of scarce labeled data. Furthermore, it constructs a customized semantic segmentation and multi-dimensional quantization system for typical EBAPS defects, which can achieve accurate identification of minute defects in EBAPS images. It is applicable to fields with stringent imaging quality requirements, such as aerospace remote sensing, high-energy physics detection, night vision imaging, and medical imaging.
[0071] The specific embodiments described above are merely one implementation of the inventive concept. The scope of protection of the present invention should not be considered as limited to the specific forms described in the embodiments. The scope of protection of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.
Claims
1. A method for EBAPS image defect identification and quantification based on semantic segmentation, characterized in that, include: Step 1: Obtain the high-resolution raw image output by the EBAPS device to obtain the dataset; Step 2: Perform pixel-level annotation on the original image, construct a pixel-level annotated dataset containing three types of defects, and perform dataset augmentation; Step 3: Adaptively cut the labeled high-resolution training images in the training set into sub-images according to the set overlap rate to construct the sub-image dataset; Step 4: Construct an image defect detection model based on a semantic segmentation model and train it using a sub-image dataset; Step 5: Based on Step 2-3, the image to be tested output by the EBAPS device is labeled and cut into sub-images. The trained image defect detection model is used to identify defects in the sub-images to obtain the defect category label and prediction confidence of each sub-image. Then, the sub-images are stitched together using the confidence-grayscale-morphology three criteria to restore the complete defect segmentation image. Step 6: Obtain the defects in the complete defect segmentation image and quantify the actual physical size of the defects.
2. The EBAPS image defect identification and quantization method based on semantic segmentation according to claim 1, characterized in that, The three types of defects mentioned in step 2 include: Dark spots: The average gray level of the defective area is more than 30% lower than that of the surrounding area; Highlight: The average gray level of the defective area is more than 30% higher than that of the surrounding normal area; Scratches: The average gray level of scratches is more than 30% lower than that of the surrounding normal area, and the shape is linear.
3. The EBAPS image defect identification and quantization method based on semantic segmentation according to claim 1, characterized in that, Dataset augmentation includes: expanding the dataset by using grayscale perturbation, adding Gaussian noise, and geometric transformations, while the labeled mask changes synchronously with the images.
4. The EBAPS image defect identification and quantization method based on semantic segmentation according to claim 1, characterized in that, Step 3 specifically includes: when the image resolution is >1024×1024, using the sliding window method for segmentation, setting the sub-image size to ≤1024×1024, the overlap rate to 15%-20%, and calculating the window step size. ,generate Each subplot is plotted and its coordinate offset from the original plot is recorded. When cutting, avoid cutting scratches with a length greater than or equal to 50 pixels into ≥3 segments. Ensure that the scratch retains at least 2 / 3 of its linear length in the sub-image. The width of the subgraph. This represents the overlap rate.
5. The EBAPS image defect identification and quantization method based on semantic segmentation according to claim 1, characterized in that, The image defect detection model uses the SAM semantic segmentation model as its base model. The output layer of the segmentation head in the SAM semantic segmentation model adopts a four-class output layer and uses the Softmax activation function to output the probability distribution of each pixel belonging to the four categories of normal region, dark spot, bright spot and scratch. Channel branch, spatial branch and morphological attention modules are embedded between the convolutional layer and the fully connected layer of the segmentation head. The classification prediction is output through feature fusion by element-wise multiplication.
6. The EBAPS image defect identification and quantization method based on semantic segmentation according to claim 5, characterized in that, The channel branches generate channel weights through global average pooling and a fully connected layer. Spatial branching generates spatial weights through 1×1 convolution and sigmoid. The morphological attention module outputs feature maps to the backbone network. A 16-directional Gabor filter bank is applied to extract multi-directional linear edge features and output a linear response map. Based on linear response plot Adaptive threshold for calculating local variance Generate shape weights ,Will , , Element-wise multiplication yields the joint weight. Enhanced feature maps .
7. The EBAPS image defect identification and quantization method based on semantic segmentation according to claim 6, characterized in that, The loss function used for training the image defect detection model is: ; in, For cross-entropy weight loss, For Dice weight loss, The morphological loss weights are: CrossEntropyLoss (cross-entropy loss), DiceLoss (Dice loss), and MorphLoss (morphological loss). The morphological loss is: ; ; In the formula, Let be the length of the longer side of the smallest bounding rectangle of the scratch skeleton. The length of the shorter side of the smallest bounding rectangle of the scratch skeleton. =10 -6 .
8. The EBAPS image defect identification and quantization method based on semantic segmentation according to claim 1, characterized in that, Step 5 uses a three-criteria approach—confidence level, grayscale, and morphology—to stitch together sub-images. Specifically, this includes processing overlapping pixels... If the labels of the two sub-images are consistent, they are retained directly; if the labels are inconsistent, when the confidence difference is >0.1, the label with higher confidence is adopted; when the confidence difference is ≤0.1, the final label is determined by referring to the matching degree between the pixel grayscale value and the defect labeling rule, and the morphological parameters of the connected component where the pixel corresponding to the final label is located are extracted. For the stitched defect segmentation image, a linear defect coherence check is performed, that is: scan all areas predicted as scratches, calculate the direction deviation and grayscale consistency of adjacent segments for the scratch segments cut by the sub-image; if the consistency meets the set coherence conditions, they are merged into the same connected component and the overall aspect ratio is recalculated.
9. The EBAPS image defect identification and quantization method based on semantic segmentation according to claim 8, characterized in that, Step 6 specifically includes: The 8-neighborhood connected component analysis algorithm is used to obtain the defects in the complete defect segmentation map. The complete defect segmentation map is scanned, and different types of defects are marked differently. For dark spot label 1 and bright spot label 2, block connected regions are directly marked and the number of independent individuals is counted. For scratch label 3, connected regions that meet the morphological constraints are first filtered, and then the number of independent individuals is counted. Obtain the pixel pitch value p of the EBAPS device, calibrate it using a standard scale, and then use the known size... Scale plate imaging, sub-pixel edge detection, and pixel count statistics. ,calculate Calibration accuracy ≤ 0.1 For dark spots, the area of defective pixels is statistically analyzed for bright spots. Converted to actual area For scratches, calculate the pixel length and pixel width.
10. An EBAPS image defect recognition and quantization system based on semantic segmentation, implementing the method of any one of claims 1-9, characterized in that, include: The dataset construction unit acquires high-resolution original images output by EBAPS devices to obtain a dataset. It performs pixel-level annotation on the original images, constructs a pixel-level annotation dataset containing three types of defects, and performs dataset augmentation. It adaptively cuts the high-resolution training images labeled in the training set into sub-images according to a set overlap rate to construct a sub-image dataset. The image defect detection model construction and training unit constructs an image defect detection model based on a semantic segmentation model and trains it using a sub-image dataset. The defect detection image processing unit labels and segments the image to be tested output by the EBAPS device into sub-images, uses a trained image defect detection model to identify defects in the sub-images, obtains the defect category label and prediction confidence of each sub-image, and then uses the confidence-grayscale-morphology three criteria to stitch the sub-images together to restore the complete defect segmentation image. The output unit obtains the defects in the complete defect segmentation image and quantifies the actual physical size of the defects.