Aluminum profile surface defect detection method and system

Through the HIE-YOLO model of the bidirectional feature pyramid network structure, the problem of insufficient detection accuracy of surface defects of aluminum profiles is solved, and efficient identification of defects of small sizes and small background differences is achieved, which improves detection accuracy and quality control.

CN120374595APending Publication Date: 2025-07-25CRRC QINGDAO SIFANG CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510571813.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing aluminum profile surface defect detection algorithm has insufficient detection accuracy and is difficult to identify defects with small size and small background differences, resulting in missed inspections occur frequently.

Method used

The HIE-YOLO model with a bidirectional feature pyramid network structure is used to detect surface defects of aluminum profiles. Through multi-level feature extraction and fusion of backbone network, neck network and head network, combined with the HardSwish activation function and Equalised Focal loss loss function, the detection accuracy is improved.

Benefits of technology

It significantly improves the accuracy of surface defect detection of aluminum profiles, can quickly and accurately identify various defects, improve quality control level and reduce production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120374595A_ABST
    Figure CN120374595A_ABST
Patent Text Reader

Abstract

The invention provides an aluminum profile surface defect detection method and system. The method comprises the following steps: acquiring an aluminum profile surface image to be subjected to defect detection; inputting an aluminum profile surface image to be subjected to defect detection into a pre-trained HIE-YOLO model to obtain an aluminum profile surface defect detection result output by the HIE-YOLO model; the pre-trained HIE-YOLO model adopts a bidirectional feature pyramid network structure, and the HIE-YOLO model is obtained based on training of an aluminum profile surface defect training sample; inputting an aluminum profile surface image to be subjected to defect detection into the backbone network for feature extraction to obtain multi-level image features output by the backbone network; inputting the multi-level image features into a neck network for feature fusion to obtain fused features output by the neck network; and inputting the fused features into a head network for target detection to obtain an aluminum profile surface defect detection result output by the head network. According to the method, the detection precision of the surface defects of the aluminum profile can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of detection technologies, and provides a method and a system for detecting surface defects of aluminum profiles. Background Art

[0002] Aluminum profiles are widely used in many high-end fields such as aerospace, automotive manufacturing, shipbuilding industry, and military industry. However, during its production process, due to the combined influence of multiple factors such as mechanical wear and manufacturing process complexity, various defects such as scratches, dents, and stains are likely to appear on the surface of aluminum profiles. Although relevant detection algorithms have been put into use currently, these algorithms generally have the problem of insufficient detection accuracy, and it is often difficult to accurately identify defects with small sizes and subtle color differences from the background, resulting in frequent missed detections. Therefore, it is urgent to develop an aluminum profile surface defect detection algorithm that can efficiently and accurately identify small-size defects and small-background-difference defects. Summary of the Invention

[0003] The present invention provides a method and a system for detecting surface defects of aluminum profiles to solve the defect of insufficient detection accuracy of surface defects of aluminum profiles in the prior art. The present invention can significantly improve the detection accuracy of surface defects of aluminum profiles.

[0004] The present invention provides a method for detecting surface defects of aluminum profiles, including: obtaining a surface image of an aluminum profile to be defect-detected; inputting the surface image of the aluminum profile to be defect-detected into a pre-trained HIE-YOLO model to obtain a surface defect detection result of the aluminum profile output by the HIE-YOLO model; wherein, the pre-trained HIE-YOLO model adopts a bidirectional feature pyramid network structure, and the HIE-YOLO model is trained based on training samples of aluminum profile surface defects; the step of inputting the surface image of the aluminum profile to be defect-detected into the pre-trained HIE-YOLO model to obtain the surface defect detection result of the aluminum profile output by the HIE-YOLO model further includes: inputting the surface image of the aluminum profile to be defect-detected into a backbone network for feature extraction to obtain multi-level image features output by the backbone network; inputting the multi-level image features into a neck network for feature fusion to obtain fused features output by the neck network; and inputting the fused features into a head network for object detection to obtain the surface defect detection result of the aluminum profile output by the head network.

[0005] According to an aluminum profile surface defect detection method provided by the present invention, the backbone network includes an input module, a feature focusing module, a CBH module, a CSP module, and an SPP module; the input module is used to receive an input image; the feature focusing module is used to perform downsampling and channel expansion on the input image, and extract and integrate image features; the CBH module is used to extract local features through convolution operations, and enhance the non-linear feature representation by using batch normalization and the HardSwish activation function; the CSP module is used to optimize the feature extraction process through cross-stage partial connection; the SPP module is used to extract features through multi-scale pooling kernels to expand the receptive field.

[0006] According to an aluminum profile surface defect detection method provided by the present invention, the neck network includes an SE module, a CBH module, an upsampling module, a B-Concat module, and a CSP module; the SE module is used to adaptively adjust the feature weights between channels to enable the fusion of features at different levels; the upsampling module is used to perform upsampling operations on the features to improve the resolution of the feature map; the B-Concat module is used to splice feature maps from different layers or different paths.

[0007] According to an aluminum profile surface defect detection method provided by the present invention, the SE module is specifically used for: compressing the initial feature map of each channel into a scalar through global average pooling operation to obtain a channel descriptor; according to the channel descriptor, learning the dependence relationship between channels through two fully connected layers and a non-linear activation function, and generating channel weights; performing channel-wise feature recalibration on the initial feature map according to the channel weights to obtain a feature map with recalculated channel weights.

[0008] According to an aluminum profile surface defect detection method provided by the present invention, the two-way feature pyramid network structure performs cross-layer feature fusion through the SE attention mechanism, and uses channel information to guide the HIE-YOLO model to extract and weight-learn the surface defect feature information of aluminum profiles.

[0009] According to an aluminum profile surface defect detection method provided by the present invention, the HIE-YOLO model adopts the HardSwish activation function and the Equalised Focal loss function; the HardSwish activation function is: , wherein, x is the input value; ReLU6 is the activation function used to limit the input value within the range of [0, 6]; The Equalised Focal loss function is: , Among them, is the probability value predicted by the model; is the class balance factor, is the hard example mining factor, is the number of samples of the current class, is the gradient balance factor.

[0010] The present invention also provides an aluminum profile surface defect detection system, including: an image acquisition module for acquiring an aluminum profile surface image to be defect-detected; a detection module for inputting the aluminum profile surface image to be defect-detected into a pre-trained HIE-YOLO model to obtain an aluminum profile surface defect detection result output by the HIE-YOLO model; wherein, the pre-trained HIE-YOLO model adopts a bidirectional feature pyramid network structure, and the HIE-YOLO model is trained based on aluminum profile surface defect training samples; the step of inputting the aluminum profile surface image to be defect-detected into the pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model further includes: inputting the aluminum profile surface image to be defect-detected into a backbone network for feature extraction to obtain multi-level image features output by the backbone network; inputting the multi-level image features into a neck network for feature fusion to obtain fused features output by the neck network; and inputting the fused features into a head network for target detection to obtain the aluminum profile surface defect detection result output by the head network.

[0011] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, it implements the aluminum profile surface defect detection method as described in any one of the above.

[0012] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the aluminum profile surface defect detection method as described in any one of the above.

[0013] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the aluminum profile surface defect detection method as described in any one of the above.

[0014] An aluminum profile surface defect detection method and system provided by the present invention, the method comprising: acquiring a surface image of an aluminum profile to be defect-detected; inputting the surface image of the aluminum profile to be defect-detected into a pre-trained HIE-YOLO model to obtain an aluminum profile surface defect detection result output by the HIE-YOLO model; the pre-trained HIE-YOLO model adopts a bidirectional feature pyramid network structure, and the HIE-YOLO model is trained based on aluminum profile surface defect training samples; inputting the surface image of the aluminum profile to be defect-detected into a backbone network for feature extraction to obtain multi-level image features output by the backbone network; inputting the multi-level image features into a neck network for feature fusion to obtain fused features output by the neck network; inputting the fused features into a head network for object detection to obtain an aluminum profile surface defect detection result output by the head network. The present invention can significantly improve the detection accuracy of aluminum profile surface defects. Description of the Drawings

[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0016] Figure 1 It is a schematic flowchart of the aluminum profile surface defect detection method provided by the present invention.

[0017] Figure 2 It is a schematic structural diagram of the HIE-YOLO model provided by the present invention.

[0018] Figure 3 It is a schematic principle diagram of the bidirectional feature pyramid network structure provided by the present invention.

[0019] Figure 4 It is a schematic diagram of the detection comparison result of paint bubble defect detection.

[0020] Figure 5 It is a schematic diagram of the detection comparison result of spray flow defect detection.

[0021] Figure 6 It is a detection effect diagram of the HIE-YOLO model provided by the present invention for detecting paint bubble defects.

[0022] Figure 7 It is a detection effect diagram of the HIE-YOLO model provided by the present invention for detecting dirt point defects.

[0023] Figure 8 It is a detection effect diagram of the HIE-YOLO model provided by the present invention for detecting spray flow defects.

[0024] Figure 9 It is a schematic structural diagram of the aluminum profile surface defect detection system provided by the present invention.

[0025] Figure 10 It is a schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners

[0026] The following further describes the implementation manners of the present invention in detail in conjunction with the accompanying drawings and embodiments. The following embodiments are used to illustrate the present invention, but cannot be used to limit the scope of the present invention.

[0027] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of the aluminum profile surface defect detection method provided by the present invention.

[0028] The present invention provides an aluminum profile surface defect detection method, including: 101: Obtain the surface image of the aluminum profile to be defect-detected; 102: Input the surface image of the aluminum profile to be defect-detected into the pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model; wherein, the pre-trained HIE-YOLO model adopts a bidirectional feature pyramid network structure, and the HIE-YOLO model is trained based on aluminum profile surface defect training samples; inputting the surface image of the aluminum profile to be defect-detected into the pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model further includes: inputting the surface image of the aluminum profile to be defect-detected into the backbone network for feature extraction to obtain multi-level image features output by the backbone network; inputting the multi-level image features into the neck network for feature fusion to obtain the fused features output by the neck network; inputting the fused features into the head network for object detection to obtain the aluminum profile surface defect detection result output by the head network.

[0029] In order to solve the technical problems existing in the prior art, the present invention provides an aluminum profile surface defect detection method. First, a high-resolution industrial camera is used to collect images of the aluminum profile surface to obtain the surface image of the aluminum profile to be defect-detected. The camera is installed at the detection station of the aluminum profile production line to ensure that all areas of the aluminum profile surface can be clearly photographed. When collecting images, the aluminum profile passes through the field of view of the camera at a certain speed, and the camera takes multiple images at a fixed frequency to cover the entire surface of the aluminum profile. In order to improve the image quality, a uniform lighting device is used in the detection area to avoid uneven brightness of the image caused by uneven light, which affects the subsequent defect detection effect.

[0030] Input the surface image of the aluminum profile to be defect-detected into the pre-trained HIE-YOLO (Hypergraph Enhanced-You Only Look Once) model. This model adopts a bidirectional feature pyramid network structure, which can effectively extract multi-level features in the image, obtain the aluminum profile surface defect detection results, and thus improve the accuracy of defect detection. The HIE-YOLO model is trained based on a large number of aluminum profile surface defect training samples. For example, the Alibaba Cloud Tianchi Big Data Aluminum Profile Surface Defect Dataset can be selected, which has a total of ten surface defects, including regular size defects, small size defects, and small background difference defects. Among them, regular size defects include six types: non-conductive, corner bottom leakage, orange peel, bottom leakage, pitting, and miscellaneous color; small size defects include two types: dirty spots and paint bubbles; small background difference defects include two types: scratched and sprayed flow. Small size defects and small background difference defects account for about 40% of the aluminum profile surface defect dataset. The ratio of training samples to test samples is 8:2.

[0031] The HIE-YOLO model is mainly composed of three parts: the backbone network, the neck network, and the head network. This structural design aims to achieve efficient and accurate object detection through multi-level feature extraction, feature fusion, and object detection. Each part of the network in the HIE-YOLO model collaborates with each other to jointly achieve efficient and precise object detection.

[0032] The backbone network is responsible for extracting multi-level image features from the input surface image of the aluminum profile to be defect-detected. The features extracted by the backbone network are input into the neck network for further processing and fusion. The backbone network adopts deep convolutional neural networks, such as ResNet, Darknet, etc. These network structures have strong feature extraction capabilities and can provide rich feature information for the subsequent detection heads. Through a series of convolutional layers, pooling layers, and activation functions, the low-level information (such as edges and textures) and high-level semantic information of the image are gradually extracted.

[0033] The neck network is the core part of the HIE-YOLO model. The neck network receives the multi-level feature maps from the backbone network and converts these feature maps into more discriminative feature representations through feature fusion and enhancement operations. These feature representations are then input into the head network for object detection. The neck network realizes the fusion and enhancement of features at different scales through structures such as the Feature Pyramid Network (FPN) and the Bidirectional Feature Pyramid Network (BiFPN). The neck network usually includes multiple feature fusion modules and feature enhancement modules. For example, BiFPN fuses feature maps at different scales through top-down and bottom-up bidirectional paths; the CSP2 and CBH modules are used to further extract and enhance features. The head network is responsible for object detection based on the feature maps output by the neck network.

[0034] The head network receives the feature representations from the neck network and performs object detection based on these feature representations. The detection results include the category and location information of the objects, which can be directly used in subsequent application scenarios. The head network usually consists of two parts: a classification head and a regression head, which are used to predict the category and location information of the objects respectively. The classification head maps the feature map to the category space through fully connected layers or convolutional layers and outputs the probability distribution of each category; the regression head maps the feature map to the location space through regression layers and outputs the exact location of each candidate box.

[0035] The detection results of the aluminum profile surface defects output by the HIE-YOLO model can be displayed to the operator through a visualization interface for timely discovery and handling of defects. At the same time, the detection results can also be stored in a database for subsequent quality analysis and statistics. For the detected defects, corresponding handling measures can be taken according to the type and severity of the defects, such as marking, repairing, or scrapping.

[0036] Through the above embodiments, the aluminum profile surface defect detection method of the present invention can quickly and accurately detect various defects on the surface of aluminum profiles, improve the quality control level of aluminum profiles, and reduce production costs.

[0037] Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of the HIE-YOLO model provided by the present invention.

[0038] As a preferred embodiment, the backbone network includes an input module, a feature focusing module, a CBH module, a CSP module, and an SPP module; the input module is used to receive the input image; the feature focusing module is used to perform downsampling and channel expansion on the input image and extract and integrate image features; the CBH module is used to extract local features through convolution operations and enhance the non-linear feature representation using batch normalization and the HardSwish activation function; the CSP module is used to optimize the feature extraction process through cross-stage partial connections; the SPP module is used to extract features through multi-scale pooling kernels to expand the receptive field.

[0039] In this embodiment, the backbone network may sequentially include an input module, a feature focusing module, a (CBH + CSP1) × 2 combination module, a CBH + CSP1 combination module, and a CBH + SPP + CSP2 combination module. The data flow can be referred to the HIE-YOLO model structure diagram.

[0040] The size of the surface image of the aluminum profile to be defect-detected is, for example, 660 pixels in height and 640 pixels in width, and it has three color channels. This image provides the original data for the backbone network, affecting feature extraction, determining the input layer configuration, and influencing the network performance. The input module is the interface part where the backbone network receives external data or information. The input module plays the role of "receiving information" in the HIE-YOLO model and is the starting point for the model to perceive the external world, extract features, and learn. In the input module, the surface image of the aluminum profile to be defect-detected may undergo some preprocessing operations, such as resizing, normalization, and data augmentation (such as random cropping, flipping, color transformation, etc.). These preprocessing operations help improve the generalization ability and detection performance of the model.

[0041] The feature focusing module in the HIE-YOLO model plays the roles of downsampling and channel expansion, feature extraction and integration, improving the model efficiency, and maintaining feature diversity. These roles together enhance the performance, efficiency, and stability of the model. Specifically, the feature focusing module downsamples the input image (usually by halving the spatial resolution) while expanding the number of channels. This operation helps reduce the computational amount while retaining the important feature information in the image. For example, if the size of the input image is 640×640×3, after being processed by the feature focusing module, the output size may become 320×320×12 (the specific values may vary depending on the model implementation). The feature focusing module extracts and integrates the features of the input image through specific convolutional operations (such as slicing and splicing). This operation helps the model learn more rich and representative features in the subsequent layers. Through downsampling and channel expansion, the feature focusing module reduces the number of pixels that the model needs to process, thereby reducing the computational complexity. At the same time, the expanded number of channels enables the model to capture more feature information and improves the expressive ability of the model. Although the feature focusing module performs downsampling, it retains the feature diversity in the input image through specific operation methods (such as slicing and splicing). This enables the model to utilize these diverse features for more accurate detection and classification in the subsequent structure.

[0042] The (CBH + CSP1) × 2 combination module represents the repetition of (Convolutional Block with Hard Activation and Batch Normalization + CSP1 module) twice. Here, CBH represents a convolutional block with Batch Normalization and the HardSwish activation function, while CSP1 represents a specific CSP (Cross Stage Partial) module structure. The CBH module extracts local features through convolutional operations and enhances the non-linear expression ability using Batch Normalization and the HardSwish activation function, making the feature maps richer and more diverse. The CSP module effectively reduces the computational amount through partial dense connections and cross-stage connections while maintaining the diversity of feature maps. As a variant of the CSP module, CSP1 further optimizes the feature transfer and fusion process, making the feature representation more compact and effective. By repeating the (CBH + CSP1) structure twice, the model can further extract and enhance features, making the feature representation more robust and discriminative. This combined structure helps the model capture target features more accurately in complex backgrounds, improving the detection accuracy and robustness. Through repeated stacking, the model can learn more complex and abstract feature representations, thus enhancing the overall performance. The design purpose of the CSP module is to reduce computational redundancy and improve computational efficiency. In the (CBH + CSP1) × 2 combination module, this advantage is further reflected, enabling the model to have high real-time performance while maintaining high performance.

[0043] The conversion of symbol ① from the (CBH + CSP1) × 2 combination module to the CBH + CSP1 combination module means that the model reduces the number of repeated structures. This helps to reduce the computational complexity, the number of model parameters, and the computational amount. While maintaining high performance, it improves the real-time performance and efficiency of the model. Although the number of repetitions is reduced, the model still maintains strong feature extraction ability through the CBH + CSP1 structure. This benefits from the convolutional and activation operations of the CBH module, as well as the optimized feature extraction and transfer mechanism of the CSP1 module.

[0044] The HIE-YOLO model adopts a modular design, making the model structure more flexible and extensible. The conversion from (CBH + CSP1) × 2 to CBH + CSP1 reflects this flexibility in the model's structure. According to the task requirements and dataset characteristics, the model's structure and parameters can be conveniently adjusted to achieve optimal performance. This conversion enables the model to adapt to tasks of different scales and complexities. For simple tasks, the number of repetitions can be reduced to lower the computational complexity; for complex tasks, the number of repetitions can be increased to improve the feature extraction ability. In the (CBH + CSP1) × 2 stage, the model conducts preliminary feature fusion through two repeated structures. After converting to the CBH + CSP1 stage, the model continues to perform feature fusion through the CSP1 module, enabling feature information at different levels to communicate and complement each other. The CSP1 module optimizes the feature transfer process through cross-stage partial connections, allowing feature information to be effectively transferred between different layers. This helps the model learn more complex and abstract feature representations, improving detection accuracy and robustness.

[0045] The conversion of symbol ② from the CBH + CSP1 combined module to the CBH + SPP + CSP2 combined module can enhance the feature extraction and fusion capabilities, expand the receptive field and multi-scale feature extraction, optimize the model structure and computational efficiency, and improve the model generalization ability and robustness. In both stages, the CBH module is responsible for convolution, hard activation, and batch normalization operations, extracting local features of the image and enhancing the non-linear expression ability through the hard activation function. The CSP1 module optimizes the feature extraction and transmission process through cross-stage partial connections. Based on the CSP1 module, the CSP2 module may adopt a more complex connection strategy or more stages, further enhancing the feature extraction and fusion capabilities. The CSP2 module can more effectively utilize the feature information of different stages, improving the robustness and discriminability of features. The SPP (Spatial Pyramid Pooling) module extracts features through multiple pooling kernels of different scales, capturing information at different scales in the image, significantly expanding the receptive field of the model. This helps the model better handle objects of different sizes, capture feature information in a larger range, contribute to detecting larger-sized objects, and improve the detection accuracy and robustness. The output of the SPP module is combined with the CBH module and the CSP2 module to form a richer feature representation. Despite the introduction of the SPP module and the possibly more complex CSP2 module, the HIE-YOLO model maintains a high computational efficiency through reasonable module combination and parameter settings. The designs of both the SPP module and the CSP module help reduce computational redundancy and improve the real-time performance of the model. By introducing the SPP module and upgrading the CSP module, the model can extract more diverse and discriminative features. This helps the model perform better on unseen data and improves the model generalization ability. The CBH + SPP + CSP2 structure enables the model to better adapt to object detection tasks in complex scenarios. Whether it is small objects, large objects, or objects of different scales, the model can achieve accurate detection through multi-scale feature extraction and fusion.

[0046] As a preferred embodiment, the neck network includes an SE module, a CBH module, an upsampling module, a B-Concat module, and a CSP module; the SE module is used to adaptively adjust the feature weights between channels to enable the fusion of features at different levels; the upsampling module is used to perform upsampling operations on the features to increase the resolution of the feature map; the B-Concat module is used to splice the feature maps from different layers or different paths.

[0047] As a preferred embodiment, the SE module is specifically configured to: compress the initial feature map of each channel into a scalar through global average pooling operation to obtain a channel descriptor; learn the dependencies between channels through two fully connected layers and a non-linear activation function according to the channel descriptor, and generate channel weights; perform channel-wise feature recalibration on the initial feature map according to the channel weights to obtain the feature map after recalculating the channel weights.

[0048] In this embodiment, the neck network is located between the backbone network and the head network, and is responsible for further processing the features extracted by the backbone network and generating feature maps suitable for use by the head network. The neck network may sequentially include an SE+CBH combined module, an upsampling module, a B-Concat module, a CSP2+CBH module, an upsampling module, a B-Concat module, a CSP2 module, a CBH module, a B-Concat module, a CSP2 module, a CBH module, a B-Concat module, and a CSP2 module. The data flow can refer to the HIE-YOLO model structure diagram.

[0049] The SE (Squeeze-and-Excitation) module adaptively recalibrates the feature responses between channels, emphasizes important features, and suppresses unnecessary features. After the SE module, the CBH module is used again for convolution, hard activation, and batch normalization operations to further extract and refine features. The conversion from CBH+SPP+CSP2 to SE+CBH enables the model to perform deeper processing and fine-tuning on the features extracted by the backbone network, enhancing the feature fusion ability of the neck network. The SE module adaptively adjusts the feature weights between channels, enabling the model to pay more attention to the features useful for the detection task, so that features at different levels can be better fused together to form a richer and more discriminative feature representation, which helps the head network to more accurately identify target objects, thereby improving the detection accuracy and efficiency. Specifically, the SE module first compresses the feature map of each channel into a scalar through global average pooling operation to obtain a channel descriptor: , where, is the input feature map, is the channel descriptor, H is the feature map X is the height of the feature map, W is the feature map X is the width of the feature map, is the value of the feature map X at the position , i is the row index, j is the column index.

[0050] Then, the dependencies between channels are learned through two fully connected layers (FC) and non-linear activation functions (such as ReLU and Sigmoid), and channel weights are generated: , where and are the weights of the fully connected layer, is the reduction ratio, is the ReLU activation function, is the Sigmoid function, and the output is the importance weight of each channel.

[0051] Finally, the channel weights are multiplied by the initial feature map to achieve feature recalibration between channels: , The finally output is the feature map after recalculating the channel weights.

[0052] Introducing the SE module into the neck network enables the model to adaptively adjust the importance of features and enhance the ability to extract key features. This helps the model to more accurately identify target objects in complex backgrounds, improving the robustness and accuracy of detection.

[0053] The upsampling module has the functions of improving the resolution of the feature map, multi-scale feature fusion, preserving feature information, and meeting the requirements of the head network. The upsampling module converts the low-resolution feature map into a high-resolution feature map. In the HIE-YOLO model, the backbone network usually extracts multi-scale feature maps, but the resolution of these feature maps may be low, which is not conducive to subsequent detection tasks. Therefore, it is necessary to perform upsampling operations to increase the resolution of the feature map. The upsampling module usually uses interpolation algorithms (such as bilinear interpolation, nearest neighbor interpolation, etc.) or transposed convolution (also known as deconvolution) to achieve the improvement of the feature map resolution. In object detection tasks, multi-scale feature fusion is the key to improving detection accuracy. The upsampling module increases the resolution of the low-resolution feature map so that it can be fused with the high-resolution feature map. This fusion helps the model capture target information at different scales and improves the detection ability for small and dense targets. For example, in the HIE-YOLO model, the upsampling module may be used in conjunction with other modules (such as the CSP module, CBH module, etc.) to form a complex feature fusion network. When performing upsampling operations, the upsampling module tries to keep the information in the feature map from being lost. Through a reasonable design of interpolation algorithms or transposed convolution, it can be ensured that the upsampled feature map still contains rich semantic information and detailed information. These retained information is crucial for the subsequent detection head, and it can use this information for more accurate classification and localization. The head network usually requires an input feature map of a fixed size or a higher resolution for object detection. The upsampling module increases the resolution of the feature map so that it can meet the input requirements of the detection head. By providing a high-resolution feature map, the upsampling module helps the detection head more accurately identify the position and category of the target object, thereby improving the overall detection performance.

[0054] The B-Concat (Batch Concatenation) module is a bidirectional feature concatenation module. The main function of the B-Concat module is to concatenate feature maps from different layers or different paths. In the HIE-YOLO model, the concatenation of feature maps is a key step in achieving multi-scale feature fusion. The B-Concat module can concatenate along the channel dimension (i.e., the depth direction of the feature map), merging multiple feature maps into a larger one. This concatenation method helps to retain the information in different feature maps and increase the richness and diversity of the feature maps. By concatenating feature maps of different scales, the B-Concat module enables the model to utilize both the high-resolution information of low-level feature maps and the rich semantic information of high-level feature maps simultaneously. This fusion helps the model capture object information at different scales and improves the detection ability for small and dense objects. For example, in the HIE-YOLO model, the B-Concat module may concatenate feature maps from different stages of the backbone network and the neck network to form a more comprehensive and discriminative feature representation. By concatenating feature maps from different sources, the B-Concat module can integrate more information into the model, thus enhancing the model's expressive ability. The concatenated feature map contains richer feature information, which helps the model learn more complex and abstract feature representations, improving detection accuracy and robustness. The head network usually requires an input feature map containing rich feature information for object detection. The B-Concat module provides a more comprehensive and discriminative input for the detection head by concatenating different feature maps. This comprehensive feature input helps the head network more accurately identify the location and category of the target object, thus improving the overall detection performance. The B-Concat module can fuse feature maps from different sources to form a new feature representation. This fusion not only retains the information in the original feature maps but also adds new feature information and diversity, enabling the model to learn richer and more discriminative feature representations.

[0055] The CSP2+CBH combined module can further refine and optimize the initially extracted features to form a more complete and discriminative feature representation. This refined feature representation helps the model achieve better performance in subsequent detection tasks. The CSP2 module is the second generation or improved version of the Cross Stage Partial Network, which is used to optimize the feature extraction and transmission process. Through cross-stage partial connections, the CSP2 module can more effectively utilize the feature information of different stages, improving the robustness and discriminability of the features. The CSP2 module reduces computational redundancy through a partial connection strategy while retaining important feature information, improving the real-time performance of the model. This helps the model better transmit and fuse features in the neck network. The CBH module represents the combined operation of Convolution, Batch Normalization, and Hard-swish Activation, which is the basic module for feature extraction. The CBH module is responsible for initial feature extraction, capturing local features in the image through convolution operations, batch normalization accelerating training and stabilizing the model performance, and the hard activation function increasing the non-linear expression ability. In the neck network, the CSP2+CBH combined module can process feature maps from different scales, enabling the model to better adapt to multi-scale object detection tasks. By cooperating with other modules (such as UPSample, B-Concat, etc.), the CSP2+CBH combined module can form a complex feature fusion network, further improving the model's multi-scale object detection ability.

[0056] The CSP2 module can intelligently divide the feature map into different parts, and process and fuse them separately. This intelligent sorting and processing method enables the model to more efficiently utilize feature information, improving detection performance and real-time performance. The CSP2 module divides the feature map into two parts through cross-stage partial connection. One part is directly passed to the subsequent stage, and the other part is fused after further processing. This strategy reduces computational redundancy while retaining important feature information. The CSP2 module can more effectively utilize feature information at different stages, improving the robustness and discriminability of features. The CSP2 module enables the model to learn richer and more discriminative feature representations through complex connection strategies. This helps the model to more accurately identify target objects in subsequent detection tasks. By optimizing the feature extraction and transmission process, the CSP2 module can significantly improve the detection accuracy of the model, especially when dealing with complex backgrounds and dense targets. The design of the CSP2 module helps to reduce the computational amount and improve the real-time performance of the model. This is particularly important for application scenarios that require rapid response. Through the partial connection strategy, the CSP2 module can more efficiently fuse feature information at different stages, reducing unnecessary computational overhead. The CSP2 module can process feature maps from different scales, enabling the model to better adapt to multi-scale object detection tasks. By adjusting the ratio and method of partial connection, the CSP2 module can flexibly combine feature information at different stages to adapt to different detection requirements.

[0057] In this embodiment, the head network includes a convolutional module (CONV, Convolutional) that extracts key features in the image through convolutional operations. These features are then used in subsequent classification or regression tasks to help the model accurately identify the target object and predict its bounding box. The convolutional module performs local perception and feature extraction on the input features by sliding the convolutional kernel over the feature map. In the head network of the HIE-YOLO model, the convolutional module further processes the feature map from the neck network to extract more refined and discriminative features. The convolutional module generates a new feature map through the dot product operation between the convolutional kernel and the feature map. Parameters such as the size, stride, and padding method of the convolutional kernel determine the details of the convolutional operation and the effect of feature extraction. In the head network, the convolutional module may change the number of channels of the feature map by adjusting the number of convolutional kernels, thereby implementing dimensionality reduction or dimensionality increase operations. This helps to reduce the computational amount or increase the diversity of features. By adjusting the number of convolutional kernels, the convolutional module can flexibly change the number of channels of the feature map to meet the requirements of subsequent classification or regression tasks. In the object detection task, the convolutional module of the head network is usually used to extract features related to classification. These features are then fed into a fully connected layer or a classifier for predicting the target object category. In addition to the classification task, the convolutional module also extracts features related to bounding box regression. These features are used to predict the coordinates and dimensions of the target object's bounding box. The convolutional module improves the model's generalization ability for unseen samples by learning the feature patterns in a large number of samples. This enables the model to accurately identify the target object in different scenarios. The convolutional module's local perception and feature extraction of the input features help the model to be somewhat robust to interference factors such as noise and occlusion. The convolutional module generates feature maps of different scales (e.g., 20×20×255, 40×40×255, 80×80×255).

[0058] As a preferred embodiment, the bidirectional feature pyramid network structure performs cross-layer feature fusion through the SE attention mechanism, and uses channel information to guide the HIE-YOLO model to extract and weight-learn the feature information of the aluminum profile surface defects.

[0059] Please refer to Figure 3 , Figure 3 which is a schematic diagram of the principle of the bidirectional feature pyramid network structure provided by the present invention.

[0060] In this embodiment, the HIE-YOLO model adopts a Bidirectional Feature Pyramid Network (BiFPN) structure, embeds the SE attention mechanism channel, realizes cross-layer feature fusion, and strengthens the extraction of feature information and the learning of important features during network training. Each circle represents a feature map node. These nodes may come from feature maps of different scales, such as features at different levels extracted from the backbone network. Each node contains feature information of a specific scale. The arrows represent the flow paths of the feature maps, that is, the process of feature transfer and fusion between different nodes. These paths embody the bidirectional feature flow mechanism of the bidirectional feature pyramid network, including top-down and bottom-up paths. The bidirectional feature pyramid network consists of three layers, and the SE attention mechanism is embedded in the P3 layer, which can use channel information to guide the model to perform discriminative weighted learning on features. The bottom-up path transfers information from the low-level feature map (such as P0) to the high-level feature map (such as P3). This path helps to gradually transfer the low-level detailed information to the high level, enhancing the detailed representation ability of the high-level features. The top-down path transfers information from the high-level feature map to the low-level feature map. This path helps to gradually transfer the high-level semantic information to the low level, enhancing the semantic understanding ability of the low-level features. In addition to the bidirectional paths, there may also be lateral connections in the figure (although not all lateral connections are clearly marked), and these connections are used to fuse features at the same scale, further enhancing the feature representation ability. At each node, the feature maps from different paths are fused. This fusion is usually achieved through weighted summation, concatenation, or other fusion operations, aiming to combine the advantages of different paths and generate more discriminative feature maps.

[0061] Through the interconnection and fusion between different layers, bidirectional multi-scale connection and fast normalization fusion are finally achieved. The SE (Squeeze-and-Excitation) module is an attention mechanism used to adaptively adjust the channel weights of the feature map. The SE module can enhance the attention to important features and suppress unimportant features, thereby improving the overall performance.

[0062] , , Among them, is the intermediate feature of the P3 layer, is the output feature of the P3 layer, is the addition operation, P is the output feature of the B-Concat module.

[0063] The bidirectional feature pyramid network combines information at different scales to enhance detailed features. The transfer and fusion of feature maps between different scales. For example, the feature map undergoes an upsampling module (UPSample) and a B-Concat operation to exchange information between different scales. This bidirectional feature flow (from top to bottom and from bottom to top) helps enhance the detailed information of low-level features and the semantic information of high-level features. The B-Concat operation, which generally refers to weighted feature fusion. The bidirectional feature pyramid network performs weighted fusion on different feature maps through learnable weights to dynamically adjust the contributions of each feature map, thereby better retaining and enhancing detailed features. The multiple uses of the CSP2 and CBH modules in the feature fusion path. These modules help further extract and enhance features, especially in enhancing detailed features. The bidirectional feature pyramid network may include more efficient feature fusion strategies, more reasonable path designs, and less computational redundancy. For example, by reducing unnecessary node connections and introducing an attention mechanism, the computational cost can be reduced while maintaining performance.

[0064] As a preferred embodiment, the HIE-YOLO model adopts the HardSwish activation function and the EqualisedFocal loss function; the HardSwish activation function is: , where, x is the input value; ReLU6 is the activation function used to limit the input value within the range of [0, 6]; The Equalised Focal loss function is: , where, is the probability value predicted by the model; is the class balance factor, is the hard example mining factor, is the number of samples of the current class, is the gradient balance factor.

[0065] In this embodiment, the HIE-YOLO model adopts the HardSwish activation function, which effectively avoids the problem of gradient disappearance during the model learning process, reduces the number of network access memory while increasing the model accuracy, and improves the network training speed. Specifically, the HardSwish activation function significantly reduces the computational complexity while maintaining the non-linear characteristics of the Swish function through piecewise linear approximation. By introducing non-linear transformation, HardSwish helps the model learn more complex feature representations and improves the ability to capture complex patterns. HardSwish has a faster calculation speed on hardware (such as mobile devices) and is suitable for scenarios with high real-time requirements. When the input value is close to zero, the gradient change of HardSwish is smoother, alleviating the problem of gradient disappearance and promoting the effective training of deep networks.

[0066] The HIE-YOLO model adopts the Equalised Focal loss function, which can not only focus on small-sized samples but also balance sample categories, improving the detection accuracy for small-sized defects and small-background difference defects. Specifically, by dynamically adjusting the loss weights of different categories, the problem of category imbalance is alleviated. Higher weights are assigned to difficult-to-classify samples (such as small targets and occluded targets) to increase the model's attention to these samples. The Equalised Focal loss function makes the gradient more evenly distributed among different categories, preventing certain categories from dominating the training process. By introducing a category weight adjustment factor and a gradient equalization mechanism, the loss function is redefined. Among them, if the sample is a positive class, is the probability value predicted as a positive class; if it is a negative class, it is 1 - the probability predicted as a positive class; is the category balance factor, which is used to adjust the loss weights of different categories (usually calculated dynamically according to category frequencies); is the hard example mining factor, which controls the loss attenuation speed of easy-to-classify samples; is the number of samples in the current category (the reciprocal of the category frequency, used to balance the category contribution); is the gradient equalization factor, which controls the influence degree of category frequency on the loss. In object detection tasks, small targets are easily ignored due to less feature information. The Equalised Focal loss function significantly improves the detection accuracy of small targets by enhancing the gradient contribution of small target samples. When the category distribution in the dataset is uneven, the Equalised Focal loss function automatically adjusts the loss weights to ensure that rare categories are fully trained. Through the gradient equalization mechanism, the Equalised Focal loss function makes the model training process more stable, reduces oscillations, and thus accelerates the convergence speed.

[0067] Please refer to Figure 4 , Figure 4Schematic diagram of the detection and comparison results for paint bubble defects

[0068] Please refer to Figure 5 , Figure 5 Schematic diagram of the detection and comparison results for jet flow defects

[0069] Please refer to Figure 6 , Figure 6 Detection effect diagram of the HIE - YOLO model provided by the present invention for detecting paint bubble defects

[0070] Please refer to Figure 7 , Figure 7 Detection effect diagram of the HIE - YOLO model provided by the present invention for detecting dirt point defects

[0071] Please refer to Figure 8 , Figure 8 Detection effect diagram of the HIE - YOLO model provided by the present invention for detecting jet flow defects

[0072] Use the aluminum profile surface defect dataset to train and test typical network models such as YOLOv4, YOLOv5s, YOLOv8 and the HIE - YOLO model proposed by the present invention. The results show that the HIE - YOLO model has obvious advantages in detecting small - size defects and small - background - difference defects. The accuracy of the HIE - YOLO model is improved by 40.05% in detecting small - size defects and 56.05% in detecting small - background - difference defects.

[0073] The aluminum profile surface defect detection system provided by the present invention is described below. The aluminum profile surface defect detection system described below can be correspondingly referred to the aluminum profile surface defect detection method described above.

[0074] Please refer to Figure 9 , Figure 9 Schematic diagram of the structure of the aluminum profile surface defect detection system provided by the present invention.

[0075] The present invention also provides an aluminum profile surface defect detection system, including: an image acquisition module 901, configured to acquire the surface image of the aluminum profile to be defect-detected; a detection module 902, configured to input the surface image of the aluminum profile to be defect-detected into a pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model; wherein, the pre-trained HIE-YOLO model adopts a bidirectional feature pyramid network structure, and the HIE-YOLO model is trained based on aluminum profile surface defect training samples; inputting the surface image of the aluminum profile to be defect-detected into the pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model further includes: inputting the surface image of the aluminum profile to be defect-detected into a backbone network for feature extraction to obtain multi-level image features output by the backbone network; inputting the multi-level image features into a neck network for feature fusion to obtain the fused features output by the neck network; and inputting the fused features into a head network for object detection to obtain the aluminum profile surface defect detection result output by the head network.

[0076] Figure 10 An exemplary structural diagram of an electronic device is shown as Figure 10 shown. The electronic device may include: a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004. Among them, the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004. The processor 1001 can call the logical instructions in the memory 1003 to execute the aluminum profile surface defect detection method, which includes: acquiring the surface image of the aluminum profile to be defect-detected; inputting the surface image of the aluminum profile to be defect-detected into a pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model; wherein, the pre-trained HIE-YOLO model adopts a bidirectional feature pyramid network structure, and the HIE-YOLO model is trained based on aluminum profile surface defect training samples; inputting the surface image of the aluminum profile to be defect-detected into the pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model further includes: inputting the surface image of the aluminum profile to be defect-detected into a backbone network for feature extraction to obtain multi-level image features output by the backbone network; inputting the multi-level image features into a neck network for feature fusion to obtain the fused features output by the neck network; and inputting the fused features into a head network for object detection to obtain the aluminum profile surface defect detection result output by the head network.

[0077] In addition, when the logical instructions in the above-mentioned memory 1003 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the related technology, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0078] An embodiment of the present invention discloses a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the aluminum profile surface defect detection method provided in each of the above method embodiments. The method includes: obtaining a surface image of an aluminum profile to be defect-detected; inputting the surface image of the aluminum profile to be defect-detected into a pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model; wherein, the pre-trained HIE-YOLO model adopts a bidirectional feature pyramid network structure, and the HIE-YOLO model is trained based on aluminum profile surface defect training samples; inputting the surface image of the aluminum profile to be defect-detected into the pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model further includes: inputting the surface image of the aluminum profile to be defect-detected into a backbone network for feature extraction to obtain multi-level image features output by the backbone network; inputting the multi-level image features into a neck network for feature fusion to obtain the fused features output by the neck network; inputting the fused features into a head network for object detection to obtain the aluminum profile surface defect detection result output by the head network.

[0079] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the aluminum profile surface defect detection method provided in the above embodiments. The method includes: obtaining a surface image of an aluminum profile to be defect-detected; inputting the surface image of the aluminum profile to be defect-detected into a pre-trained HIE-YOLO model to obtain an aluminum profile surface defect detection result output by the HIE-YOLO model; wherein, the pre-trained HIE-YOLO model adopts a bidirectional feature pyramid network structure, and the HIE-YOLO model is trained based on aluminum profile surface defect training samples; inputting the surface image of the aluminum profile to be defect-detected into the pre-trained HIE-YOLO model to obtain an aluminum profile surface defect detection result output by the HIE-YOLO model further includes: inputting the surface image of the aluminum profile to be defect-detected into a backbone network for feature extraction to obtain multi-level image features output by the backbone network; inputting the multi-level image features into a neck network for feature fusion to obtain fused features output by the neck network; inputting the fused features into a head network for object detection to obtain an aluminum profile surface defect detection result output by the head network.

[0080] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative effort.

[0081] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions in essence or the part that contributes to the related technologies can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for detecting surface defects of aluminum profiles, characterized in that, Including: Obtain the surface image of the aluminum profile to be defect-detected; Input the surface image of the aluminum profile to be defect-detected into the pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model; Among them, the pre-trained HIE-YOLO model adopts a bidirectional feature pyramid network structure, and the HIE-YOLO model is trained based on aluminum profile surface defect training samples; The step of inputting the surface image of the aluminum profile to be defect-detected into the pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model further includes: Input the surface image of the aluminum profile to be defect-detected into the backbone network for feature extraction to obtain multi-level image features output by the backbone network; Input the multi-level image features into the neck network for feature fusion to obtain the fused features output by the neck network; Input the fused features into the head network for object detection to obtain the aluminum profile surface defect detection result output by the head network.

2. The aluminum profile surface defect detection method according to claim 1, characterized in that The backbone network includes an input module, a feature focus module, a CBH module, a CSP module, and an SPP module; The input module is used to receive the input image; The feature focus module is used to perform downsampling and channel expansion on the input image, and extract and integrate image features; The CBH module is used to extract local features through convolution operations, and enhance the non-linear feature representation by using batch normalization and the HardSwish activation function; The CSP module is used to optimize the feature extraction process through cross-stage partial connection; The SPP module is used to extract features through multi-scale pooling kernels to expand the receptive field.

3. The aluminum profile surface defect detection method according to claim 2, characterized in that, The neck network includes an SE module, a CBH module, an upsampling module, a B-Concat module, and a CSP module; the SE module is used to adaptively adjust the feature weights between channels to enable the fusion of features at different levels; The upsampling module is used to perform upsampling operations on features to improve the resolution of the feature map; The B-Concat module is used to splice feature maps from different layers or different paths.

4. The aluminum profile surface defect detection method according to claim 3, characterized in that, The SE module is specifically used for: Compress the initial feature map of each channel into a scalar through global average pooling operation to obtain a channel descriptor; According to the channel descriptor, learn the channel-to-channel dependence relationship through two fully connected layers and a non-linear activation function, and generate channel weights; Perform channel-wise feature recalibration on the initial feature map according to the channel weights to obtain the feature map with the channel weights recalculated.

5. The aluminum profile surface defect detection method according to claim 1, characterized in that, The bidirectional feature pyramid network structure performs cross-layer feature fusion through the SE attention mechanism, and uses channel information to guide the HIE-YOLO model to extract and weight-learn aluminum profile surface defect feature information.

6. The aluminum profile surface defect detection method according to any one of claims 1 to 5, characterized in that, The HIE-YOLO model adopts the HardSwish activation function and the Equalised Focal loss function; The HardSwish activation function is: , wherein, x is the input value; ReLU6 is the activation function, which is used to limit the input value within the range of [0, 6]; The Equalised Focal loss function is as follows: , Among them, is the probability value predicted by the model; is the class balance factor, is the hard example mining factor, is the number of samples in the current class, is the gradient balance factor.

7. An aluminum profile surface defect detection system, characterized in that, Including: An image acquisition module for acquiring the surface image of the aluminum profile to be defect-detected; A detection module for inputting the surface image of the aluminum profile to be defect-detected into a pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model; Wherein, the pre-trained HIE-YOLO model adopts a bidirectional feature pyramid network structure, and the HIE-YOLO model is trained based on aluminum profile surface defect training samples; The step of inputting the surface image of the aluminum profile to be defect-detected into the pre-trained HIE-YOLO model to obtain the aluminum profile surface defect detection result output by the HIE-YOLO model further includes: Inputting the surface image of the aluminum profile to be defect-detected into the backbone network for feature extraction to obtain multi-level image features output by the backbone network; Inputting the multi-level image features into the neck network for feature fusion to obtain the fused features output by the neck network; Inputting the fused features into the head network for object detection to obtain the aluminum profile surface defect detection result output by the head network.

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the program, it implements the aluminum profile surface defect detection method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the aluminum profile surface defect detection method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the aluminum profile surface defect detection method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Defect detection method for display panel

    CN121074570A

  • Steel plate surface defect identification method, system and equipment based on multi-modal three-dimensional reconstruction and deep learning and medium

    CN121235978A

  • Intelligent detection method and system for sheet metal shell of energy storage equipment

    CN121323480A