Target detection model and quartz capillary surface defect detection method

By introducing an object detection model in the surface defect detection of quartz capillary, the KANConv convolution module and LSKA attention mechanism are used to enhance feature extraction and aggregation, and combined with a small object detection head to improve detection accuracy, the problems of low manual detection efficiency and missed detection in the existing technology are solved, and high-precision automated detection of surface defects of quartz capillary are realized.

CN119942303APending Publication Date: 2025-05-06WUHAN I BORON PHOTOELECTRIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510056062.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art mainly relies on manual labor in the detection of surface defects of quartz capillaries, resulting in low detection efficiency, serious problems of false detection and missed detection, and lack of automated detection solutions.

Method used

A target detection model is proposed, including backbone network, neck network and head network. By introducing KANConv convolution module, LSKA attention mechanism and small object detection head, the image feature extraction and multi-scale feature aggregation capabilities are enhanced, and the automatic detection of surface defects of quartz capillaries is realized.

Benefits of technology

Effectively extract more target feature information in the image, improve the accuracy of quartz capillary defect detection, reduce false detection and missed detection problems, and meet the real-time detection requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119942303A_ABST
    Figure CN119942303A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image target detection, and provides a target detection model and a quartz capillary surface defect detection method, a convolutional layer with a learnable activation function is introduced into a feature extraction network of the target detection model to enhance the extraction capability of image features; the performance of a target detection model on multi-scale feature aggregation is improved by integrating a large-kernel separable attention mechanism on a pyramid pooling layer, so that richer target detail information is obtained; before cross-scale feature fusion, same-dimension small convolution processing is performed on shallow feature information to remove unnecessary redundant information and reduce model parameters, so that the detection speed is increased; a small target detection head is introduced to improve the precision of a quartz capillary detection task. According to the method, more target feature information in the image can be effectively extracted, the quartz capillary defect detection precision is improved, and the problems of missing detection, false detection and the like are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image target detection, and more specifically, to a target detection model and a quartz capillary surface defect detection method. Background Art

[0002] A quartz capillary is a transparent, smooth quartz tube about 5 mm long and 1.5 mm in diameter. It contains a hollow cylindrical space inside, which is designed for inserting optical fiber lines to protect both ends of the optical fiber. Although its production process is complicated and defects are prone to occur during the manufacturing process, affecting product quality, production has now been fully automated. However, product inspection mainly relies on manual labor. Due to the tiny size of the quartz capillary, inspectors must use tools such as magnifying glasses to complete quality inspections, which not only reduces inspection efficiency, but also due to visual fatigue and subjective judgment differences, even finished products that pass the inspection may have defects.

[0003] With the advancement of artificial intelligence technology, especially the remarkable progress in the field of vision, many companies have begun to use machine detection to replace manual labor to improve product quality and reduce labor costs. The target detection technology of computer vision imitates the function of human vision, and finally achieves the goal of automatic machine detection through steps such as image acquisition, target marking, loss calculation and model training. Despite this, many companies at home and abroad still rely mainly on manual labor for surface defect detection of quartz capillaries. Therefore, this field urgently needs a set of mature equipment and technology to realize the automated detection of various defects of quartz capillaries. Summary of the invention

[0004] The present invention aims at solving the technical problems existing in the prior art and provides a target detection model and a quartz capillary surface defect detection method.

[0005] According to a first aspect of the present invention, there is provided a target detection model for surface defect detection of a quartz capillary, the target detection model comprising a backbone network, a neck network and a head network;

[0006] The backbone network includes a feature extraction network and a spatial pyramid pooling module SPPF, the feature extraction network includes feature extraction units of multiple scales, which are used to extract feature information of different scales of the image, and each scale of the feature extraction unit includes a convolution module and a c2f module, wherein the c2f module is a KANConv convolution module with a learnable activation function;

[0007] The large-core separable attention mechanism LSKA is introduced into the spatial pyramid pooling module SPPF to perform pooling operations on feature information of different scales of the image extracted by the feature extraction network;

[0008] The neck network includes multiple convolution kernels and a fusion network, wherein the multiple convolution kernels are used to perform small convolution processing of the same dimension on feature information of multiple scales respectively, and the fusion network is used to fuse the feature information of multiple scales after the small convolution processing layer by layer to obtain fused feature information of different scales;

[0009] The head network includes the original three-size detection heads and a newly added small target detection head, four detection heads, which are used to fuse feature information of different scales and extract target information of different sizes in the image.

[0010] According to a second aspect of the present invention, a method for detecting surface defects of a quartz capillary is provided, comprising:

[0011] Acquire a quartz capillary image data set with annotations, wherein the annotations refer to marking the positions and types of surface defects in the quartz capillary images;

[0012] Training a target detection model based on the quartz capillary image dataset to obtain the trained target detection model;

[0013] The surface defect position and type of the quartz capillary image to be inspected are detected based on the trained target detection model.

[0014] The present invention provides a target detection model and a quartz capillary surface defect detection method, which introduces a convolution layer with a learnable activation function in the feature extraction network of the target detection model to enhance the image feature extraction capability; by integrating a large-core separable attention mechanism in the pyramid pooling layer, the performance of the target detection model in multi-scale feature aggregation is improved, thereby obtaining richer target detail information; before cross-scale feature fusion, the shallow feature information is processed with a small convolution of the same dimension to remove unnecessary redundant information and reduce model parameters, thereby improving the detection speed; and a small target detection head is introduced to improve the accuracy of the quartz capillary detection task. The present invention can effectively extract more target feature information in the image, improve the accuracy of quartz capillary defect detection, and solve problems such as missed detection and false detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is the architecture diagram of the existing target detection model;

[0016] Figure 2 An architecture diagram of a target detection model for quartz capillary surface defect detection provided by the present invention;

[0017] Figure 3 This is the KANs network architecture diagram;

[0018] Figure 4 This is a schematic diagram of the working principle of the KANConv convolution module;

[0019] Figure 5 This is the internal diagram of the LSKA attention mechanism;

[0020] Figure 6 Schematic diagram of the working principle of 1×1 convolution in the process of cross-scale feature fusion;

[0021] Figure 7 This is a schematic diagram of the head network architecture after adding the P2 layer small target;

[0022] Figure 8 The present invention provides a flow chart of a quartz capillary surface defect detection method. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not subject to the constraints of the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in this field to achieve. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0024] For the detection of surface defects of quartz capillaries, the present invention uses an improved YOLOv8 network as a target detection model to detect surface defects of quartz capillaries. The existing YOLOv8 network structure can be found in Figure 1. The existing YOLOv8 network consists of three parts: Backbone, Neck, and Head. The Backbone network is the most basic module, responsible for feature extraction. It uses a series of convolutions, and uses residual connections and bottleneck structures to reduce the size of the network and improve performance. The Conv convolution module is the most basic module in the architecture, which performs convolution, BN, and SiLU operations on the input. The design of the C2f module is based on the C3 module in YOLOv5 and the ELAN module in YOLOv7. It can obtain more gradient flow information and provide richer feature representations for subsequent detection tasks. The spatial pyramid pooling module SPPF cleverly uses three pooling operations to reduce the amount of calculation while ensuring multi-scale fusion and further increasing the receptive field. The Neck network is located between the backbone network and the head network. It is designed as a PANet structure and is responsible for multi-scale feature fusion. It includes FPN and PAN, which fuse the upper and lower feature information flows. The Head part increases the generalization performance of the network, better handles different feature scales and semantic information, and realizes the detection of objects in the image.

[0025] The improved network structure proposed in this invention is based on the YOLOv8 network. The structure diagram of the improved YOLOv8 network can be found in Figure 2 . Figure 2 In the paper, the improved YOLOv8 network includes the target detection model, including the backbone network (BackBone), neck network (Neck) and head network (Head), and improves the feature extraction network, pyramid pooling, cross-scale feature fusion and detection head.

[0026] Among them, the backbone network includes a feature extraction network and a spatial pyramid pooling module SPPF. The feature extraction network includes feature extraction units of multiple scales, which are used to extract feature information of different scales of the image. The feature extraction unit of each scale includes a convolution module and a c2f module, wherein the c2f module is a KANConv convolution module with a learnable activation function.

[0027] A large kernel separable attention mechanism LSKA is introduced into the spatial pyramid pooling module SPPF to perform pooling operations on feature information of different scales of the image extracted by the feature extraction network.

[0028] The neck network includes multiple convolution kernels and a fusion network. The multiple convolution kernels are used to perform small convolution processing of the same dimension on feature information of multiple scales respectively. The fusion network is used to fuse the feature information of multiple scales after small convolution processing layer by layer to obtain fused feature information of different scales.

[0029] The head network includes the original three-size detection heads and a newly added small target detection head. The four detection heads are used to fuse feature information of different scales and extract target information of different sizes in the image. The small target detection head focuses more on the detection of small targets in the image.

[0030] Specifically, based on the existing YOLOv8 network model, the present invention improves the feature extraction network, spatial pyramid pooling module SPPF, cross-scale feature fusion and detection head. The improved YOLOv8 network model has fewer parameters, and in the quartz capillary defect detection, the accuracy is significantly improved, the detection real-time meets the requirements, and it can easily capture defects that are difficult for the human eye to observe.

[0031] In the feature extraction stage of the image, the present invention introduces the KANConv convolution module and designs the LSKA attention mechanism in the spatial pyramid pooling module SPPF to identify more subtle feature information in the image. These improvements effectively solve the problems of false detection and missed detection in quartz capillary defect target detection.

[0032] In view of the shortcomings of the YOLOv8 network model in target feature extraction, the KANConv convolution module with a learnable activation function is used in the Backbone structure of the YOLOv8 network model to replace the Conv convolution in the Bottleneck part of the original C2f. Figure 3 The diagram shows the architecture of the KANs network. The KANs network is proposed to improve the performance and interpretability of deep learning models. Compared with the traditional MLP architecture, the KANs network architecture has its unique advantages. The activation function in the KANs network is learnable and can better adapt to different tasks and data sets. The KANs network uses a nonlinear kernel function to replace the linear function in the MLP, which makes the model have stronger nonlinear expression capabilities. Figure 3 At the black nodes in the figure, the output of the previous layer is summed up to serve as the input of the next layer. Unlike traditional MLP, the activation function of the KANs network is located at the edge of the network, and the activation function is not fixed but can be learned and updated. At the same time, compared with traditional MLP, the KANs network has the advantages of natural interpretability and mitigation of problems caused by catastrophic forgetting.

[0033] Figure 4 The design of the KANConv convolution module is based on the idea of ​​the KANs network structure. It uses spline functions as activation functions and can adaptively adjust the corresponding activation mode according to the dynamic characteristics of the image, thereby more accurately capturing complex changes and features. Similar to traditional convolution, KANConv convolution also directly acts on the image input and outputs it after summing.

[0034] Among them, the convolution kernel of KANConv convolution can be expressed as: Among them, KANKernel represents the core matrix of the KANConv convolution module, and are the four elements in the core matrix. Among them, It is composed of a combination of basis functions and spline functions. Basis function b(x) = x / (1+e -x ), usually some activation function; spline(x) = ∑ i c i B i (x) is a spline function, which is a parameterized linear combination of B-splines and is usually initialized to 0. b is the weight coefficient of the basis function, w s is the weight coefficient of the spline function, i is the degree of the spline function, 1≤i≤n.

[0035] The image input to KANConv convolution can be represented as:

[0036]

[0037] In the formula, Image represents the input image, a mp Represents the pixel at the mth row and pth column in the image.

[0038] The scale feature information extracted by the KANConv convolution module is expressed as:

[0039]

[0040] In the formula, Result represents the output scale feature information, r 1(p-1) Represents the convolution result value of the 1st row and the p-1th column, r 2(p-1) Represents the convolution result value of the 2nd row and the p-1th column.

[0041] KANConv convolution uses spline function as activation function, which can adaptively adjust the corresponding activation mode according to the dynamic characteristics of the image, so as to capture complex changes and features more accurately.

[0042] Aiming at the problem that the YOLOv8 network model fails to capture multi-scale feature information, the Large Separable Kernel Attention (LSKA) attention mechanism is combined with Spatial Pyramid Fast Pooling (SPPF). Figure 5The structure in is the internal structure of the LSKA attention mechanism, which achieves an effect similar to the original large-size 2D kernel by decomposing the 2D weights of the deep convolution and deep dilated convolution into two cascaded 1D separable weight convolution kernels (two 1D kernels in the horizontal direction and the vertical direction). During the convolution operation, the two 1D kernels extract features in the horizontal and vertical directions of the input respectively, generate a preliminary attention map, and focus more on the important positions of the model in the image. Then, the input feature map and the preliminary attention map are processed to obtain the output attention map. Given the input feature map F∈R C×H×W , where C is the number of input channels, H and W represent the height and width of the feature map. The following represents the algorithm process of the Large Separable Kernel Attention (LSKA) attention mechanism:

[0043] First, the input feature map is convolved based on two convolution kernels. The * in the formula represents convolution, It is the deep convolution output obtained by convolving the input feature map with two convolution kernels of size 1×(2d-1) and (2d-1)×1. This convolution can capture the local spatial information in the feature map while compensating for the grid effect in the next step of deep convolution.

[0044] Then, the depth convolution output Perform deep hole convolution processing, which can be expressed as In the formula Indicates the rounding down operation, Z C It is the output of the deep hole convolution through the deep convolution The result of global information extraction, k represents the maximum receptive field of the convolution kernel W, and d is the expansion rate.

[0045] Again, a 1×1 convolution kernel is used to obtain a preliminary attention map, which is expressed as: A C =W 1×1 *Z C , where the description is the initial attention map A obtained through a 1×1 convolution kernel C .

[0046] Finally, the preliminary attention map and the input feature map are processed to obtain the final output attention map, which is expressed as In the formula represents the Hadamard product. The final output is the initial attention map A C And the input feature map F CThe result of performing the Hadamard product. The Large Separable Kernel Attention (LSKA) attention mechanism uses spatial dilated convolutions with different dilation rates to continue extracting features, which can cover a larger receptive field and capture more precise contextual information without increasing the computational cost.

[0047] To address the problem that the shallow network carries too much redundant information when the YOLOv8 network model performs cross-scale feature fusion, the present invention designs the Neck network into a cross-scale feature fusion structure.

[0048] The neck network includes multiple convolution kernels and a fusion network, and the multiple convolution kernels are used to perform small convolution processing of the same dimension on feature information of multiple scales, including:

[0049] The feature information extracted by the feature extraction unit of each scale is output to a convolution kernel, and a 1×1 small convolution process is performed on the feature information. Each convolution kernel uniformly outputs 256 feature channels, with a step size of 1 and a padding of 0.

[0050] For the feature information of multiple scales extracted from the backbone network, before each fusion, 1×1 convolution is used to process the shallow features extracted from the feature extraction network, such as Figure 6 The working mode of 1×1 convolution in the cross-scale feature fusion process shown in the figure is mainly to change the number of model parameters, unify the feature dimension to 256, and integrate the upper-level features to achieve feature crossover and reorganization. The feature map processed by convolution retains important information and reduces redundant information. Through the convolution processing of shallow features and the fusion of deep information, more accurate detection of targets is achieved.

[0051] In order to further improve the detection accuracy and capture more small defects, a 160×160 P2 layer small target detection head is added to the head network to better capture the information of the shallow network, thereby improving the model's detection ability for the target.

[0052] The original YOLOv8 network model has three scales of detection heads in the head network, and the sizes of the three detection heads are 20×20, 40×40, and 80×80 respectively. The present invention adds a small target detection head with a size of 160×160.

[0053] Figure 7It is the design of the small target detection head. The original YOLOv8 network model is equipped with three sizes of detection heads, namely 20×20, 40×40, and 80×80. However, the smallest 80×80 detection head has a receptive field of 8×8 and cannot detect smaller targets in the image. Therefore, the present invention adds a 160×160 P2 layer small target detection head to more effectively capture the information of the shallow network, thereby enhancing the model's ability to detect targets.

[0054] See also Figure 8 , a quartz capillary surface defect detection method provided by the present invention comprises the following steps:

[0055] Step 1: Acquire a quartz capillary image dataset with annotations, wherein the annotations refer to marking the positions and types of surface defects in the quartz capillary images.

[0056] It is understandable that the quartz capillary image is obtained, and the surface defect position and type of the quartz capillary image are marked. Among them, the types of surface defects of the quartz capillary image include scratches, dirt, and chipping. The marked quartz capillary image dataset contains 2500 training datasets and 1200 test datasets. The three marking categories are scratches, dirt, and chipping.

[0057] Step 2: Train the target detection model based on the quartz capillary image dataset to obtain the trained target detection model.

[0058] It is understandable that the acquired labeled quartz capillary image dataset is input into the improved YOLOv8 network model in batches, and the YOLOv8 network model extracts the target features in the image. The parameters of the YOLOv8 network model are trained by the quartz capillary image dataset. After feature extraction, fusion and other operations, the batch parameters are tested during the training process, and the YOLOv8 network model parameters are updated by detecting factors such as loss and learning rate to continue training.

[0059] During the YOLOv8 network model training process, the background continuously saves the optimal parameters of the validation data set. After the training is completed, these optimal parameters are used to test the test data set.

[0060] After hundreds of rounds of training, the YOLOv8 network model training is completed, and the saved optimal model parameters can be used to detect quartz capillary defects in actual tasks.

[0061] Step 3: Detect the position and type of surface defects of the quartz capillary image to be detected based on the trained target detection model.

[0062] It can be understood that the above step 2 trains the YOLOv8 network model, and the trained YOLOv8 network model is used to detect the surface defects of the quartz capillary to be detected.

[0063] The embodiment of the present invention provides a target detection model and a quartz capillary surface detection method. Aiming at the problems existing in the detection of defective quartz capillaries and the shortcomings of the YOLOv8 model itself, the present invention uses YOLOv8n as the benchmark model, introduces KANConv convolution in the C2f module, and extracts the detail information in the image to the greatest extent; then adds the LSKA attention mechanism to the SPPF module to increase the aggregation ability of the model at different scales and obtain more target information. In order to obtain more small targets, a P2 layer small target detection head is added to the detection head to obtain more shallow small target information. In order to lightweight the model, a cross-scale feature fusion mechanism is integrated in the Neck part, and a 1×1 convolution is used to first refine the shallow position information, and then fuse it with the deep network with rich semantic information, which not only has the effect of lightweighting the model, but also greatly improves the detection accuracy.

[0064] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0065] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0066] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0067] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0068] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0069] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0070] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A target detection model for quartz capillary surface defect detection, characterized in that: The target detection model includes a backbone network, a neck network and a head network; The backbone network includes a feature extraction network and a spatial pyramid pooling module SPPF, the feature extraction network includes feature extraction units of multiple scales, which are used to extract feature information of different scales of the quartz capillary image, and each scale of the feature extraction unit includes a convolution module and a c2f module, wherein the c2f module is a KANConv convolution module with a learnable activation function; The large-core separable attention mechanism LSKA is introduced into the spatial pyramid pooling module SPPF to perform pooling operations on feature information of different scales of the image extracted by the feature extraction network; The neck network includes multiple convolution kernels and a fusion network, wherein the multiple convolution kernels are used to perform small convolution processing of the same dimension on feature information of multiple scales respectively, and the fusion network is used to fuse the feature information of multiple scales after the small convolution processing layer by layer to obtain fused feature information of different scales; The head network includes three original sizes of detection heads and a newly added small target detection head. The four detection heads are used to extract target information of different sizes in the quartz capillary image based on fused feature information of different scales, so as to detect surface defects of the quartz capillary.

2. The target detection model according to claim 1, characterized in that The convolution kernel of the KANConv convolution module is expressed as: b(x)=x / (1+e -x ); spline(x)=∑ i c i B i (x); Among them, KAN Kernel represents the core matrix of the KANConv convolution module. and are the four elements in the core matrix, b(x) is the basis function, spline(x) is the spline function, and w b is the weight coefficient of the basis function, w s is the weight coefficient of the spline function, i is the degree of the spline function, 1≤i≤n.

3. The target detection model according to claim 2, characterized in that The input image of the KANConv convolution module is represented as: Among them, Image represents the input image, a mp Represents the pixel at the mth row and pth column in the image; The scale feature information extracted by the KANConv convolution module is expressed as: Among them, Result represents the output scale feature information, r 1(p-1) Represents the convolution result value of the 1st row and the p-1th column, r 2(p-1) Represents the convolution result value of the 2nd row and the p-1th column.

4. The target detection model according to claim 1, characterized in that The large kernel separable attention mechanism LSKA is introduced into the spatial pyramid pooling module SPPF to perform pooling operations on feature information of different scales of the image extracted by the feature extraction network, including: Decompose the 2D weights of depthwise convolution and depthwise atrous convolution into two cascaded 1D separable weight convolution kernels; When performing the convolution operation, two 1D separable weighted convolution kernels extract features in the horizontal and vertical directions of the input feature map respectively to generate a preliminary attention map; The input feature map and the preliminary attention map are processed to obtain the output attention map.

5. The target detection model according to claim 4, characterized in that: When performing the convolution operation, the two 1D kernels extract features in the horizontal and vertical directions of the input feature map respectively to generate a preliminary attention map, including: Given an input feature map F∈R C×H×W , where C is the number of input channels, H and W represent the height and width of the feature map. The processing of the large kernel separable attention mechanism LSKA includes: In the formula, * represents convolution, It is the deep convolution output obtained by convolving the input feature map with two convolution kernels of size 1×(2d-1) and (2d-1)×1. The two convolution kernels can capture the local spatial information in the input feature map and compensate for the grid effect in the next step of deep convolution. In the formula, Indicates the rounding down operation, Z C It is the output of the deep hole convolution through the deep convolution The result of global information extraction, k represents the maximum receptive field of the convolution kernel W, and d is the expansion rate; AND C =In 1×1 *WITH C ; In the formula, A C Represents the Z output of the deep hole convolution through a 1×1 convolution kernel C The initial attention map A obtained by convolution C ; The input feature map and the preliminary attention map are processed to obtain an output attention map, including: In the formula, represents the Hadamard product, is the initial attention map A C And the input feature map F C Output attention map after Hadamard product.

6. The target detection model according to claim 1, characterized in that: The neck network includes multiple convolution kernels and a fusion network, and the multiple convolution kernels are used to perform small convolution processing of the same dimension on feature information of multiple scales, including: The feature information extracted by the feature extraction unit of each scale is output to a convolution kernel, and a 1×1 small convolution process is performed on the feature information. Each convolution kernel uniformly outputs 256 feature channels, with a step size of 1 and a padding of 0.

7. The target detection model according to claim 1, characterized in that: The sizes of the original three-scale detection heads of the head network are 20×20, 40×40, and 80×80 respectively, and the size of the newly added small target detection head is 160×160. The small target detection head can capture shallow feature information of the image.

8. A method for detecting surface defects of a quartz capillary, characterized in that: include: Acquire a quartz capillary image data set with annotations, wherein the annotations refer to marking the positions and types of surface defects in the quartz capillary images; Training the target detection model according to claim 1 based on the quartz capillary image dataset to obtain the trained target detection model; The surface defect position and type of the quartz capillary image to be inspected are detected based on the trained target detection model.

9. The method for detecting surface defects of a quartz capillary according to claim 8, characterized in that: The categories of surface defects of the quartz capillary image include scratch defects, dirt defects and edge chipping defects.

10. A quartz capillary surface defect detection system, characterized in that: include: An acquisition module, used for acquiring a quartz capillary image data set with annotations, wherein the annotations refer to marking the positions and types of surface defects in the quartz capillary image; A training module, used to train the target detection model according to claim 1 based on the quartz capillary image dataset to obtain the trained target detection model; The detection module is used to detect the position and type of surface defects of the quartz capillary image to be detected based on the trained target detection model.