Automatic detection method and system for surface defects facing the imaging of the inner part of a circular wall
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU YUANTAI PRECISION INSTRUMENT CO LTD
- Filing Date
- 2026-05-26
- Publication Date
- 2026-06-23
AI Technical Summary
Existing methods for detecting defects on the inner surface of circular-walled parts suffer from problems such as insufficient ability to identify small target defects, poor real-time detection performance, and difficulty in field deployment in complex industrial environments, making it difficult to meet the requirements of industrial sites for online detection and immediate feedback.
An improved RT-DETR detection network model is adopted, which combines an expert hybrid enhancement mechanism module, a multi-scale channel cross-fusion transformer, an adaptive dual-path guided upsampling module, and a hierarchical fusion module to optimize the network structure and improve the accuracy and robustness of defect detection. The model is deployed and inferred in real time through edge computing devices.
It improves the detection accuracy of small-sized, densely distributed, and low-contrast defects, reduces information weakening and detail loss, enhances adaptability to complex backgrounds and noise, and realizes real-time and high-reliability detection in industrial settings.
Smart Images

Figure CN122265281A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial visual inspection technology, and more particularly to an automatic surface defect detection method and system based on image recognition and edge computing technology for imaging scenarios inside circular walls. The method is applicable to the automatic detection of surface defects on the inner surfaces of industrial circular-walled parts. Background Technology
[0002] Circular-walled components are widely used in machinery manufacturing, energy equipment, aerospace, and precision instruments. The quality of their inner wall surface has a significant impact on product performance and safety. During processing, assembly, or service, defects such as cracks, scratches, pits, corrosion, and foreign matter adhesion may occur on the inner surface of circular walls, thus requiring effective inspection.
[0003] In existing technologies, a circular wall measuring instrument can be used to image the internal surface of a circular wall to obtain image information of the internal wall and conduct defect detection accordingly. While the circular wall measuring instrument can acquire images of the internal surface of a circular wall, due to the narrow space and complex imaging environment inside the circular wall, the acquired images often suffer from uneven lighting, localized reflections, shadow occlusion, noise interference, and complex texture backgrounds, resulting in unclear defect features and increasing the difficulty of defect identification.
[0004] Currently, defect detection in the aforementioned circular wall images mostly relies on manual judgment or traditional machine vision methods such as threshold segmentation, edge detection, and template matching. While these methods are applicable to defects with strong regularity and obvious features, they are prone to missed detections and false detections for small-sized, densely distributed, and low-contrast defects commonly found on the inner surface of circular walls, resulting in poor detection efficiency and consistency.
[0005] With the development of deep learning technology, neural network-based target detection methods have been gradually applied to the field of surface defect detection, demonstrating good feature extraction and recognition capabilities in complex scenarios. However, most existing deep learning detection models are designed for general target detection tasks. When directly applied to inner wall images acquired by a circular wall measuring instrument, the following problems still exist: First, defects on the inner surface of a circular wall are usually small in size, numerous, and densely distributed, and some defect edges are blurred and have low contrast. Existing models are prone to losing small target features, making it difficult to achieve high-precision recognition. Second, some models have complex structures, large numbers of parameters, and high computational demands, requiring significant hardware resources and hindering rapid deployment in industrial field equipment. Third, existing solutions mostly rely on host computers or cloud servers to complete model inference, resulting in large data transmission delays, strong network dependence, and insufficient real-time performance, making it difficult to meet the requirements of online detection and immediate feedback in industrial fields.
[0006] Furthermore, circular wall measuring instruments typically need to work in conjunction with automated production lines, control systems, or actuators, which places higher demands on the real-time performance, stability, and field adaptability of the defect detection system. Transmitting all the large amounts of image data collected by the circular wall measuring instrument to remote devices for processing would not only increase the communication bandwidth burden but also reduce the detection response speed, affecting the detection cycle time and the overall system efficiency. Especially in complex industrial environments, on-site processing often relies on edge devices with certain computing capabilities to perform localized processing and real-time inference of the acquired images, enabling rapid output of detection results and timely feedback of defect information.
[0007] Therefore, there is an urgent need for an automatic surface defect detection method and system suitable for the imaging scenario of the inner wall of a circular wall measuring instrument, in order to solve the technical problems existing in the current detection method, such as insufficient small target defect recognition capability, poor adaptability to complex environments, low real-time performance, and difficulty in lightweight deployment on site, thereby improving the accuracy, efficiency and automation level of the detection of internal surface defects of circular walls. Summary of the Invention
[0008] The technical problem this invention aims to solve is the shortcomings of existing methods for detecting defects on the inner surface of circular-walled parts, such as insufficient ability to identify small-target defects, poor real-time performance, and difficulty in field deployment in complex industrial environments. This invention provides an automatic surface defect detection method for imaging the interior of circular-walled parts. The method utilizes an improved RT-DETR detection network model to automatically identify defects in images of the inner surface of circular-walled parts. Furthermore, the network structure is optimized to meet the detection requirements of small-sized, densely distributed, and low-contrast defects, thereby improving the accuracy and robustness of defect detection.
[0009] Another technical problem to be solved by the present invention is to provide an automatic surface defect detection system for imaging the interior of a circular wall.
[0010] The technical problem to be solved by this invention is achieved through the following technical solution. This invention is an automatic surface defect detection method for imaging the interior of a circular wall, characterized in that the method uses the following modules to construct an improved RT-DETR detection network model: (1) Expert Hybrid Enhancement Mechanism Module To improve the model's ability to extract complex defect features from the inner surface of circular-walled components, this invention designs an expert hybrid enhancement mechanism module (MEEM) within the RT-DETR backbone network and embeds it into the high semantic feature extraction stage of the backbone network. This module constructs multi-branch expert paths, enabling the network to adaptively select a feature extraction method more suitable for the current feature distribution based on the differences in defect features in the input image, thereby enhancing the model's ability to represent different types of defects. The expert hybrid enhancement mechanism module is preferably deployed in multiple high semantic stages of the backbone network to strengthen the routing and division of labor for features at different levels.
[0011] Let the input features be :
[0012] in, Represents a set of real numbers with a size of The three-dimensional tensor space; The size of the channel dimension; The height of the feature map in the spatial dimension; The width of the feature map in the spatial dimension; The weight vectors of each expert branch are generated through a gating network, which is represented as follows:
[0013] in, This indicates a global average pooling operation; and These are the parameters of the two-level linear transformation; Represents the ReLU activation function; ( ) represents the normalized activation function; express The gating weights corresponding to each expert; Using a Top-K selection mechanism, the K experts with the highest scores are selected from all experts to participate in the calculation; let S be the set of selected experts, then the output of this module is expressed as: in, This represents the set of target experts determined by the Top-K selection mechanism; Indicates the first Convolutional mapping operations for each expert branch; This represents the normalized gating weights of the corresponding experts; For output features; (2) Multi-scale channel cross-fusion transformer In the feature encoding stage, a multi-scale channel cross-fusion transformer (MCCFT) was used to enhance the information interaction capability between features of different scales and between features of different channels, so as to reduce the information weakening and detail loss problems that occur in the encoding and transmission of small target defects. Let the input features from different scales be:
[0014] in, This indicates the number of scales involved in cross-integration. Indicates the first Original input features at each scale; Spatial scale alignment and channel mapping are performed on the input features at each scale. Let the aligned i-th... Each scale feature is:
[0015] in, Indicates the first Original input features at each scale; This represents a spatial scale alignment operation, used to map features of different scales to a uniform spatial resolution; This represents a 1×1 convolutional mapping, used to adjust features of different scales to a uniform channel dimension; Based on this, a query matrix, a key matrix, and a value matrix are constructed for each scale feature:
[0016] in, Indicates the first Input features at each scale; For the first A query matrix generated from scale features; For the first A key matrix generated by scale features; For the first A value matrix generated by each scale feature; , , These are the corresponding learnable mapping parameter matrices, used to map input features to the query space, key space, and value space; superscript , , These represent three different mapping types: query, key, and value; subscript Index identifiers representing branches at different scales; For the The scale feature and the first Cross-scale cross-attention between features of different scales is represented as:
[0017] in, Output results for cross-scale cross-attention; For the first The query matrix corresponding to each scale branch; For the first The key matrix corresponding to each scale branch; For the first The value matrix corresponding to each scale branch; Key matrix The transpose of the matrix; , which is the scaling factor for the feature dimension; For the first The cross-scale cross-attention results corresponding to each scale are summed and aggregated to obtain the cross-scale enhancement features for that scale: in, For the first Enhanced features obtained by cross-scale information interaction among scale branches; For the first The scale branch for the first The feature output obtained after performing cross-attention calculation on each scale branch; The total number of scale branches; Index for the current target scale; For the remaining scale indices participating in the interaction; conditions This indicates that the aggregation process does not include the first... Attention results between each scale branch and itself; Based on cross-scale attention, a channel cross-enhancement mechanism is introduced, assuming the... The first scale and the first The channel cross-enhancement feature between each scale is:
[0018] in, Indicates the first Input features at each scale; Indicates a channel rearrangement operation; This represents element-wise multiplication; Represents a 1×1 convolution mapping; Represents a 3×3 convolution mapping; This indicates a batch normalization operation; for The first scale and the first Channel cross-enhancing features between scales; For the first The channel enhancement features for each scale are obtained by summing and aggregating all channel cross-enhancement results at each scale: in, For the first Channel enhancement features of each scale branch; For the first The first scale branch and the first The output features obtained after channel interaction enhancement is performed on each scale branch; The total number of scale branches; This indicates that the channel enhancement results corresponding to all scale branches other than the current scale branch are accumulated only; Within each scale, the original alignment features, cross-scale enhancement features, and channel enhancement features are fused to obtain single-scale enhancement features:
[0019] in, For the first Enhanced features output by each scale branch; This means that the three types of features are concatenated along the channel dimension to obtain the fused feature; This indicates that a 3×3 convolutional mapping operation is performed on the fused features to achieve feature fusion and information extraction; Finally, the enhancement features at each scale are uniformly aggregated, and the output of the multi-scale channel cross-fusion transformer is obtained through residual connections:
[0020] in, This represents the input residual branch, used to preserve the original feature information and enhance output stability; This indicates that features are concatenated to obtain fused features; Represents a 1×1 convolution mapping; This represents the result of a multi-scale channel cross-fusion transformer; (3) Adaptive dual-path guided upsampling module The adaptive dual-path guided upsampling module ADGUM constructs two parallel branches, an "interpolation reconstruction path" and a "transposed convolution thinning path," and combines them with a gating fusion mechanism to adaptively complete the spatial restoration and boundary enhancement of high-level semantic features. Obtain channel weights through the channel attention branch. :
[0021] in, Indicates global average pooling; and Parameters representing linear transformations; Spatial weights are obtained through the spatial attention branch. :
[0022] in, Indicates the kernel size as Convolutional mapping; Jointly refine the input features:
[0023] in, This indicates the result after joint refining; Based on this, two parallel upsampling paths are constructed; The first path is the interpolation reconstruction path:
[0024] in, This indicates a bilinear interpolation upsampling operation, used for... Improve spatial resolution; Indicates the kernel size as The convolution operation is used to fuse and reconstruct local neighborhood information of the interpolated features, thereby obtaining the output of the interpolated reconstruction path. ; The second path is the transposed convolution thinning path:
[0025] in, This represents the transpose convolution operation, used to implement it with learnable parameters. Upsampling and detail restoration are performed to obtain the output of the transposed convolution thinning path. ; Introducing gated fusion factor :
[0026] in, This indicates a channel-level concatenation operation performed on two parallel upsampled outputs; Represents a 1×1 convolution mapping; The final module output is represented as follows:
[0027] in, Used to control the output of the transposed convolution thinning path. The weights; (4) Hierarchical fusion module A hierarchical fusion module (HFM) was designed in the detection head. This module optimizes the detection features at different levels step by step through the fusion process of "feature alignment - hierarchical aggregation - multi-granularity modeling - feature recalibration", thereby improving the detection head's ability to express and distinguish small target defects. Let the input features from different levels be as follows:
[0028] in, Indicates input features; superscript Indicates the number of feature layers participating in hierarchical fusion; Channel unification and spatial alignment are performed on the input features of each layer to obtain aligned features:
[0029] in, express Characteristics of the layer; This indicates the operation of aligning spatial scales. Represents a 1×1 convolution mapping; express The layer input features are processed by channel unification and spatial alignment. A hierarchical aggregation is achieved by employing a progressive fusion strategy; let the first... The intermediate fusion feature of the layer is Then we have:
[0030]
[0031] in, Represents a 3×3 convolution mapping; Indicates the features of the previous layer and Feature splicing operation; Let Z be the feature after the final level aggregation; since the progressive fusion process is in the first stage... The layer completes the aggregation of information from all levels, therefore the final output feature is represented as:
[0032] A Patch-Aware multi-granularity modeling mechanism is introduced within the hierarchical fusion module; [The following is a separate, unrelated sentence:] Let... Indicates the local patch scale. If we represent the global patch scale, then the local patch branch and the global patch branch are respectively:
[0033] in, This indicates block mapping and feature encoding operations based on a specified patch scale; Indicates local granularity characteristics; Represents global granularity features; The merged output of local and global branches is represented as follows: :
[0034] in, This indicates a fusion operation between local and global granular features; A boundary-guided reconstruction operation is performed on the fused features; firstly, boundary response features are obtained through the boundary extraction branch. :
[0035] in, It is the fusion output of local and global branches; This represents the gradient extraction operator, used to extract boundary change information from fused features; The boundary response features and fused features are jointly reconstructed to obtain the output of the hierarchical fusion module. : ; in, Indicates the fusion of features Boundary response characteristics Assemble the components according to channel dimensions.
[0036] This invention departs from traditional channel attention or spatial attention methods. Instead, it explicitly extracts defect boundary response information to guide structural reconstruction through feature fusion. This enhances the ability to represent fine-grained defects such as small cracks, small corrosion points, and small pits while maintaining global semantic consistency. Compared to structures that rely solely on a single receptive field for modeling, this design better highlights defect contours and abrupt boundary changes, reduces information loss during feature transfer for small targets, and mitigates feature aliasing caused by small target size, unclear boundaries, and densely packed adjacent targets. Consequently, it improves the accuracy and stability of defect localization and classification results.
[0037] The technical problem to be solved by the present invention can also be achieved through the following technical solutions. A further improved technical solution of the above-described automatic surface defect detection method for imaging the interior of a circular wall is: the automatic surface defect detection method adopts a model deployment and real-time inference scheme based on edge computing devices, wherein the model deployment and real-time inference scheme includes the deployment of an improved RT-DETR detection network model on an edge device, image preprocessing scheduling, inference result parsing, and on-site interactive output of detection results; The edge computing device uses the Jetson Orin Nano embedded computing platform and is connected to a circular wall measuring instrument (preferably a high-precision circular wall measuring instrument). The circular wall measuring instrument is used to acquire images of the inner surface of circular wall-shaped parts, and the edge computing device is used to complete image reception, size adjustment, normalization processing, model inference, result post-processing, and result display output.
[0038] Furthermore, the method of the present invention preferably constructs the following field inference process on the edge device side: (1) The image receiving unit receives the image of the inner surface of the circular wall-shaped part output by the circular wall measuring instrument; (2) The preprocessing unit performs image size unification, grayscale enhancement, normalization and cache scheduling; (3) The inference unit calls the improved RT-DETR detection network model to complete defect category identification and location detection; (4) The post-processing unit analyzes and filters the detection box, confidence level, and category results; (5) The result output unit sends the defect type, location and quantity information to the display terminal or control terminal.
[0039] To improve operating efficiency on edge devices, this invention further adapts the model to a lightweight form and combines it with an inference engine to accelerate processing, thereby reducing model running latency and improving continuous inference capability and response speed during on-site detection.
[0040] Through the above design, this invention forms a complete on-site reasoning and response mechanism. Compared with schemes that rely on host computers or cloud servers for reasoning, this invention can reduce image transmission latency, reduce dependence on the network environment, and improve the real-time performance and system stability of online detection in complex industrial environments.
[0041] The present invention also provides an automatic surface defect detection system corresponding to the above method. The system includes an image acquisition module, a data transmission module, an image preprocessing module, a defect detection module, an edge inference module, a result output module, and a linkage control module.
[0042] Specifically as follows: (1) Image acquisition module, used to acquire images of the inner surface of circular wall-shaped parts based on a circular wall measuring instrument; (2) Data transmission module, used to send the acquired images to the edge computing device; (3) Image preprocessing module, used to complete image size unification, normalization, enhancement processing and cache scheduling; (4) Defect detection module, used to call the improved RT-DETR detection network model to identify defects in the image; (5) Edge inference module, used to complete model loading, inference execution and result parsing on edge devices; (6) Result output module, used to output defect category, location and quantity information; (7) Linkage control module, used to interact with alarm devices, rejection devices or industrial control systems based on detection results.
[0043] Furthermore, the collaborative relationship between the modules in the system is as follows: after the image acquisition module acquires the image of the inner surface of the part to be inspected, it sends it to the edge device via the data transmission module; after the image preprocessing module standardizes the input image, it calls the defect detection module to complete defect identification; after the detection result is parsed by the edge inference module, it is displayed by the result output module, and can output control signals through the linkage control module to realize defect warning, workpiece marking or subsequent automated processing.
[0044] Through the above system construction, the present invention realizes a complete closed-loop process for the internal surface defects of circular wall-shaped parts, from image acquisition, data processing, intelligent recognition to result output and on-site linkage, thereby meeting the application requirements of industrial sites for automated, real-time and high-reliability detection.
[0045] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention designs an expert hybrid enhancement mechanism module in the RT-DETR backbone network. By constructing multi-branch expert paths and introducing an adaptive gating selection mechanism, it improves the model's ability to extract features of different types of internal surface defects, enhances the characterization ability of complex defects such as cracks, pits, corrosion spots and scratches, and improves the interference caused by background texture, reflective areas and noise areas on defect identification.
[0046] 2. In the feature encoding stage, this invention designs a multi-scale channel cross-fusion transformer. By establishing information interaction relationships between multi-scale features and between different channels, it enhances the joint modeling capability of high-level semantic information and low-level detail information, reduces the information weakening and detail loss problem of small target defects in the feature encoding and transmission process, and thus improves the model's ability to identify small defects, dense defects and low-contrast defects.
[0047] 3. This invention designs an adaptive dual-path guided upsampling module. By constructing an interpolation reconstruction path and a transposed convolution thinning path, and using a gated fusion mechanism for adaptive output, it improves the detail preservation and boundary expression capabilities when recovering high-level semantic features to high-resolution space. This is beneficial for enhancing the representation effect of small defect contours, texture changes and local gray-level differences.
[0048] 4. The present invention designs a hierarchical fusion module in the detection head. Through feature alignment, layer-by-layer aggregation, patch-aware multi-granularity modeling, and boundary-guided reconstruction, it enhances the collaborative expression ability between local fine-grained defects and global context information, improves the feature aliasing problem of small target defects in complex backgrounds and densely distributed scenarios, thereby reducing the probability of false detection and false negative detection, and improving the accuracy and stability of defect localization and classification results.
[0049] 5. This invention combines edge computing devices to construct a model on-site deployment and real-time inference scheme, and further constructs an automatic surface defect detection system, enabling the detection of internal surface defects of circular wall-shaped parts to complete a complete closed-loop process of image acquisition, preprocessing, intelligent recognition, result output and linkage control on the industrial site, thereby reducing image transmission delay, reducing dependence on the network environment, and improving detection response speed, on-site adaptability and automation level.
[0050] 6. This invention is specifically designed for the imaging scenario of the inner wall of a circular wall measuring instrument, taking into account the detection accuracy, lightweight model and field deployment capability. It can meet the application requirements of automated, real-time and high-reliability detection of inner surface defects of circular wall parts in complex industrial environments, and has good engineering application value. Attached Figure Description
[0051] Figure 1 This is a schematic diagram of the overall structure of the automatic surface defect detection system of the present invention; Figure 2 This is a schematic diagram illustrating the network training workflow of the present invention; Figure 3 This is a schematic diagram of the system operation process of the present invention; Figure 4 This is a diagram illustrating the algorithm structure of the improved RT-DETR detection network model of this invention. Detailed Implementation
[0052] The following is a further description of specific embodiments of the present invention. It should be understood that the following embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. Various modifications or substitutions can be made to the present invention by those skilled in the art without departing from the concept of the present invention, and all such modifications or substitutions should fall within the scope of protection of the present invention.
[0053] This embodiment provides an automatic surface defect detection method and system for imaging the interior of circular walls. The system mainly includes a circular wall measuring instrument, an edge computing device, and an automatic surface defect detection system software module. The circular wall measuring instrument is used to acquire images of the inner surface of circular wall-shaped parts; the edge computing device is used to complete image reception, preprocessing, model inference, result parsing, and result output; the automatic surface defect detection system software module is used to realize image acquisition management, image preprocessing, defect detection, edge inference, result display, and linkage control. The overall technical approach is consistent with that described earlier in the document, namely, using the circular wall measuring instrument as the front-end image acquisition device, using an improved RT-DETR detection network model as the core recognition model, and using the edge computing device as the on-site inference platform to achieve automated and real-time detection of surface defects on the inner surface of circular wall-shaped parts.
[0054] I. Overall System Implementation The automatic surface defect detection system in this embodiment includes an image acquisition module, a data transmission module, an image preprocessing module, a defect detection module, an edge inference module, a result output module, and a linkage control module. A schematic diagram of the overall structure is shown below. Figure 1 .
[0055] The system comprises several modules: an image acquisition module connected to a circular wall measuring instrument for acquiring images of the inner surface of circular wall-shaped parts; a data transmission module for sending acquired images to an edge computing device; an image preprocessing module for performing size unification, grayscale enhancement, normalization, and cache scheduling on the input images; a defect detection module for calling an improved RT-DETR detection network model to identify defects in the images; an edge inference module for loading the model, executing inference, and parsing the results on the edge device; a result output module for outputting defect category, location, and quantity information; and a linkage control module for interacting with alarm devices, rejection devices, or industrial control systems based on the detection results to achieve defect warnings, workpiece marking, or subsequent automated processing.
[0056] In this embodiment, the edge computing device preferably employs the Jetson Orin Nano embedded computing platform. This device connects to the circular wall measuring instrument via a data interface and receives image input, invokes the detection model, and outputs results through a locally deployed detection program. To meet the real-time detection requirements of industrial sites, the edge device can further incorporate lightweight model adaptation and inference engine acceleration to improve continuous inference capabilities and system response speed. As explicitly stated earlier in this document, Jetson Orin Nano is used for field deployment and real-time inference; therefore, this embodiment is consistent with the abstract and the invention description.
[0057] II. Image Acquisition and Preprocessing Implementation Methods In this embodiment, the circular wall component to be inspected is first placed within the inspection area of the circular wall measuring instrument. The instrument then images the internal surface of the circular wall to obtain the image to be inspected. Since the imaging environment inside the circular wall is complex, the acquired raw image may suffer from uneven lighting, localized reflections, shadow occlusion, noise interference, and complex background textures. Therefore, image preprocessing is necessary.
[0058] The image preprocessing module preferably includes a size unification unit, a normalization unit, an enhancement unit, and a cache scheduling unit. The size unification unit is used to adjust the acquired image to the resolution required for the model input; the normalization unit is used to standardize the image pixel values; the enhancement unit is used to perform necessary grayscale enhancement or contrast enhancement on the image to improve the recognizability of small defect areas; and the cache scheduling unit is used to manage the image input queue and schedule inference tasks in continuous image acquisition scenarios.
[0059] In a preferred embodiment, the acquired image is first scaled to a preset input size and then normalized. For images with significant local illumination differences or reflections, grayscale enhancement or brightness equalization can be performed before inputting them into the model. The preprocessed image is then fed into an improved RT-DETR detection network model for feature extraction and defect detection. This preprocessing procedure reduces the impact of complex imaging conditions on the model's input quality, providing more stable input data for subsequent defect identification.
[0060] III. Implementation of the Improved RT-DETR Detection Network Model In this embodiment, the defect detection module employs an improved RT-DETR detection network model. This network model mainly includes an expert hybrid enhancement mechanism module in the backbone network, a multi-scale channel cross-fusion transformer in the feature encoding stage, an adaptive dual-path guided upsampling module in the feature recovery stage, and a hierarchical fusion module in the detection head. The improved network structure algorithm is as follows: Figure 4 As shown. This overall improved network structure corresponds to four core modules: (1) Expert Hybrid Enhancement Mechanism Module In the RT-DETR backbone network, an expert hybrid enhancement mechanism module MEEM is designed and embedded into the high semantic feature extraction stage of the backbone network. This module constructs a multi-branch expert path, enabling the network to adaptively select a feature extraction method that is more suitable for the current feature distribution based on the differences in defect features in the input image, thereby enhancing the model's ability to represent different types of defects. The expert hybrid enhancement mechanism module is deployed in multiple high semantic stages of the backbone network to strengthen the routing division of labor capabilities of different levels of features. Let the input features be :
[0061] in, Represents a set of real numbers with a size of The three-dimensional tensor space; The size of the channel dimension; The height of the feature map in the spatial dimension; The width of the feature map in the spatial dimension; The weight vectors of each expert branch are generated through a gating network, which is represented as follows:
[0062] in, This indicates a global average pooling operation; and These are the parameters of the two-level linear transformation; Represents the ReLU activation function; ( ) represents the normalized activation function; express The gating weights corresponding to each expert; Using a Top-K selection mechanism, the K experts with the highest scores are selected from all experts to participate in the calculation; let S be the set of selected experts, then the output of this module is expressed as: in, This represents the set of target experts determined by the Top-K selection mechanism; Indicates the first Convolutional mapping operations for each expert branch; This represents the normalized gating weights of the corresponding experts; For output features; (2) Multi-scale channel cross-fusion transformer In the feature encoding stage, a multi-scale channel cross-fusion transformer (MCCFT) was used to enhance the information interaction capability between features of different scales and between features of different channels, so as to reduce the information weakening and detail loss problems that occur in the encoding and transmission of small target defects. Let the input features from different scales be:
[0063] in, This indicates the number of scales involved in cross-integration. Indicates the first Original input features at each scale; Spatial scale alignment and channel mapping are performed on the input features at each scale. Let the aligned i-th... Each scale feature is:
[0064] in, Indicates the first Original input features at each scale; This represents a spatial scale alignment operation, used to map features of different scales to a uniform spatial resolution; This represents a 1×1 convolutional mapping, used to adjust features of different scales to a uniform channel dimension; Based on this, a query matrix, a key matrix, and a value matrix are constructed for each scale feature:
[0065] in, Indicates the first Input features at each scale; For the first A query matrix generated from scale features; For the first A key matrix generated by scale features; For the first A value matrix generated by each scale feature; , , These are the corresponding learnable mapping parameter matrices, used to map input features to the query space, key space, and value space; superscript , , These represent three different mapping types: query, key, and value; subscript Index identifiers representing branches at different scales; For the The scale feature and the first Cross-scale cross-attention between features of different scales is represented as:
[0066] in, Output results for cross-scale cross-attention; For the first The query matrix corresponding to each scale branch; For the first The key matrix corresponding to each scale branch; For the first The value matrix corresponding to each scale branch; Key matrix The transpose of the matrix; , which is the scaling factor for the feature dimension; For the first The cross-scale cross-attention results corresponding to each scale are summed and aggregated to obtain the cross-scale enhancement features for that scale: in, For the first Enhanced features obtained by cross-scale information interaction among scale branches; For the first The scale branch for the first The feature output obtained after performing cross-attention calculation on each scale branch; The total number of scale branches; Index for the current target scale; For the remaining scale indices participating in the interaction; conditions This indicates that the aggregation process does not include the first... Attention results between each scale branch and itself; Based on cross-scale attention, a channel cross-enhancement mechanism is introduced, assuming the... The first scale and the first The channel cross-enhancement feature between each scale is:
[0067] in, Indicates the first Input features at each scale; Indicates a channel rearrangement operation; This represents element-wise multiplication; Represents a 1×1 convolution mapping; Represents a 3×3 convolution mapping; This indicates a batch normalization operation; for The first scale and the first Channel cross-enhancing features between scales; For the first The channel enhancement features for each scale are obtained by summing and aggregating all channel cross-enhancement results at each scale: in, For the first Channel enhancement features of each scale branch; For the first The first scale branch and the first The output features obtained after channel interaction enhancement is performed on each scale branch; The total number of scale branches; This indicates that the channel enhancement results corresponding to all scale branches other than the current scale branch are accumulated only; Within each scale, the original alignment features, cross-scale enhancement features, and channel enhancement features are fused to obtain single-scale enhancement features:
[0068] in, For the first Enhanced features output by each scale branch; This means that the three types of features are concatenated along the channel dimension to obtain the fused feature; This indicates that a 3×3 convolutional mapping operation is performed on the fused features to achieve feature fusion and information extraction; Finally, the enhancement features at each scale are uniformly aggregated, and the output of the multi-scale channel cross-fusion transformer is obtained through residual connections:
[0069] in, This represents the input residual branch, used to preserve the original feature information and enhance output stability; This indicates that features are concatenated to obtain fused features; Represents a 1×1 convolution mapping; This represents the result of a multi-scale channel cross-fusion transformer; (3) Adaptive dual-path guided upsampling module The adaptive dual-path guided upsampling module ADGUM constructs two parallel branches, an "interpolation reconstruction path" and a "transposed convolution thinning path," and combines them with a gating fusion mechanism to adaptively complete the spatial restoration and boundary enhancement of high-level semantic features. Obtain channel weights through the channel attention branch. :
[0070] in, Indicates global average pooling; and Parameters representing linear transformations; Spatial weights are obtained through the spatial attention branch. :
[0071] in, Indicates the kernel size as Convolutional mapping; Jointly refine the input features:
[0072] in, This indicates the result after joint refining; Based on this, two parallel upsampling paths are constructed; The first path is the interpolation reconstruction path:
[0073] in, This indicates a bilinear interpolation upsampling operation, used for... Improve spatial resolution; Indicates the kernel size as The convolution operation is used to fuse and reconstruct local neighborhood information of the interpolated features, thereby obtaining the output of the interpolated reconstruction path. ; The second path is the transposed convolution thinning path:
[0074] in, This represents the transpose convolution operation, used to implement it with learnable parameters. Upsampling and detail restoration are performed to obtain the output of the transposed convolution thinning path. ; Introducing gated fusion factor :
[0075] in, This indicates a channel-level concatenation operation performed on two parallel upsampled outputs; Represents a 1×1 convolution mapping; The final module output is represented as follows:
[0076] in, Used to control the output of the transposed convolution thinning path. The weights; (4) Hierarchical fusion module A hierarchical fusion module (HFM) was designed in the detection head. This module optimizes the detection features at different levels step by step through the fusion process of "feature alignment - hierarchical aggregation - multi-granularity modeling - feature recalibration", thereby improving the detection head's ability to express and distinguish small target defects. Let the input features from different levels be as follows:
[0077] in, Indicates input features; superscript Indicates the number of feature layers participating in hierarchical fusion; Channel unification and spatial alignment are performed on the input features of each layer to obtain aligned features:
[0078] in, express Characteristics of the layer; This indicates the operation of aligning spatial scales. Represents a 1×1 convolution mapping; express The layer input features are processed by channel unification and spatial alignment. A hierarchical aggregation is achieved by employing a progressive fusion strategy; let the first... The intermediate fusion feature of the layer is Then we have:
[0079]
[0080] in, Represents a 3×3 convolution mapping; Indicates the features of the previous layer and Feature splicing operation; Let Z be the feature after the final level aggregation; since the progressive fusion process is in the first stage... The layer completes the aggregation of information from all levels, therefore the final output feature is represented as:
[0081] A Patch-Aware multi-granularity modeling mechanism is introduced within the hierarchical fusion module; [The following is a separate, unrelated sentence:] Let... Indicates the local patch scale. If we represent the global patch scale, then the local patch branch and the global patch branch are respectively:
[0082] in, This indicates block mapping and feature encoding operations based on a specified patch scale; Indicates local granularity characteristics; Represents global granularity features; The merged output of local and global branches is represented as follows: :
[0083] in, This indicates a fusion operation between local and global granular features; A boundary-guided reconstruction operation is performed on the fused features; firstly, boundary response features are obtained through the boundary extraction branch. :
[0084] in, It is the fusion output of local and global branches; This represents the gradient extraction operator, used to extract boundary change information from fused features; The boundary response features and fused features are jointly reconstructed to obtain the output of the hierarchical fusion module. : ; in, Indicates the fusion of features Boundary response characteristics Assemble the components according to channel dimensions.
[0085] The detailed process of model training can be found here. Figure 2 .
[0086] (I) Implementation of the Expert Hybrid Enhancement Mechanism Module In the backbone network, this implementation embeds an expert hybrid enhancement mechanism module in multiple high-semantic feature extraction stages. After the input image is processed by the initial convolutional layer and downsampling layer of the backbone network, feature maps of different levels are generated. For the feature maps entering the expert hybrid enhancement mechanism module, firstly, weight vectors of each expert branch are generated through global average pooling and a gated network. Then, a Top-K mechanism is used to select several expert branches with the highest weights to participate in feature extraction. Finally, the outputs of the selected expert branches are weighted and summed to obtain the enhanced output features of that layer.
[0087] In this implementation, different expert branches can employ different receptive fields or different convolution combinations to enhance their adaptability to defects of different morphologies, such as cracks, pits, corrosion spots, and scratches. In this way, the model can adaptively select a better feature extraction path based on the input image content during the backbone stage, thereby improving the ability to express complex defect features and suppressing background texture and noise interference.
[0088] (II) Implementation of Multi-Scale Channel Cross-Merging Transformers In the feature encoding stage, this implementation employs a multi-scale channel cross-fusion transformer to jointly model feature maps from different scales. First, spatial scale alignment and channel mapping operations are performed on features at each scale to bring them into a unified semantic space. Then, a query matrix, key matrix, and value matrix are constructed for each scale feature, and cross-scale cross-attention is calculated between scales to obtain semantic enhancement results across different scales.
[0089] Building upon this foundation, this implementation further introduces a channel cross-enhancement mechanism. Specifically, channel rearrangement and projection mapping are performed on features at different scales, enabling explicit interaction between features at each scale along the channel dimension, thereby enhancing the utilization of complementary information between different channels. Finally, the original aligned features, cross-scale enhanced features, and channel enhanced features are fused, and a unified encoded feature is output through residual connections.
[0090] Through this implementation method, the model can simultaneously utilize high-level semantic information and low-level detail information, and enhance information interaction between scales and channels, thereby reducing the information weakening and detail loss problems that occur during the encoding of small target defects, and improving the ability to identify small defects, dense defects and low-contrast defects.
[0091] (III) Implementation of the Adaptive Dual-Path Guided Upsampling Module In the feature recovery stage, this implementation employs an adaptive dual-path guided upsampling module to spatially recover high-level semantic features. This module first refines the input features jointly through channel attention and spatial attention branches to highlight effective response regions relevant to defect detection. Then, based on this, two parallel paths are constructed: one is an interpolation reconstruction path, used to achieve smooth resolution recovery through bilinear interpolation and convolutional mapping; the other is a transposed convolutional thinning path, used to recover local boundaries and detailed structures.
[0092] Furthermore, this implementation uses a gated fusion factor to adaptively weight and fuse the outputs of the two paths, ensuring that the final output features retain both smooth reconstruction capabilities and boundary refinement capabilities. Compared to traditional single-path upsampling methods, this implementation can more effectively recover the contours, edges, and subtle texture variations of small defect regions, improving the spatial representation quality of subsequent detection head input features.
[0093] (iv) Implementation method of the hierarchical fusion module In the detection head section, this implementation uses the Hierarchical Fusion Module (HFB) to fuse multi-level detection features step by step. First, spatial alignment and channel unification operations are performed on the input features from different levels; then, a progressive fusion strategy is adopted to gradually aggregate low-level detail features and high-level semantic features to form hierarchical fused features.
[0094] Building upon this foundation, this implementation further introduces a Patch-Aware multi-granularity modeling mechanism. Specifically, for the final hierarchical fusion features, block mapping and feature encoding are performed using both local and global Patch scales to obtain local and global granular features. Subsequently, the outputs of the local and global branches are convolutionally fused to enhance the collaborative expressive ability between local fine-grained defects and the global context.
[0095] Furthermore, to enhance the model's responsiveness to defect boundaries and abrupt texture changes, a boundary-guided reconstruction operation can be performed on the fused features. Specifically, boundary response features are extracted from the fused features and jointly reconstructed with the fused features to obtain the final output of the hierarchical fusion module. In this way, while maintaining global semantic consistency, the ability to express local fine-grained defects such as small cracks, small corrosion points, and small pits can be further enhanced, reducing feature aliasing problems caused by small target size, unclear boundaries, and dense distribution.
[0096] IV. Implementation Methods for Edge Deployment and Real-Time Inference In this embodiment, the improved RT-DETR network detection model is deployed on a Jetson Orin Nano edge computing device. The edge device is equipped with a defect detection program that receives the inner surface image output by the circular wall measuring instrument and executes the complete detection process locally. The edge-side inference process includes: image reception, image preprocessing, model inference, result post-processing, and result output.
[0097] The system consists of an image receiving unit that receives images to be detected; a preprocessing unit that performs size unification, normalization, enhancement processing, and cache scheduling; an inference unit that calls an improved RT-DETR network detection model to complete defect detection; a post-processing unit that parses and filters the detection box, confidence score, and category results; and a result output unit that sends the defect category, defect location, and defect quantity information to a display terminal or control terminal.
[0098] In a preferred embodiment, to improve operating efficiency on edge devices, the model can be lightweighted and adapted, and accelerated by combining it with an inference engine, thereby reducing inference latency and improving continuous on-site detection capabilities. By deploying the above detection process locally on the edge device, image transmission latency can be reduced, dependence on the network environment can be decreased, and the needs of industrial sites for online detection and real-time feedback can be met.
[0099] V. Implementation Method of System Operation Process In this embodiment, refer to Figure 3 The entire operation process of the automatic surface defect detection system is as follows: First, the circular wall measuring instrument images the inner surface of the circular wall-shaped part to obtain the image to be inspected; Then, the data transmission module sends the acquired images to the edge computing device; Next, the image preprocessing module performs size unification, normalization, and enhancement processing on the input image; Subsequently, the defect detection module calls the improved RT-DETR network detection model to identify defects in the image; Next, the edge reasoning module parses the detection results, and the result output module outputs the defect category, location, and quantity information. Finally, the linkage control module can interact with alarm devices, rejection devices, or industrial control systems based on the detection results to achieve defect early warning, workpiece marking, or subsequent automated processing.
[0100] Through the above embodiments, this invention realizes a complete closed-loop process for detecting internal surface defects of circular-walled components, from image acquisition, data processing, intelligent recognition to result output and on-site linkage. This meets the application requirements of industrial sites for automated, real-time, and highly reliable detection. The system is particularly suitable for detecting small, densely distributed, and low-contrast defects in the internal wall imaging scenario of circular-walled measuring instruments, and has good engineering application value and promising prospects for widespread adoption.
Claims
1. An automatic surface defect detection method for imaging the interior of a circular wall, characterized in that, This method uses the following modules to construct an improved RT-DETR detection network model: (1) Expert Hybrid Enhancement Mechanism Module In the RT-DETR backbone network, an expert hybrid enhancement mechanism module MEEM is designed and embedded into the high semantic feature extraction stage of the backbone network. This module constructs a multi-branch expert path, enabling the network to adaptively select a feature extraction method that is more suitable for the current feature distribution based on the differences in defect features in the input image, thereby enhancing the model's ability to represent different types of defects. The expert hybrid enhancement mechanism module is deployed in multiple high semantic stages of the backbone network to strengthen the routing division of labor capabilities of different levels of features. The weight vectors of each expert branch are generated through a gating network; A Top-K selection mechanism is used to select the K highest-scoring experts from all experts to participate in the calculation; let S be the set of selected experts, then the expert hybrid enhancement mechanism module outputs... Represented as: ; in, Indicates the first Convolutional mapping operations for each expert branch; This represents the normalized gating weights of the corresponding experts; (2) Multi-scale channel cross-fusion transformer In the feature encoding stage, a multi-scale channel cross-fusion transformer (MCCFT) was employed to enhance the information exchange capabilities between features of different scales and between features of different channels, thereby reducing information weakening and detail loss problems caused by small target defects during encoding and transmission; including: Spatial scale alignment and channel mapping are performed on input features at each scale. For each scale feature, construct the query matrix, key matrix, and value matrix respectively; Introducing a channel cross-enhancement mechanism based on cross-scale attention; Within each scale, the original alignment features, cross-scale enhancement features, and channel enhancement features are fused. Finally, the enhancement features at each scale are uniformly aggregated, and the output of the multi-scale channel cross-fusion transformer is obtained through residual connection; ; in, This represents the input residual branch, used to preserve the original feature information and enhance output stability; This indicates that features are concatenated to obtain fused features; Represents a 1×1 convolution mapping; This represents the result of a multi-scale channel cross-fusion transformer; (3) Adaptive dual-path guided upsampling module The Adaptive Dual-Path Guided Upsampling Module (ADGUM) adaptively completes the spatial restoration and boundary enhancement of high-level semantic features by constructing two parallel branches: an "interpolation reconstruction path" and a "transposed convolution thinning path," combined with a gating fusion mechanism. This includes: Obtain channel weights through the channel attention branch. ; Spatial weights are obtained through the spatial attention branch. ; For input features, and Joint refining; Based on this, two parallel upsampling paths are constructed; The first path is the interpolation reconstruction path. ; The second path is the transposed convolution thinning path. ; Introducing gated fusion factor ; The final module output is represented as follows: ; in, Used to control the output of the transposed convolution thinning path. The weights; (4) Hierarchical fusion module A Hierarchical Fusion Module (HFM) is designed in the detection head. This module optimizes the detection features at different levels step by step through a fusion process of "feature alignment - hierarchical aggregation - multi-granularity modeling - feature recalibration," thereby improving the detection head's ability to express and discriminate small target defects. This includes: Channel unification and spatial alignment are performed on the input features of each layer to obtain aligned features; A progressive fusion strategy is adopted to achieve hierarchical aggregation; Let Z be the feature after the final level aggregation; since the progressive fusion process is in the first stage... The layer completes the aggregation of information from all levels, therefore the final output feature is represented as: ; A Patch-Aware multi-granularity modeling mechanism is introduced within the hierarchical fusion module; Perform boundary-guided reconstruction operations on the fused features; obtain boundary response features through the boundary extraction branch. : ; in, It is the fusion output of local and global branches; This represents the gradient extraction operator, used to extract boundary change information from fused features; This indicates that a convolutional mapping operation with a kernel size of 3×3 is performed on the fused features; The boundary response features and fused features are jointly reconstructed to obtain the output of the hierarchical fusion module. : ; in, Indicates the fusion of features Boundary response characteristics Assemble the components according to channel dimensions.
2. The automatic surface defect detection method for imaging the interior of a circular wall according to claim 1, characterized in that, In the (1) expert hybrid enhancement mechanism module: Let the input features be : ; in, Represents a set of real numbers with a size of The three-dimensional tensor space; The size of the channel dimension; The height of the feature map in the spatial dimension; The width of the feature map in the spatial dimension; The gating network is represented as: ; in, This indicates a global average pooling operation; and These are the parameters of the two-level linear transformation; Represents the ReLU activation function; ( ) represents the normalized activation function; express The gating weights corresponding to each expert.
3. The automatic surface defect detection method for imaging the interior of a circular wall according to claim 2, characterized in that, In (2) multi-scale channel cross-fusion transformer: Let the input features from different scales be: ; in, This indicates the number of scales involved in cross-integration. Indicates the first Original input features at each scale; During the spatial scale alignment and channel mapping of input features at various scales: Let the aligned i-th... Each scale feature is: ; in, Indicates the first Original input features at each scale; This represents a spatial scale alignment operation, used to map features of different scales to a uniform spatial resolution; The constructed query matrix, key matrix, and value matrix are as follows: ; in, Indicates the first Input features at each scale; For the first A query matrix generated from scale features; For the first A key matrix generated by scale features; For the first A value matrix generated by each scale feature; , , These are the corresponding learnable mapping parameter matrices, used to map input features to the query space, key space, and value space; superscript , , These represent three different mapping types: query, key, and value; subscript Index identifiers representing branches at different scales; For the The scale feature and the first Cross-scale cross-attention between features of different scales is represented as: ; in, Output results for cross-scale cross-attention; For the first The query matrix corresponding to each scale branch; For the first The key matrix corresponding to each scale branch; For the first The value matrix corresponding to each scale branch; Key matrix The transpose of the matrix; , which is the scaling factor for the feature dimension; For the first The cross-scale cross-attention results corresponding to each scale are summed and aggregated to obtain the cross-scale enhancement features for that scale: ; in, For the first Enhanced features obtained by cross-scale information interaction among scale branches; For the first The scale branch for the first The feature output obtained after performing cross-attention calculation on each scale branch; The total number of scale branches; Index for the current target scale; For the remaining scale indices participating in the interaction; conditions This indicates that the aggregation process does not include the first... Attention results between each scale branch and itself; When introducing a channel cross-enhancement mechanism based on cross-scale attention, let the first... The first scale and the first Channel cross-enhancement features across scales for: ; in, Indicates the first Input features at each scale; Indicates a channel rearrangement operation; This represents element-wise multiplication; This indicates a batch normalization operation; For the first The channel enhancement features for each scale are obtained by summing and aggregating all channel cross-enhancement results for that scale: ; in, For the first Channel enhancement features of each scale branch; This indicates that the channel enhancement results corresponding to all scale branches other than the current scale branch are accumulated only; The original alignment features, cross-scale enhancement features, and channel enhancement features are fused to obtain single-scale enhancement features: ; in, For the first Enhanced features output by each scale branch; This means that the three types of features are spliced together along the channel dimension to obtain the fused feature.
4. The automatic surface defect detection method for imaging the interior of a circular wall according to claim 3, characterized in that, In (3) the adaptive dual-path guided upsampling module: Channel weight Represented as: ; in, Indicates global average pooling; and Parameters representing linear transformations; Spatial weight Represented as: ; in, Indicates the kernel size as Convolutional mapping; For input features, , Joint refining is represented as: ; in, This indicates the result after joint refining; Interpolation Reconstruction Path Represented as: ; in, This indicates a bilinear interpolation upsampling operation, used for... Improve spatial resolution; Indicates the kernel size as The convolution operation is used to fuse and reconstruct local neighborhood information of the interpolated features, thereby obtaining the output of the interpolated reconstruction path. ; Transposed convolution thinning path Represented as: ; in, This represents the transpose convolution operation, used to implement it with learnable parameters. Upsampling and detail restoration are performed to obtain the output of the transposed convolution thinning path. ; Introducing gated fusion factor Represented as: ; in, This indicates a channel-level concatenation operation performed on two parallel upsampled outputs.
5. The automatic surface defect detection method for imaging the interior of a circular wall according to claim 4, characterized in that, In the (4) layer fusion module: Let the input features from different levels be as follows: ; in, Indicates input features; superscript Indicates the number of feature layers participating in hierarchical fusion; Channel unification and spatial alignment are performed on the input features of each layer to obtain the aligned features: ; in, express Characteristics of the layer; This indicates the operation of aligning spatial scales. express The layer input features are processed by channel unification and spatial alignment. When using a progressive fusion strategy to complete hierarchical aggregation, let the first... The intermediate fusion feature of the layer is Then we have: ; ; in, Indicates the features of the previous layer and Feature splicing operation; When introducing a Patch-Aware multi-granularity modeling mechanism within the hierarchical fusion module, set Indicates the local patch scale. If we represent the global patch scale, then the local patch branch and the global patch branch are respectively: ; in, This indicates block mapping and feature encoding operations based on a specified patch scale; Indicates local granularity characteristics; Represents global granularity features; The merged output of local and global branches is represented as follows: : ; in, This indicates a fusion operation between local and global granular features.
6. The automatic surface defect detection method for imaging the interior of a circular wall according to claim 1, characterized in that: The automatic surface defect detection method adopts a model deployment and real-time inference scheme based on edge computing devices. The model deployment and real-time inference scheme includes the deployment of the improved RT-DETR detection network model on edge devices, image preprocessing scheduling, inference result parsing, and on-site interactive output of detection results. The edge computing device uses the Jetson Orin Nano embedded computing platform and is connected to the circular wall measuring instrument. The circular wall measuring instrument is used to acquire images of the inner surface of circular wall-shaped parts, and the edge computing device is used to complete image reception, size adjustment, normalization processing, model inference, result post-processing, and result display output.
7. The automatic surface defect detection method for imaging the interior of a circular wall according to claim 6, characterized in that: The following field inference process is constructed on the edge device side: (1) The image receiving unit receives the image of the inner surface of the circular wall-shaped part output by the circular wall measuring instrument; (2) The preprocessing unit performs image size unification, grayscale enhancement, normalization and cache scheduling; (3) The inference unit calls the improved RT-DETR detection network model to complete defect category identification and location detection; (4) The post-processing unit analyzes and filters the detection box, confidence level, and category results; (5) The result output unit sends the defect type, location and quantity information to the display terminal or control terminal.
8. An automatic surface defect detection system for imaging the interior of a circular wall, characterized in that, The aforementioned automatic surface defect detection system employs the automatic surface defect detection method according to any one of claims 1-7, and the system comprises: (1) Image acquisition module, used to acquire images of the inner surface of circular wall-shaped parts based on a circular wall measuring instrument; (2) Data transmission module, used to send the acquired images to the edge computing device; (3) Image preprocessing module, used to complete image size unification, normalization, enhancement processing and cache scheduling; (4) Defect detection module, used to call the improved RT-DETR detection network model to identify defects in the image; (5) Edge inference module, used to complete model loading, inference execution and result parsing on edge devices; (6) Result output module, used to output defect category, location and quantity information; (7) Linkage control module, used to interact with alarm devices, rejection devices or industrial control systems based on detection results.
9. The automatic surface defect detection system for imaging the interior of a circular wall according to claim 8, characterized in that, The collaborative relationships among the modules in the system are as follows: After the image acquisition module acquires the image of the inner surface of the part to be inspected, it sends it to the edge device via the data transmission module; after the image preprocessing module standardizes the input image, it calls the defect detection module to complete defect identification; after the detection result is parsed by the edge inference module, it is displayed by the result output module, and can output control signals through the linkage control module to realize defect warning, workpiece marking or subsequent automated processing.