Pure titanium plate surface defect detection method and related device
By improving the backbone, neck, and head networks of the YOLOv11 model and combining them with a dedicated dataset, the problems of low accuracy and poor robustness in titanium plate surface defect detection were solved, achieving high-precision, real-time automated detection suitable for complex industrial environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
- Filing Date
- 2026-03-27
- Publication Date
- 2026-05-26
AI Technical Summary
Existing methods for detecting surface defects in titanium plates suffer from low detection accuracy, easy omission of minute defects, poor model robustness, weak generalization ability, insufficient real-time performance, and difficulty in adapting to complex industrial conditions. These methods cannot meet the high-precision, high-stability, and highly automated detection requirements of high-end titanium alloy plates.
An improved YOLOv11 model is adopted. By constructing a standardized dataset and modularly optimizing the backbone, neck, and head networks, the SPD-conv module, PPA parallel patch-aware attention mechanism, and SPPCSPC module are introduced and replaced with the MPDIoU loss function to improve the model's ability to detect small, weak texture, and low-contrast defects.
It significantly improves the accuracy of defect detection and positioning, enhances the robustness and generalization ability of the model under complex working conditions, and achieves high stability and high automation in real-time detection, meeting the needs of high-end titanium plate inspection.
Smart Images

Figure CN122089707A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of titanium plate testing technology, and particularly relates to a method and related device for detecting surface defects in pure titanium plates. Background Technology
[0002] Titanium plates, as the core basic blank and key processing carrier in the transformation of titanium alloys from raw materials to end components, are the foundation for subsequent processing steps such as rolling, stamping, welding, and cutting. Their surface quality is one of the core indicators for evaluating the grade of finished titanium alloy plates and a prerequisite for determining the mechanical properties, structural integrity, and service reliability of end components. In the entire process of actual industrial production of titanium plates, various surface defects such as scratches, pits, and cracks are easily generated due to multiple factors, including the precision of production equipment, processing parameters, environmental conditions, and manual operation. These defects vary in shape and are randomly distributed; some are minute and difficult to identify with the naked eye, yet they can cause irreversible effects on subsequent processing and final use of the titanium plate. Especially in high-end applications such as aerospace, medical devices, and marine engineering, where zero tolerance for safety and reliability is required, even minute surface defects in titanium plates can lead to serious safety accidents. Therefore, efficient, accurate, comprehensive, and automated detection and identification of surface defects in titanium plates is a crucial link in improving the production quality of titanium alloy plates, perfecting the quality control system of the industrial chain, and ensuring the safety and reliability of high-end equipment manufacturing.
[0003] Currently, the main methods for detecting defects on titanium plates are traditional manual visual inspection, conventional machine vision inspection, and general deep learning detection methods, all of which have significant technical limitations. Among them, manual visual inspection relies heavily on the experience and subjective judgment of the inspectors, resulting in inherent defects such as low inspection efficiency, high labor intensity, poor consistency, and high rates of missed and false detections. It cannot meet the continuous inspection requirements of high-speed rolling production lines and has extremely poor ability to identify small and hidden defects. Conventional machine vision inspection uses traditional algorithms, which improves inspection efficiency, but it is extremely sensitive to environmental factors such as the high reflectivity of the titanium plate surface and interference from material textures, resulting in poor robustness. It can only identify defects with simple structures and high contrast, and cannot achieve accurate classification and localization of complex defects with multiple scales, weak textures, and low contrasts. Although the YOLOv11 model has the advantages of high computational efficiency and fast inference speed, when directly applied to the detection of defects on titanium plate surfaces, it still faces problems such as missed detection of small target defects, insufficient bounding box positioning accuracy, and poor adaptability to multi-scale defects.
[0004] It is evident that existing methods for detecting surface defects in titanium plates suffer from problems such as low detection accuracy, easy omission of minute defects, poor model robustness, weak generalization ability, insufficient real-time performance, and difficulty in adapting to complex industrial conditions; they cannot meet the high-precision, high-stability, and highly automated detection requirements of high-end titanium alloy plates. Summary of the Invention
[0005] This invention provides a method and related apparatus for detecting surface defects in pure titanium plates. This method can effectively solve the problems of low detection accuracy, easy omission of small defects, poor model robustness, weak generalization ability, insufficient real-time performance, and difficulty in adapting to complex industrial conditions in existing titanium plate surface defect detection methods. It can meet the high-precision, high-stability, and high-automation detection requirements of high-end titanium alloy plates.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: A method for detecting surface defects in a pure titanium plate includes the following steps: Raw image data of various defects on the surface of pure titanium plates are collected, and the raw images are preprocessed to construct a standardized detection dataset. Based on the YOLOv11 model, modular optimizations were performed on the Backbone, Neck, and Head networks to construct a pure titanium plate surface defect detection network model. Specifically, the Backbone network was replaced with an SPD-conv spatial-to-depth convolutional module, a PPA parallel patch-aware attention mechanism was introduced into the Neck network, and the SPPF pooling module at the end of the Neck network was replaced with an SPPCSPC module. The original loss function of the Head network was replaced with the MPDIoU loss function. The standardized detection dataset was used to iteratively train and optimize the parameters of the pure titanium plate surface defect detection network model to obtain a well-trained pure titanium plate surface defect detection model. The surface image of the pure titanium plate to be tested is input into the pure titanium plate surface defect detection model, and the detection result of the surface defect of the pure titanium plate to be tested is output.
[0007] Furthermore, the preprocessing operations include grayscale normalization, noise suppression, contrast enhancement, data augmentation, and precise labeling of defect areas.
[0008] Furthermore, the SPD-conv spatial-to-depth convolution module consists of an SPD transform submodule and a non-staggered convolutional layer. First, the SPD transform submodule reorganizes the spatial dimension of the input feature map and preserves information. Then, the non-staggered convolutional layer fuses the reorganized features and adjusts the number of channels. The SPD transform uses the parameter 'scale' to control the granularity of spatial downsampling, dividing the input feature map into multiple sub-feature maps and concatenating them along the channel dimension to form a transition feature map. Then, a 1×1 convolutional layer compresses the channel dimension of the transition feature map and fuses the features. The normalization operation and the SiLU activation function are combined to achieve non-linear transformation of features.
[0009] Furthermore, the specific steps for optimizing the Neck network are as follows: The PPA parallel patch-aware attention mechanism sequentially performs three stages: multi-scale feature parallel extraction, feature fusion and integration, and dual-path attention fine-tuning. Multi-scale feature parallel extraction achieves complementary feature extraction through local branches, global branches, and serial convolution branches. Feature fusion and integration concatenates the output features of the three branches along the channel dimension or adds them element by element. Dual-path attention fine-tuning dynamically adjusts feature weights through channel attention and spatial attention mechanisms. The SPPCSPC module uses a parallel structure of identity branch and feature transformation branch. The feature transformation branch extracts contextual information of different ranges in parallel through multi-scale max pooling of 5×5, 9×9, and 13×13. After compression and enhancement through the bottleneck structure of "Conv1×1→Conv3×3→Conv1×1", it is aggregated with the output of the identity branch to achieve efficient fusion of multi-scale features.
[0010] Furthermore, the MPDIoU loss function introduces minimum distance constraints between the predicted bounding box and the top-left and bottom-right corners of the ground truth bounding box, constructing a four-dimensional optimization framework based on overlap, center point position, width and height shape, and scale matching; the calculation formula for the loss function LMPDIoU is: LMPDIoU=1 MPDIoU, where the formula for calculating MPDIoU is: MPDIoU=IoU 2c 2 / (d1 2 +d2 2 ); In the formula, IoU is the intersection-union ratio of the predicted box and the ground truth box, d1 is the Euclidean distance between the top left corner of the predicted box and the ground truth box, d2 is the Euclidean distance between the bottom right corner of the predicted box and the ground truth box, and c is the diagonal length of the smallest closure rectangle that simultaneously encloses the predicted box and the ground truth box.
[0011] Furthermore, the specific steps for iteratively training and optimizing the parameters of the network model for detecting surface defects on pure titanium plates using the standardized detection dataset are as follows: Set reasonable training hyperparameters, input the standardized detection dataset into the pure titanium plate surface defect detection network model for multiple rounds of iterative training, and adjust the model convolution kernel weights, bias terms and other parameters in real time during the training process until the model converges and the detection accuracy reaches the preset threshold, thus obtaining the trained pure titanium plate surface defect detection model.
[0012] Furthermore, the detection results of the surface defects of the pure titanium plate to be detected include the category information of the surface defects of the pure titanium plate, the spatial location coordinates, and the corresponding confidence score.
[0013] A surface defect detection system for pure titanium plates, comprising: The data acquisition module is used to collect raw image data of various defects on the surface of pure titanium plates, perform preprocessing operations on the raw images, and construct a standardized detection dataset. The model optimization module is used to modularly optimize the Backbone, Neck, and Head networks of the YOLOv11 model as the base model, and construct a pure titanium plate surface defect detection network model. Specifically, the Backbone network is replaced with an SPD-conv spatial-to-depth convolution module, a PPA parallel patch-aware attention mechanism is introduced into the Neck network, and the SPPF pooling module at the end of the Neck network is replaced with an SPPCSPC module. The original loss function of the Head network is replaced with the MPDIoU loss function. The model training module is used to iteratively train and optimize the parameters of the pure titanium plate surface defect detection network model using the standardized detection dataset, so as to obtain a trained pure titanium plate surface defect detection model. The detection module is used to input the surface image of the pure titanium plate to be detected into the pure titanium plate surface defect detection model and output the detection results of the surface defects of the pure titanium plate to be detected.
[0014] A device for detecting surface defects in pure titanium plates, comprising: Memory, used to store computer programs; A processor is used to implement the above-described method for detecting surface defects in pure titanium plates when executing the computer program.
[0015] A computer-readable storage medium storing a computer program, which, when executed by a processor, is used to implement the above-described method for detecting surface defects in pure titanium plates.
[0016] Compared with the prior art, the present invention has the following beneficial effects: This invention provides a method for detecting surface defects in pure titanium plates. By constructing a standardized dataset and optimizing the YOLOv11 model, the backbone network is replaced with an SPD-conv module, the neck network incorporates a PPA attention mechanism and replaces the SPPCSPC module, and the head network adopts the MPDIoU loss function to construct a dedicated detection network. In this method, SPD-conv preserves multi-scale details through spatial depth transformation, the PPA mechanism enhances defect region perception and suppresses background interference, SPPCSPC enhances feature fusion capabilities, and MPDIoU loss improves bounding box localization accuracy. This method significantly improves defect detection accuracy and localization accuracy, effectively reduces false negatives and missed detections of small, weakly textured, and low-contrast defects, enhances the model's robustness and generalization ability under complex conditions such as reflection and texture interference, and achieves highly stable and automated real-time detection, meeting the high-precision detection requirements of high-end titanium plates. Attached Figure Description
[0017] Figure 1 A schematic diagram of the SPD-Conv module introduced in this embodiment of the invention; Figure 2 This is a schematic diagram of the PPA attention mechanism structure introduced in an embodiment of the present invention; Figure 3 This is a schematic diagram of the SPPC pyramid pooling structure provided in an embodiment of the present invention; Figure 4 This is a core flowchart of a method for detecting surface defects in a pure titanium plate, provided in an embodiment of the present invention. Figure 5 This is a schematic diagram of a surface defect detection system for pure titanium plates provided in an embodiment of the present invention. Detailed Implementation
[0018] To further understand the content of this invention, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments are merely illustrative and not limiting of the invention.
[0019] As mentioned in the background section, conventional machine vision inspection methods mostly employ traditional algorithms such as threshold segmentation, edge extraction, texture analysis, and template matching. While these methods improve detection efficiency to some extent, they are extremely sensitive to environmental factors such as the high reflectivity of titanium plate surfaces, material texture interference, and changes in lighting, resulting in poor robustness. These methods can only perform limited identification of defects with simple structures and high contrast, such as scratches and pits. When faced with multi-scale, weakly textured, low-contrast, and irregularly shaped titanium plate defects (such as microcracks, shallow pits, localized oxidation, and minor bumps), they are prone to feature loss and discrimination failure, making it impossible to achieve accurate classification and localization of complex defects.
[0020] To address the aforementioned issues, this embodiment provides a method for detecting surface defects on pure titanium plates. Specifically, it offers a defect detection method for titanium plate surfaces based on an improved YOLOv11 model. This method involves targeted structural improvements and loss function optimization of the backbone, neck, and head networks of the YOLOv11 model. Combined with the construction and preprocessing of a dedicated dataset for pure titanium plate surface defects, the improved model is trained and deployed, ultimately achieving accurate identification, localization, and confidence output of surface defects on pure titanium plates. In other words, through the overall design of defect dataset construction, image preprocessing, network structure optimization, and model inference process, efficient identification, accurate localization, and accurate classification of surface defects on titanium plates are achieved, thereby improving the automation level and detection performance of titanium plate surface defect detection.
[0021] For example, such as Figure 4 As shown, this embodiment provides a method for detecting surface defects in a pure titanium plate, including: Raw image data of various defects on the surface of pure titanium plates are collected, and the raw images are preprocessed to construct a standardized detection dataset. Based on the YOLOv11 model, modular optimizations were performed on the Backbone, Neck, and Head networks to construct a pure titanium plate surface defect detection network model. Specifically, the Backbone network was replaced with an SPD-conv spatial-to-depth convolutional module, a PPA parallel patch-aware attention mechanism was introduced into the Neck network, and the SPPF pooling module at the end of the Neck network was replaced with an SPPCSPC module. The original loss function of the Head network was replaced with the MPDIoU loss function. The standardized detection dataset was used to iteratively train and optimize the parameters of the pure titanium plate surface defect detection network model to obtain a well-trained pure titanium plate surface defect detection model. The surface image of the pure titanium plate to be tested is input into the pure titanium plate surface defect detection model, and the detection result of the surface defect of the pure titanium plate to be tested is output.
[0022] The prediction method provided in this embodiment will be further explained below with reference to the accompanying drawings: This embodiment provides a method for detecting surface defects in a pure titanium plate, and the specific steps are as follows: Step 1: Construction and preprocessing of pure titanium plate surface defect dataset: Collect raw image data of various defects on the surface of pure titanium plates in industrial production scenarios, and perform preprocessing operations such as grayscale normalization, noise suppression, contrast enhancement, data augmentation and accurate labeling of defect areas on the raw images to construct a standardized detection dataset of pure titanium plate surface defects with standardized labeling, balanced samples and coverage of multiple types and scales, so as to provide a data foundation for model training. Step 2: Improve the YOLOv11 defect detection network construction: Based on the YOLOv11 single-stage real-time target detection model, the Backbone network, Neck network, and Head network of the model are modularly improved to construct a dedicated network model adapted for the detection of defects on the surface of pure titanium plates. The specific improvement method is as follows: like Figure 1As shown, improvements to the backbone network include replacing the original YOLOv11 backbone network with SPD-conv. To address the aforementioned challenges, this study introduces an SPDConv module (Space-to-Depth Convolutional Module) specifically designed for small object detection. This module significantly improves the model's feature extraction capability for small objects by combining spatial reconstruction and feature enhancement. SPDConv consists of two parts: first, the SPD (Space-to-Depth) transform submodule, responsible for reconstructing the spatial dimensions of the input feature map and preserving information; second, non-staggered convolutional layers, used to further fuse features and adjust the number of channels. This structure enables the module to have multi-scale feature perception capabilities, enhancing feature expressiveness while reducing spatial information loss, thereby more accurately capturing the detailed features of small defects and improving the model's robustness in detecting complex industrial images. The core operations of SPDConv can be clearly described by mathematical formulas. First, given the input feature map X∈R... C1 ×S×S ,in C 1 represents the number of input channels. S × S Let be the spatial dimension. The SPD transform uses the parameter 'scale' to control the granularity of spatial downsampling, and its mathematical expression is as follows:
[0023] Taking scale=2 as an example, this operation divides the input feature map into 2×2=4 sub-feature maps along the spatial dimension (X). 0,0 X 0,1 X 1,0 X 1,1 Each sub-image has a size of C1×(S / 2)×(S / 2), corresponding to the four spatial locations obtained by sampling with a stride of 2 in the original image. These sub-feature images are then concatenated along the channel dimension to form a transition feature map X′, whose spatial size is reduced to (S / 2)×(S / 2), while the number of channels increases to C1×scale. 2 =4C1. This process reduces spatial resolution while preserving complete spatial information through channel dimension expansion, avoiding the loss of small target features that may be caused by traditional pooling or strided convolution.
[0024] Next, a 1×1 convolutional layer is used to compress the channel dimension of X′ and fuse features, reducing its channel number from C1×scale. 2 Reduce to the target number of channels C2 (usually C2) <C1×scale 2 This process further enhances the nonlinear expressive power of the features. The mathematical expression of this process is as follows:
[0025] Where Conv 1×1 This represents a 1×1 convolution operation with C1×scale input channels. 2 The output channel is C2 (C2 < C1 × scale). 2 W represents the convolution kernel weights, b represents the bias term, BN is the normalization operation used to stabilize the feature distribution and accelerate convergence, and SiLU is the activation function that realizes the nonlinear transformation of features and enhances the expressive power of the model.
[0026] like Figure 2 As shown, improvements to the Neck network include: Firstly, the introduction of the PPA (Parallel Patch-Aware Attention) mechanism. PPA is an innovative attention mechanism specifically designed for small object detection tasks. Its core design philosophy is to significantly improve the model's ability to capture fine-grained features by processing image patches in parallel and strengthening the attention weight allocation of local regions. PPA was initially proposed by the HCF-Net model and has been optimized specifically for the unique challenges of small object detection, effectively solving the problems of spatial information loss and feature dilution caused by multiple downsampling processes in traditional convolutional neural networks. The PPA module adopts a composite architecture design of "multi-branch feature extraction + dual-path attention enhancement," and its working mechanism can be divided into three main stages: The first stage involves parallel extraction of multi-scale features. The input feature map is processed simultaneously through three independent but complementary branches: the local branch employs a configurable patching strategy to divide the feature map into non-overlapping image patches, and performs independent feature enhancement on each patch, particularly enhancing the extraction capabilities of small object edge responses and subtle texture features. The mathematical expression of this process is shown in the formula... The global branch employs dilated convolution or global pooling operations to expand the receptive field, covering a wider range of contextual information, capturing the overall structural features of the target and its relationship with the surrounding environment, and preventing small targets from completely disappearing during downsampling. Its calculation process is shown in the formula. The sequential convolution branch, through a cascaded structure of multiple 3×3 convolutional layers, progressively extracts deeper nonlinear feature representations, enhancing the discriminative power of the features. (Formula)
[0027] The second stage is feature fusion and integration. The output features of the three branches are fused at multiple scales by concatenating the channel dimensions or adding them element-wise, forming an enhanced feature representation that integrates local details, global structure, and deep semantics. This fusion process is illustrated by the formula... .
[0028] The third stage involves fine-tuning the dual-path attention mechanism. Channel attention and spatial attention mechanisms are applied to the fused features: the channel attention module analyzes the feature importance of different channels and dynamically adjusts the weight distribution along the channel dimensions, strengthening feature channels relevant to defect detection. Its calculation is shown in the formula... The spatial attention module focuses on the spatial importance of feature maps, highlighting spatial regions where defects may occur. The calculation process is as follows: These two attention mechanisms work together to create a three-dimensional and refined adjustment of the featured content.
[0029] Through this hierarchical, parallel attention architecture, the PPA mechanism demonstrates significant advantages in titanium plate surface defect detection: it can autonomously identify and focus on minute defect areas such as scratches and dents, maintaining high detection sensitivity even under complex backgrounds and low contrast conditions; simultaneously, by suppressing interference from irrelevant areas, it reduces the false alarm rate and improves the reliability of the detection system. Experimental results show that the improved model incorporating the PPA attention mechanism, compared to the traditional CNN architecture, significantly improves detection accuracy in titanium plate surface defect detection while maintaining real-time performance, providing an effective solution for industrial visual inspection.
[0030] like Figure 3 As shown, on the other hand, the SPPF pooling module at the end of the Neck module is replaced with the SPPCSPC module. The parallel structure of the identity branch and feature change branch of the SPPCSPC module is used to extract context information of different ranges through 5×5, 9×9, and 13×13 multi-scale max pooling of the feature change branch. After compression and enhancement by the bottleneck structure of “Conv1×1→Conv3×3→Conv1×1”, it is aggregated with the output of the identity branch to achieve efficient fusion of multi-scale features and improve the model’s adaptability to defects in pure titanium plates of different sizes. Specifically, improvements to the Head network include replacing the original YOLOv11 loss function with the MPDIoU loss function. This function introduces minimum distance constraints between the top-left and bottom-right corners of the predicted bounding box and the ground truth bounding box, constructing a four-dimensional optimization framework encompassing overlap, center point location, width and height shape, and scale matching. This addresses the gradient vanishing problem of traditional loss functions when bounding boxes do not overlap, improving model convergence speed and accuracy in locating bounding boxes with minor defects. The MPDIoU loss function is calculated as follows: LMPDIoU = 1 MPDIoU, the formula for calculating MPDIoU is: MPDIoU = IoU 2c 2 / d1 2 +d2 2In the formula, IoU is the intersection-union ratio of the predicted box and the ground truth box, d1 is the Euclidean distance between the top left corner of the predicted box and the ground truth box, d2 is the Euclidean distance between the bottom right corner of the predicted box and the ground truth box, and c is the diagonal length of the smallest closure rectangle that simultaneously encloses the predicted box and the ground truth box. Step 3: Improved model training and optimization: Input the preprocessed standardized pure titanium plate surface defect dataset into the improved YOLOv11 network mentioned above. By setting reasonable training hyperparameters, iteratively train and optimize the model until the model converges and reaches the preset detection accuracy, thus obtaining the trained pure titanium plate surface defect detection model. Step 4: Actual detection of surface defects on pure titanium plates: Collect surface images of the pure titanium plates to be detected, input them into the trained improved YOLOv11 defect detection network, and after model forward inference and result post-processing, directly output the category information, spatial coordinates and corresponding confidence scores of the surface defects of the pure titanium plates to be detected, so as to realize the integrated intelligent detection of surface defects on pure titanium plates.
[0031] Therefore, this embodiment provides a method for detecting surface defects in pure titanium plates. Based on the YOLOv11 single-stage real-time target detection model, it addresses the characteristics of pure titanium plates, such as strong reflectivity, complex texture, multi-scale defects, and a high proportion of small targets, as well as the pain points of existing detection technologies. This results in an intelligent detection method for pure titanium plate surface defects adapted to industrial environments. Key points are as follows: Backbone feature extraction optimization: SPD-conv is introduced to replace the original YOLOv11 backbone network. By spatially reorganizing the input feature map, dividing it into sub-maps and splicing them along the channel dimension, the feature map spatial resolution is reduced and the model computation is reduced, while the feature information of small target defects on the surface of the pure titanium plate is fully preserved, avoiding the loss of small target features and solving the problem of insufficient feature extraction of small defects by the original model.
[0032] The Neck network features a two-dimensional improvement design: First, it introduces a PPA parallel patch-aware attention mechanism, which extracts multi-dimensional features through local, global, and serial convolution branches. Then, it calibrates feature weights through a dual-path attention module (channel + spatial) to dynamically enhance defect region features and suppress background interference such as titanium plate rolling texture and surface reflection, thereby improving the model's ability to focus on defect regions. Second, it replaces the SPPF pooling module at the end of the Neck module with an SPPCSPC module. By utilizing a parallel structure of identity branch + feature transformation branch, combined with 5×5, 9×9, and 13×13 multi-scale max pooling and bottleneck structure feature compression enhancement, it achieves efficient fusion of multi-scale features and improves the model's adaptability to defects in pure titanium plates of different sizes.
[0033] The loss function of the head network is innovatively replaced: the self-developed MPDIoU loss function is used to replace the original loss function. The minimum distance constraint between the top left and bottom right corners of the predicted box and the ground truth box is introduced. A four-dimensional optimization framework of overlap, center point position, width and height shape, and scale matching is constructed. This fundamentally solves the gradient vanishing problem of the traditional loss function when the bounding boxes do not overlap, and significantly improves the model training convergence speed and the bounding box localization accuracy of small defects in pure titanium plates.
[0034] Constructing a standardized dataset specifically for surface defects of pure titanium plates: To address the issue of poor compatibility between general datasets and defect detection on pure titanium plates, original images of various defects on pure titanium plates in industrial production scenarios were collected. After preprocessing such as grayscale normalization, noise suppression, contrast enhancement, data augmentation, and precise annotation of defect regions, a specialized dataset with standardized annotations, balanced samples, and coverage of multiple types and scales of defects was constructed. This provides a highly adaptable data foundation for improving model training and ensures the effectiveness of model detection.
[0035] An industrial-grade inspection process that balances accuracy and real-time performance: Integrating the improved YOLOv11 network with a dedicated dataset for pure titanium plates, an end-to-end integrated inspection process of "dataset construction - model training - real-time detection - result output" is designed. While improving the accuracy of surface defect detection on pure titanium plates and reducing the false negative rate of small targets, the lightweight network improvement design controls the computational complexity of the model and ensures inference speed. This solves the problem that high-precision inspection models are difficult to deploy on equipment with limited computing power in industrial settings. It can be directly adapted to high-speed automated production lines for titanium plates, and achieves accurate quantitative output of defect categories, locations, and confidence levels.
[0036] In summary, this method collects images of titanium plate surface defects in real industrial scenarios to construct a raw image dataset covering multiple types and scales of defects. The raw dataset undergoes preprocessing operations such as grayscale normalization, noise suppression, contrast enhancement, data augmentation, and precise defect region annotation to form a standardized pure titanium plate surface defect detection dataset with standardized annotations, balanced samples, and suitable for model training. The proposed improved defect detection network is trained and its parameters optimized using this standardized dataset. By enhancing the network's feature extraction capabilities for minute defects, weak texture defects, and low-contrast defects, the model's anti-interference performance and generalization ability are improved in industrial interference environments with strong reflections and complex textures. During actual detection, the real-time acquired images of the titanium plate surface to be detected are input into the trained improved defect detection network. Through model forward inference and result post-processing, the class information, spatial coordinates, and corresponding confidence scores of the titanium plate surface defects are directly output, achieving integrated intelligent detection of various typical defects such as scratches, dents, cracks, oxide scale, pitting, and impacts. This method addresses the shortcomings of traditional manual visual inspection, ultrasonic testing, and eddy current testing, which suffer from low efficiency, poor accuracy, and inability to classify defects in real time. It also resolves the issues encountered when applying general-purpose deep learning models and the existing YOLOv11 model to pure titanium plate surface defect detection, such as high false negative rates for small target defects, insufficient bounding box positioning accuracy, poor adaptability to multi-scale defects, and weak resistance to background interference. Furthermore, it addresses the challenges of deploying high-precision detection models on industrial sites with limited computing power and the inability to balance detection accuracy and real-time performance. This method enables intelligent, automated, high-precision, and real-time detection of surface defects in pure titanium plates, meeting the quality control requirements of modern titanium plate production lines. Simultaneously, it provides a complete intelligent solution for the engineering implementation of pure titanium plate surface defect detection.
[0037] like Figure 5 As shown, this embodiment also provides a pure titanium plate surface defect detection system, including: a data acquisition module, used to acquire raw image data of various defects on the surface of pure titanium plate, perform preprocessing operations on the raw images, and construct a standardized detection dataset; The model optimization module is used to modularly optimize the Backbone, Neck, and Head networks of the YOLOv11 model as the base model, and construct a pure titanium plate surface defect detection network model. Specifically, the Backbone network is replaced with an SPD-conv spatial-to-depth convolution module, a PPA parallel patch-aware attention mechanism is introduced into the Neck network, and the SPPF pooling module at the end of the Neck network is replaced with an SPPCSPC module. The original loss function of the Head network is replaced with the MPDIoU loss function. The model training module is used to iteratively train and optimize the parameters of the pure titanium plate surface defect detection network model using the standardized detection dataset, so as to obtain a trained pure titanium plate surface defect detection model. The detection module is used to input the surface image of the pure titanium plate to be detected into the pure titanium plate surface defect detection model and output the detection results of the surface defects of the pure titanium plate to be detected.
[0038] The present invention also provides a device for detecting surface defects on pure titanium plates, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the method for detecting surface defects on pure titanium plates.
[0039] The present invention also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the pure titanium plate surface defect detection method.
[0040] When the processor executes the computer program, it implements the above-mentioned steps for detecting surface defects on pure titanium plates, such as: acquiring raw image data of various defects on the surface of pure titanium plates, performing preprocessing operations on the raw images, and constructing a standardized detection dataset; using the YOLOv11 model as the base model, modularly optimizing the Backbone network, Neck network, and Head network of the model to construct a pure titanium plate surface defect detection network model; wherein, the Backbone network is replaced with an SPD-conv spatial-to-depth convolution module, a PPA parallel patch-aware attention mechanism is introduced into the Neck network, and the SPPF pooling module at the end of the Neck network is replaced with an SPPCSPC module, and the original loss function of the Head network is replaced with an MPDIoU loss function; the standardized detection dataset is used to iteratively train and optimize the parameters of the pure titanium plate surface defect detection network model to obtain a trained pure titanium plate surface defect detection model; the acquired surface image of the pure titanium plate to be detected is input into the pure titanium plate surface defect detection model, and the detection result of the surface defects of the pure titanium plate to be detected is output.
[0041] Exemplarily, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing preset functions, the instruction segments describing the execution process of the computer program in the pure titanium plate surface defect detection device. For example, the computer program can be divided into a data acquisition module, a model optimization module, a model training module, and a detection module; the specific functions are as follows: the data acquisition module is used to acquire raw image data of various defects on the surface of the pure titanium plate, perform preprocessing operations on the raw images, and construct a standardized detection dataset; the model optimization module is used to modularly optimize the Backbone network, Neck network, and Head network of the YOLOv11 model as the base model, respectively, to construct a pure titanium plate surface defect detection network model; wherein, the Backbone network is replaced with an SPD-conv empty... The system includes a depthwise convolution module, which introduces a PPA parallel patch-aware attention mechanism into the Neck network and replaces the SPPF pooling module at the end of the Neck network with an SPPCSPC module. The original loss function of the Head network is replaced with the MPDIoU loss function. The model training module is used to iteratively train and optimize the parameters of the pure titanium plate surface defect detection network model using a standardized detection dataset to obtain a trained pure titanium plate surface defect detection model. The detection module is used to input the surface image of the pure titanium plate to be detected into the pure titanium plate surface defect detection model and output the detection results of the surface defects of the pure titanium plate to be detected.
[0042] The pure titanium plate surface defect detection device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The pure titanium plate surface defect detection device may include, but is not limited to, processors and memory. Those skilled in the art will understand that the above are examples of pure titanium plate surface defect detection devices and do not constitute a limitation on the pure titanium plate surface defect detection device. It may include more components than described above, or combine certain components, or different components. For example, the pure titanium plate surface defect detection device may also include input / output devices, network access devices, buses, etc.
[0043] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or any conventional processor. The processor is the control center for the pure titanium plate surface defect detection, connecting all parts of the pure titanium plate surface defect detection equipment via various interfaces and lines.
[0044] The memory can be used to store the computer program and / or modules. The processor realizes various functions of the pure titanium plate surface defect detection device by running or executing the computer program and / or modules stored in the memory and calling the data stored in the memory.
[0045] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function (such as sound playback, image playback, etc.). The data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart media cards (SMC), secure digital cards (SD cards), flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0046] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method for detecting surface defects in a pure titanium plate.
[0047] If the modules / units integrated in the pure titanium plate surface defect detection system are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0048] Based on this understanding, the present invention can implement all or part of the processes in the above-described method for detecting surface defects in pure titanium plates, or it can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above-described method for detecting surface defects in pure titanium plates. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or a preset intermediate form, etc.
[0049] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0050] It should be noted that the content contained in the computer-readable storage medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.
[0051] Compared with existing detection methods, this invention provides a method and related apparatus for detecting surface defects in pure titanium plates, which has the following advantages: First, improve the detection capability of small target defects and reduce the false negative rate: By introducing SPD-conv into the backbone network, the feature map downsampling process of small target defects is fully preserved, which solves the problem that the original YOLOv11 model does not sufficiently extract the features of small defects on the surface of pure titanium plates, greatly reduces the false negative rate of small target defects, and at the same time reduces the computational load of the model, laying the foundation for industrial field deployment. Second, enhance the model's anti-interference ability and focus on defect areas: The introduction of the PPA parallel patch perception attention mechanism in the Neck module effectively suppresses background interference factors such as rolling texture and strong reflection on the surface of pure titanium plates through multi-branch feature extraction and dual-path attention weight calibration, dynamically enhances the feature weight of defect areas, and improves the model's ability to focus on defect areas and its recognition accuracy in complex backgrounds. Third, optimize multi-scale feature fusion to adapt to defects of different sizes: replace the SPPF pooling module with the SPPCSPC module, and achieve efficient fusion of defect features of pure titanium plates of different sizes through multi-scale max pooling and branch feature aggregation. This solves the problem of poor adaptability of the original model to multi-scale defects and can stably identify different types and scales of defects such as scratches, pits, cracks, oxide scale, and pitting on the surface of pure titanium plates. Fourth, improve the accuracy of bounding box localization and accelerate model convergence: The application of the MPDIoU loss function in the Head module constructs a four-dimensional optimization framework and solves the problem of gradient vanishing in traditional loss functions. This not only significantly improves the accuracy of bounding box localization of small defects on the surface of pure titanium plates, but also accelerates the training convergence speed of the model and shortens the model training cycle. Fifth, balancing detection accuracy and real-time performance, adapting to industrial deployment: The improved YOLOv11 model of this invention improves detection accuracy while controlling the computational load and complexity of the model through improved designs such as SPD-conv, ensuring the inference speed of the model, adapting to embedded devices with limited computing power in industrial settings, meeting the real-time detection requirements of high-speed titanium plate rolling production lines, and achieving dual optimization of detection accuracy and real-time performance. Sixth, achieving full automation of the detection process and enhancing industrial application value: The pure titanium plate surface defect detection method constructed in this invention replaces traditional manual visual inspection, ultrasonic, eddy current and other detection methods, realizing the automation, standardization and quantification of defect detection, greatly improving the detection efficiency of titanium plate surface defects, reducing labor costs and subjective judgment errors, and can be directly applied to the production quality control of pure titanium plates in aerospace, medical devices, chemical equipment, marine engineering and other fields, with high engineering practical value and promotion prospects.
[0052] The above embodiments are merely one of the implementation methods for achieving the technical solution of the present invention. The scope of protection claimed by the present invention is not limited to this embodiment, but also includes any variations, substitutions and other implementation methods that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention.
[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for detecting surface defects of a pure titanium plate, characterized by, The method comprises the following steps: Collecting original image data of various defects on the surface of pure titanium plates, pre-processing the original images, and constructing a standardized detection data set; Taking a YOLOv11 model as a basic model, modularly optimizing the Backbone backbone network, Neck neck network, and Head head network of the model, and constructing a pure titanium plate surface defect detection network model; wherein, the Backbone backbone network is replaced with an SPD-conv spatial-to-depth convolution module, a PPA parallel patch perception attention mechanism is introduced into the Neck neck network, and an SPPC SPCC module is used to replace the SPPF pooling module at the end of the Neck neck network, and the original loss function of the Head head network is replaced with an MPDIoU loss function; Iteratively training and optimizing the pure titanium plate surface defect detection network model with the standardized detection data set to obtain a trained pure titanium plate surface defect detection model; Inputting the collected surface image of the pure titanium plate to be detected into the pure titanium plate surface defect detection model, and outputting the detection result of the surface defect of the pure titanium plate to be detected.
2. The method of claim 1, wherein the pure titanium plate surface defect detection method is characterized by, The pre-processing operation includes gray scale normalization, noise suppression, contrast enhancement, data enhancement, and accurate labeling of the defect area.
3. The method of claim 1, wherein the pure titanium plate surface defect detection method is characterized by, The SPD-conv spatial-to-depth convolution module is composed of an SPD transformation submodule and a non-stride convolution layer. The SPD transformation submodule is used to reorganize the spatial dimension and retain information of the input feature map, and the non-stride convolution layer is used to fuse and adjust the channel number of the reorganized feature; wherein, the SPD transformation controls the granularity of spatial downsampling with a parameter scale, divides the input feature map into multiple sub-feature maps, and splices them along the channel dimension to form a transition feature map, then a 1x1 convolution layer is used to compress and fuse the channel dimension of the transition feature map, and a normalization operation and a SiLU activation function are combined to realize the nonlinear transformation of the feature.
4. The method of claim 1, wherein the pure titanium plate surface defect detection method is characterized by, The optimization steps of the Neck neck network are as follows: The PPA parallel patch perception attention mechanism sequentially performs three-stage operations of multi-scale feature parallel extraction, feature fusion and integration, and double-path attention fine adjustment. The multi-scale feature parallel extraction realizes complementary feature extraction through local branches, global branches, and serial convolution branches. The feature fusion and integration splices or element-wise adds the output features of the three branches in the channel dimension. The double-path attention fine adjustment dynamically adjusts the feature weight through channel attention and spatial attention mechanisms; The SPPC SPCC module has a parallel structure of an identity branch and a feature change branch. The feature change branch extracts different range context information through 5x5, 9x9, and 13x13 multi-scale maximum pooling in parallel, and then compresses and enhances the information through a "Conv1x1→Conv3x3→Conv1x1" bottleneck structure, and aggregates the output of the identity branch to realize efficient fusion of multi-scale features.
5. The method of claim 1, wherein the pure titanium plate surface defect detection method is characterized by, The MPDIoU loss function introduces the minimum distance constraint of the left upper corner and the right lower corner of the predicted box and the real box, and constructs a four-dimensional optimization framework of overlap, center position, width-height shape, and scale matching. The calculation formula of the loss function LMPDIoU is: LMPDIoU = 1 MPDIoU, wherein the calculation formula of the MPDIoU is: MPDIoU = IoU 2c 2 / (d1 2 +d2 2 ) In the formula, IoU is the intersection over union of the prediction box and the real box, d1 is the Euclidean distance of the upper left corner points of the prediction box and the real box, d2 is the Euclidean distance of the right lower corner points of the prediction box and the real box, and c is the diagonal length of the smallest closed rectangle that simultaneously encloses the prediction box and the real box.
6. The method of claim 1, wherein the pure titanium plate surface defect detection method is characterized by, The specific steps of iteratively training and optimizing the parameters of the pure titanium plate surface defect detection network model by using the standardized detection data set are as follows: Set reasonable training hyperparameters, input the standardized detection data set into the pure titanium plate surface defect detection network model for multiple rounds of iterative training, and adjust the model convolution kernel weight, bias term and other parameters in real time during the training process until the model converges and the detection accuracy reaches the preset threshold, thereby obtaining the trained pure titanium plate surface defect detection model.
7. The method of claim 1, wherein the pure titanium plate surface defect detection method is characterized by, The detection result of the to-be-detected pure titanium plate surface defect includes the category information, spatial position coordinates and corresponding confidence score of the pure titanium plate surface defect.
8. A surface defect detection system for pure titanium plates, characterized in that, Comprise: The data acquisition module is used for acquiring original image data of various defects on the surface of the pure titanium plate, pre-processing the original image, and constructing a standardized detection data set; The model optimization module is used for taking the YOLOv11 model as a base model, modularly optimizing the Backbone backbone network, Neck neck network and Head head network of the model, and constructing a pure titanium plate surface defect detection network model; wherein, the Backbone backbone network is replaced by an SPD-conv space-to-depth convolution module, the PPA parallel patch perception attention mechanism is introduced into the Neck neck network, the SPPF pooling module at the end of the Neck neck network is replaced by an SPPCSPC module, and the original loss function of the Head head network is replaced by an MPDIoU loss function; The model training module is used for iteratively training and optimizing the parameters of the pure titanium plate surface defect detection network model by using the standardized detection data set, thereby obtaining a trained pure titanium plate surface defect detection model; The detection module is used for inputting the collected surface image of the to-be-detected pure titanium plate into the pure titanium plate surface defect detection model, and outputting the detection result of the to-be-detected pure titanium plate surface defect.
9. A pure titanium plate surface defect detection apparatus characterized by comprising: Comprise: The memory is used for storing a computer program; The processor is used for executing the computer program to realize the pure titanium plate surface defect detection method of any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to realize the pure titanium plate surface defect detection method of any one of claims 1-7. The computer program is executed by the processor to realize the pure titanium plate surface defect detection method of any one of claims 1-7.