Methods and systems for detecting edge defects in cold-rolled strip steel

CN122048942BActive Publication Date: 2026-08-14WUHAN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-16
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0005]本申请的主要目的在于提供一种冷轧带钢边部缺陷检测方法及系统,旨在解决在热态铸坯的高温环境下,如何提升冷轧带钢边部缺陷检测精度和实时性的技术问题

Benefits of technology

响应于带钢的运行速度,生成同步触发信号以控制线阵相机进行图像采集,并在图像采集过程中,基于激光测距传感器的实时反馈信息,驱动执行机构以调整线阵相机与带钢边部的距离。通过响应带钢速度生成同步触发信号控制相机采集,解决了高速运动导致的图像运动模糊问题,同时基于激光测距实时反馈驱动机构调整距离,克服了因带钢位置波动引起的成像焦距失准问题,实现了在高速动态工业环境下稳定获取高清图像。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048942B_ABST
    Figure CN122048942B_ABST
Patent Text Reader

Abstract

This application discloses a method and system for detecting edge defects in cold-rolled strip steel, relating to the fields of image recognition and image classification technology. The method includes: generating a synchronous trigger signal in response to the strip steel's running speed to control a linear array camera for image acquisition; adjusting the distance between the linear array camera and the strip steel edge based on real-time feedback information from a laser rangefinder sensor; acquiring raw image data of the strip steel edge from the linear array camera and performing preprocessing; inputting the preprocessed image data into a target defect detection model for feature encoding to obtain encoded information. The target defect detection model includes a hybrid encoder and a decoder. The hybrid encoder includes a multi-branch feature recalibration module and a multi-scale grouped convolution module, used for multi-scale feature extraction, recalibration processing, and fusion processing of the preprocessed image data; and inputting the encoded information into the decoder to obtain the defect category and location information. This application significantly improves the real-time performance and detection accuracy of defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of image recognition and image classification technology, and in particular to a method and system for detecting edge defects in cold-rolled strip steel. Background Technology

[0002] Edge defect detection of cold-rolled strip steel is a crucial step in ensuring product quality in the steel metallurgical industry. Under production line operating conditions, real-time online detection is performed on the edges of cold-rolled strip steel, typically moving at speeds exceeding 300 m / min. The main defects detected include holes and gaps generated after shearing by disc shears, as well as edge cracks inherent in hot-rolled materials. Problems with strip edge quality can easily lead to serious consequences such as forced shutdowns in subsequent production processes, equipment damage, and even strip breakage. With continuously increasing rolling speeds and increasingly stringent quality requirements, traditional inspection methods relying on human observation are no longer sufficient to meet the quality control and intelligent requirements of modern high-speed production due to inherent drawbacks such as low accuracy, poor reliability, high labor intensity, and susceptibility to missed defects. Therefore, developing an automated and intelligent edge defect detection system based on image processing technology has significant practical significance and application value.

[0003] Currently, traditional methods for detecting edge defects in cold-rolled strip steel primarily target static steel coils and are unsuitable for moving strips. Furthermore, traditional image processing methods have limited feature extraction capabilities, typically relying on grayscale variations or simple threshold segmentation to identify simple defects such as brown spots and dents. For complex edge defects with diverse shapes, such as edge cracks and holes, feature information extraction is incomplete, making high-precision classification and localization difficult, resulting in high rates of missed and false detections.

[0004] Therefore, improving the accuracy and real-time performance of edge defect detection in cold-rolled strip steel is a problem that urgently needs to be solved. Summary of the Invention

[0005] The main purpose of this application is to provide a method and system for detecting edge defects in cold-rolled strip steel, aiming to solve the technical problem of how to improve the accuracy and real-time performance of edge defect detection in cold-rolled strip steel under the high-temperature environment of hot-cast billets.

[0006] To achieve the above objectives, this application proposes a method for detecting edge defects in cold-rolled strip steel. The method is applied to a cold-rolled strip steel edge defect detection system, which includes a linear array camera and a laser rangefinder. The method comprises: In response to the running speed of the strip, a synchronous trigger signal is generated to control the line array camera to acquire images. During the image acquisition process, based on the real-time feedback information from the laser rangefinder sensor, the actuator is driven to adjust the distance between the line array camera and the edge of the strip. The original image data of the steel strip edge is acquired from the line scan camera and preprocessed to obtain preprocessed image data. The preprocessed image data is input into the target defect detection model for feature encoding to obtain encoded information. The target defect detection model includes a hybrid encoder and a decoder. The hybrid encoder includes a multi-branch feature recalibration module and a multi-scale grouped convolution module. The multi-branch feature recalibration module is used to perform multi-scale feature extraction and recalibration processing on the preprocessed image data. The multi-scale grouped convolution module is used to fuse the multi-scale features after recalibration. The encoded information is input into the decoder of the target defect detection model to obtain the defect category and location information.

[0007] In one embodiment, the step of generating a synchronous trigger signal in response to the running speed of the strip to control the line scan camera to acquire images, and driving the actuator to adjust the distance between the line scan camera and the edge of the strip based on real-time feedback information from the laser rangefinder sensor during the image acquisition process, includes: The current running speed of the strip is obtained, and the corresponding speed signal is converted into a trigger pulse signal that matches the line frequency of the line scan camera; The laser rangefinder continuously measures the actual distance from the front end of the linear array camera lens to the side edge of the strip steel. The actual distance is compared with the preset optimal imaging distance range. When the actual distance exceeds the optimal distance range, a control command is generated to drive the electronically controlled slide to move the line scan camera in a direction perpendicular to the running of the strip until the actual distance falls into the optimal distance range.

[0008] In one embodiment, the step of inputting the preprocessed image data into a target defect detection model for feature encoding to obtain encoded information includes: The preprocessed image data is initially downsampled and feature extracted by the neck network, and at least three basic feature maps of different scales are output. The basic feature map at at least one scale is input to the multi-branch feature recalibration module. The input features are processed in parallel through two paths, and the outputs of the two paths are fused to obtain a multi-scale feature map. The two paths include the path corresponding to the nonlinear function network and the path corresponding to the context attention mechanism. The multi-scale feature map is input into the multi-scale grouped convolution module. Through the combination of grouped convolution and convolution kernels of different sizes, multi-scale context information is encoded and fused to obtain encoded information.

[0009] In one embodiment, the step of performing preliminary downsampling and feature extraction on the preprocessed image data through the neck network to output at least three basic feature maps at different scales includes: The feature extraction module performs initial feature extraction and channel integration on the preprocessed image data to obtain initial features. The feature extraction module adopts a cross-stage partial connection structure and a layer aggregation structure. The initial features are reduced in dimensionality based on the downsampling module. Average pooling and max pooling operations are performed in parallel, and the outputs of the two operations are concatenated along the channel dimension to generate a basic feature map of one scale. The dimensionality reduction operation of the downsampling module is repeated at least twice to generate the at least three basic feature maps at different scales.

[0010] In one embodiment, the basic feature map includes a first sub-feature and a second sub-feature. The step of inputting the basic feature map at at least one scale to the multi-branch feature recalibration module, processing the input features through dual-path parallel processing, and fusing the outputs of the two paths to obtain a multi-scale feature map includes: The first sub-feature is processed sequentially through a convolutional layer parameterized by a learnable basis function to perform a nonlinear feature transformation, resulting in the nonlinearly transformed first sub-feature. For the second sub-feature, the attention weight map of the spatial dimension is obtained by calculating through the context anchor attention mechanism; The second sub-feature is weighted based on the attention weight map to obtain the weighted second sub-feature. The first sub-feature after the nonlinear transformation is fused with the second sub-feature after the weighting to obtain a multi-scale feature map.

[0011] In one embodiment, before the step of inputting the preprocessed image data into the target defect detection model for feature encoding to obtain encoded information, the method further includes: An initial defect detection model is constructed, which includes a neck network, a hybrid encoder, and a decoder. The neck network is used for multi-scale feature extraction, and the decoder is used to output defect category and location information. A training dataset is established based on the preprocessed image data, and the images in the training dataset are labeled with defective true categories and bounding box information. The initial defect detection model is trained based on the training dataset, wherein the training process is supervised by a multi-task loss function, which includes at least category classification loss, bounding box regression loss, intersection-union prediction loss, and feature fusion loss. The training steps are executed iteratively until the model converges, resulting in the target defect detection model.

[0012] In one embodiment, the step of inputting the encoded information into the decoder of the target defect detection model to obtain the defect category and location information includes: The decoder decodes the encoded information to generate multiple query vectors about the defects; For each query vector, the defect category probability, bounding box coordinates, and predicted intersection-union ratio with the true bounding box are predicted in parallel using the detection head. Based on the category probability and the predicted intersection-union ratio, the final defect category corresponding to each query vector is determined; Based on the bounding box coordinates, the defect location corresponding to each query vector is determined.

[0013] In addition, to achieve the above objectives, this application also proposes a cold-rolled strip edge defect detection system, which includes: strip steel, hardware subsystem, guardrail and processing unit; The hardware subsystem is symmetrically installed in the middle of the guardrail and is used to collect defect images of the current steel strip edge. The hardware subsystem includes a square steel platform, an electrically controlled sliding table unit, a support frame, a line scan camera, a light source, and an electrical cabinet. The square steel platform is fixed to the ground with anchor bolts for support. The electrically controlled sliding table unit is horizontally mounted on the square steel platform. The support frame has an L-shaped structure; its vertical section is connected to the slider of the electrically controlled sliding table unit, and its horizontal section houses the line scan camera and the light source, extending to the vicinity of the strip edge for image acquisition. The light source is located directly below the line scan camera to provide uniform illumination and enhance image contrast. The electrical cabinet is mounted on the square steel platform and integrates a control unit, which is electrically connected to the electrically controlled sliding table unit, the line scan camera, and the light source for centralized control of image acquisition and motion adjustment. The processing unit is communicatively connected to the control unit and is used to execute the cold-rolled strip edge defect detection method as described above.

[0014] In one embodiment, the electrically controlled slide unit includes a servo motor, a coupling, a lead screw, a laser rangefinder, a sensor mounting base, a composite slider, a lead screw, and a slide controller; The servo motor is connected to the lead screw via the coupling, driving the composite slider to perform linear reciprocating motion along the lead screw. The laser rangefinder is mounted on the sensor mounting base, which is fixed to the composite slider to measure the distance between the line array camera and the edge of the strip in real time. The slide controller is connected to the lead screw and is used to coordinate the movement of the composite slide to precisely adjust the position of the linear array camera.

[0015] In one embodiment, the support frame is also equipped with a dustproof device and an anti-collision device; The dustproof device covers the line array camera and light source with clips to prevent dust and oil from contaminating the optical components; The anti-collision device is installed at the front end of the support frame to monitor obstacles in the movement path and trigger the emergency braking of the electronically controlled slide unit when there is a risk of collision.

[0016] One or more technical solutions proposed in this application have at least the following technical effects: In response to the running speed of the strip, a synchronous trigger signal is generated to control the line scan camera for image acquisition. During image acquisition, based on real-time feedback from the laser rangefinder sensor, the actuator is driven to adjust the distance between the line scan camera and the edge of the strip. By generating a synchronous trigger signal in response to the strip speed to control camera acquisition, the image motion blur problem caused by high-speed movement is solved. At the same time, the distance adjustment driven by the laser rangefinder overcomes the problem of inaccurate imaging focus caused by strip position fluctuations, thus achieving stable acquisition of high-definition images in high-speed dynamic industrial environments.

[0017] Raw image data of the steel strip edge is acquired from a linear scan camera and preprocessed to obtain preprocessed image data. This preprocessed image data is then input into a target defect detection model for feature encoding, yielding encoded information. The target defect detection model includes a hybrid encoder and decoder. The hybrid encoder comprises a multi-branch feature recalibration module and a multi-scale grouped convolution module. The multi-branch feature recalibration module performs multi-scale feature extraction and recalibration on the preprocessed image data, while the multi-scale grouped convolution module fuses the recalibrated multi-scale features. The acquired raw images are stitched and standardized preprocessed, resolving the issue of inconsistent data formats and difficulty in direct model analysis, resulting in a consistent standard input. Furthermore, the standardized image is input into the target detection model. The multi-branch feature recalibration module in the hybrid encoder addresses the shortcomings of traditional methods in extracting weak, low-contrast, and complex background defect features and its poor anti-interference ability by performing parallel nonlinear transformations and contextual attention weighting on the features. Meanwhile, the multi-scale grouped convolution module enhances the model's ability to capture defects of different sizes through efficient structural fusion of multi-scale context.

[0018] The encoded information is input into the decoder of the target defect detection model to obtain the defect category and location information. The decoder then decodes the encoded high-level semantic features into specific category and location information, completing a precise mapping from image to detection result. By deeply integrating high-speed synchronous acquisition, adaptive focusing, standardized preprocessing, and advanced deep neural network detection processes, a complete closed-loop intelligent detection scheme is formed. This achieves high-precision, robust, and efficient online automatic identification of edge defects in cold-rolled strip steel, significantly improving the real-time performance and detection accuracy of edge defect detection in moving cold-rolled strip steel.

[0019] The aforementioned cold-rolled strip edge defect detection system forms an integrated detection structure through mechanical assembly and electrical connection. Relying on precise mechanical transmission, real-time signal acquisition, and stable control logic, it achieves high-precision, high-speed online detection of edge defects in cold-rolled strip. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart illustrating the first embodiment of the cold-rolled strip edge defect detection method of this application; Figure 2 This is a schematic diagram of the network structure of the target defect detection model in this application; Figure 3 This is a schematic diagram of the network structure of the RepNCSPELAN4 module in this application; Figure 4 This is a schematic diagram of the network structure of the ADown module in this application; Figure 5 This is a schematic diagram of the network structure of the PBSF module in this application; Figure 6 This is a schematic diagram of the network structure of the C2PKIK module in this application; Figure 7 This is a schematic diagram of the hardware structure of the cold-rolled strip edge defect detection system of this application; Figure 8 This is a schematic diagram of the hardware structure of the hardware subsystem of this application; Figure 9 This is a schematic diagram of the hardware structure of the electrically controlled slide unit of this application.

[0023] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0024] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0025] This application provides a method for detecting edge defects in cold-rolled strip steel, which can be applied to a cold-rolled strip steel edge defect detection system. The cold-rolled strip steel edge defect detection system includes a linear array camera and a laser rangefinder sensor. Specifically, Figure 1 This is a flowchart illustrating the first embodiment of the cold-rolled strip edge defect detection method of this application. In this embodiment, the cold-rolled strip edge defect detection method includes steps S10 to S40:

[0026] In step S10, in response to the running speed of the strip, a synchronous trigger signal is generated to control the line array camera to acquire images. During the image acquisition process, based on the real-time feedback information from the laser rangefinder sensor, the actuator is driven to adjust the distance between the line array camera and the edge of the strip.

[0027] It should be noted that the synchronization trigger signal can be a pulse signal generated based on the strip's running speed, used to ensure that the linear scan camera's acquisition frequency is synchronized with the strip's moving speed, avoiding image ghosting. The laser rangefinder sensor is a detection device that measures the distance between the camera and the strip's edge in real time, providing distance feedback for automatic focusing. The actuator can be understood as an electrically controlled slide unit, which can move the camera.

[0028] Step S20: Obtain the original image data of the steel strip edge from the line scan camera and perform preprocessing to obtain preprocessed image data.

[0029] It should be noted that the original image data is the strip edge image directly acquired by the line scan camera. Preprocessing may include image stitching, pixel length standardization and other preprocessing of the original strip edge image to obtain the preprocessed image data.

[0030] Step S30: Input the preprocessed image data into the target defect detection model for feature encoding to obtain encoded information. The target defect detection model includes a hybrid encoder and a decoder. The hybrid encoder includes a multi-branch feature recalibration module and a multi-scale grouped convolution module.

[0031] It should be noted that the target defect detection model can be a deep learning model, including a hybrid encoder and a decoder. The hybrid encoder is a feature extraction network, including a multi-branch feature recalibration module and a multi-scale grouped convolution module. The multi-branch feature recalibration module is used to perform multi-scale feature extraction and recalibration on the preprocessed image data, and the multi-scale grouped convolution module is used to fuse the recalibrated multi-scale features.

[0032] Step S40: Input the encoded information into the decoder of the target defect detection model to obtain the defect category and location information.

[0033] It should be noted that the decoder may include an Intersection over Union (IoU)-aware query selection mechanism to convert encoded information into defect category and location information. For example, defect categories may include edge cracks, holes, and notches. The location information refers to the specific coordinates or area of ​​the defect on the strip. Location information can be represented in the form of a bounding box, such as a rectangle enclosing the defect area in an image. This rectangle can be defined using the pixel coordinates of its upper left and lower right corners. Location information can also represent the defect's position along the strip's length. For example, by combining the strip's running speed signal and the image acquisition timestamp, the position in the image can be mapped to the actual steel coil, thus determining which meter of the strip the defect occurred on.

[0034] In this embodiment, a synchronous trigger signal is generated in response to the strip speed to control camera acquisition, solving the image motion blur problem caused by high-speed motion. Simultaneously, real-time feedback from laser ranging drives the mechanism to adjust the distance, overcoming the imaging focus inaccuracy problem caused by strip position fluctuations, thus achieving stable acquisition of high-definition images in a high-speed dynamic industrial environment. Subsequently, the acquired raw images undergo stitching and standardization preprocessing, resolving the problem of inconsistent data formats and difficulty in direct use for model analysis, resulting in a consistent standard input. Then, the standardized images are input into the target detection model. The multi-branch feature recalibration module in its hybrid encoder addresses the shortcomings of traditional methods in extracting weak, low-contrast, and complex background defect features and its poor anti-interference ability by performing parallel nonlinear transformations and contextual attention weighting on the features. Meanwhile, the multi-scale grouped convolution module enhances the model's ability to capture defects of different sizes through efficient structural fusion of multi-scale context. Finally, the decoder decodes the encoded high-level semantic features into specific category and location information, completing a precise mapping from image to detection result. By deeply integrating high-speed synchronous acquisition, adaptive focusing, standardized preprocessing, and advanced deep neural network detection processes, a complete closed-loop intelligent detection solution has been formed. This solution enables high-precision, robust, and efficient online automatic identification of edge defects in cold-rolled strip steel, significantly improving the real-time performance and detection accuracy of edge defect detection in moving cold-rolled strip steel.

[0035] In one implementation, step S10 includes: Step S101: Obtain the current running speed of the strip and convert the corresponding speed signal into a trigger pulse signal that matches the line frequency of the line scan camera.

[0036] It should be noted that the current running speed of the strip refers to the real-time movement speed of the strip at the detection point in the cold rolling production line; the speed signal is the electrical or digital signal corresponding to the real-time movement speed. The line scan camera's frequency refers to the number of lines of images acquired per second, and is a core parameter determining its exposure and scanning frequency.

[0037] Step S102: Continuously measure the actual distance from the front end of the linear array camera lens to the side edge of the strip using a laser rangefinder sensor.

[0038] It should be noted that a laser rangefinder sensor refers to a non-contact measuring device that uses a laser beam to measure the precise distance to the side edge of a strip. The front end of the line scan camera lens refers to the physical foremost position of the camera's optical lens, which can be used as a reference point for distance measurement. The side edge of the strip refers to the boundary along the width of the strip, i.e., the specific area where defects need to be detected. The actual distance refers to the physical distance between the front end of the line scan camera lens and the side edge of the strip, measured in real time by the laser rangefinder sensor.

[0039] Step S103: Compare the actual distance with the preset optimal imaging distance range. When the actual distance exceeds the optimal distance range, generate a control command to drive the electronically controlled slide to move the line scan camera in a direction perpendicular to the running of the strip until the actual distance falls into the optimal distance range.

[0040] It should be noted that the optimal imaging distance range is a pre-defined interval based on the focal length, depth of field, and image sharpness requirements of the line scan camera lens. Within this interval, the camera achieves the best image quality. Control commands can be generated by the system based on distance comparison results and are used to drive actuators, such as the electrically controlled slide, which receives the corresponding command signals and executes the corresponding actions. The electrically controlled slide is used to support and drive the line scan camera for linear movement.

[0041] In this embodiment, by acquiring the production line speed signal and converting it into a matching camera line frequency trigger signal, the synchronization problem during high-speed strip image acquisition is solved, achieving strict synchronization between the image and the strip's movement position, thus effectively avoiding image blurring or distortion caused by relative motion. Simultaneously, a laser rangefinder is used to perform real-time non-contact measurement of the distance between the camera and the strip edge, overcoming the limitations of traditional fixed installation methods that cannot adapt to changes in strip width or position. By intelligently comparing the real-time measured distance with a preset optimal imaging distance range, and automatically generating control commands to drive the electronically controlled slide to adjust the camera position when the distance exceeds the limit, the detection system achieves adaptive tracking and focusing on strip position fluctuations, providing a stable and reliable high-quality image source for subsequent high-precision defect identification.

[0042] In one implementation, step S30 includes: Step S301: The preprocessed image data is initially downsampled and feature extracted through the neck network, and at least three basic feature maps of different scales are output.

[0043] It's important to note that in the deep learning object detection architecture, the neck network is the intermediate network connecting the backbone network and the detection head. It's responsible for fusing and enhancing the primary features extracted by the backbone network to generate multi-scale feature maps, adapting to the detection of targets of different sizes. Preprocessed image data refers to the data from the original acquired strip edge images after standardization operations such as size normalization, noise filtering, brightness and contrast adjustment, preparing it for model input. Downsampling, through operations like pooling or strided convolution, reduces the spatial resolution of the feature maps while increasing their channel count or semantic abstraction. This allows models like convolutional neural networks to automatically learn and extract abstract representations from the input image data that are helpful for subsequent recognition tasks. The basic feature maps refer to the set of feature maps output by the neck network, possessing different spatial scales and semantic abstraction levels, providing a multi-scale foundation for subsequent fine-tuning.

[0044] Preferably, step S301 includes: performing initial feature extraction and channel integration on the preprocessed image data through the feature extraction module to obtain initial features, wherein the feature extraction module adopts a cross-stage partial connection structure and a layer aggregation structure; performing dimensionality reduction on the initial features based on the downsampling module by performing average pooling and max pooling operations in parallel, and concatenating the outputs of the two along the channel dimension to generate a basic feature map of one scale; repeating the dimensionality reduction operation of the downsampling module at least twice to generate at least three basic feature maps of different scales.

[0045] It should be noted that the steps of performing initial feature extraction and channel integration on the preprocessed image data through the feature extraction module to obtain initial features may include: adjusting the number of channels of the input features through the first convolutional layer and then segmenting them into front features and back features along the channel dimension; extracting deep features from the back features sequentially through two reparameterized cross-stage sub-modules to obtain first deep features and second deep features; concatenating the front features, first deep features, and second deep features, and then processing the concatenated features through the second convolutional layer to integrate channel information and output the initial features.

[0046] It should be noted that the step of reducing the dimensionality of the initial features based on the downsampling module, and generating a basic feature map of one scale by performing average pooling and max pooling operations in parallel and concatenating their outputs along the channel dimension can include: performing average pooling on the input features and dividing them equally into a first pooling feature and a second pooling feature along the channel dimension; performing a convolution operation on the first pooling feature to obtain a first downsampled feature; performing max pooling and convolution operations sequentially on the second pooling feature to obtain a second downsampled feature; and concatenating the first downsampled feature and the second downsampled feature along the channel dimension to generate a basic feature map of one scale.

[0047] Step S302: Input the basic feature map of at least one scale into the multi-branch feature recalibration module, process the input features in parallel through two paths, and fuse the outputs of the two paths to obtain a multi-scale feature map. The two paths include the path corresponding to the nonlinear function network and the path corresponding to the context attention mechanism.

[0048] It should be noted that step S302 includes: processing the first sub-feature sequentially through a convolutional layer parameterized by a learnable basis function to perform a nonlinear feature transformation, thereby obtaining the nonlinearly transformed first sub-feature; calculating the second sub-feature using a context anchor attention mechanism to obtain a spatial dimension attention weight map; weighting the second sub-feature based on the attention weight map to obtain a weighted second sub-feature; and fusing the nonlinearly transformed first sub-feature with the weighted second sub-feature to obtain a multi-scale feature map.

[0049] Step S303: Input the multi-scale feature map into the multi-scale group convolution module. Through the combination of group convolution and convolution kernels of different sizes, multi-scale context information is encoded and fused to obtain encoded information.

[0050] It should be noted that the multi-scale group convolution module is a custom convolution module that can combine group convolution with various kernel sizes, such as 3x3 and 5x5, to efficiently extract and fuse features from different receptive fields. Group convolution refers to a variant of convolution operation that divides the channels of the input feature map into several groups, performs convolution independently within each group, and finally merges the results to reduce the number of model parameters and computational cost. Different kernel sizes refer to filters with different spatial dimensions used in convolutional neural networks, such as 3×3 and 5×5, to capture local spatial features at different scales. Furthermore, by extracting features from different receptive fields using convolution kernels of different sizes, and combining the dependencies between different locations in the feature map, multi-scale contextual information is encoded and integrated to obtain encoded information.

[0051] In this embodiment, a neck network is used to systematically downsample and extract features from the image at multiple scales, generating a feature pyramid covering different levels of abstraction and detail. This solves the problem of traditional methods having a single feature scale and difficulty in simultaneously detecting defects of varying sizes, laying a comprehensive feature foundation for subsequent processing. Furthermore, the basic features are input into a multi-branch feature recalibration module. A nonlinear function network path enhances the model's nonlinear representation ability for complex and subtle defect patterns, while a contextual attention path enables the model to focus on key regions semantically related to the defects. These two paths are processed in parallel and then fused, addressing the shortcomings of existing methods in insufficient modeling of nonlinear relationships and susceptibility to complex background interference during feature extraction. This achieves dynamic recalibration and enhancement of the feature map. Finally, the recalibrated multi-scale features are input into a multi-scale grouped convolution module. Grouped convolution reduces computational complexity while capturing and fusing multi-scale contextual information using convolution kernels of different sizes. This solves the problems of large parameter counts and low efficiency in multi-scale feature fusion in traditional convolution operations, achieving efficient and robust feature encoding.

[0052] Based on the above embodiments and implementation methods, an exemplary description is provided. Specifically, the network structure of the target defect detection model can be as follows: Figure 2As shown, it mainly consists of an input layer, a neck network, a hybrid encoder, a decoder, and an output layer. The input layer contains the acquired images of edge defects in the strip. The output layer contains the results of the strip edge defect detection. RepNCSPELAN4 (Reparameterized Neck Cross-Stage Partial Efficient Layer Aggregation Network4) represents the reparameterized cross-stage partial efficient layer aggregation network module; ADown (Asymmetric Down-sampling Module) represents the multi-path heterogeneous downsampling module; C2PKIK (Cross-Stage Partial with Parallel KAN and Interaction Kernels) represents the multi-branch feature recalibration module; MKGConv (Multi-Kernel Group Convolution) represents the multi-kernel group convolution module; PBSF (Progressive Block-based Spatial Feature Aggregation Module) represents the progressive feature aggregation module; CAA (Contextual Anchor Attention Module) represents the contextual anchor attention module; Upsample represents upsampling; AIFI (Attention-based Intra-scale Feature Interaction Module) represents the attention-based intra-scale feature interaction module; Decoder&Head represents the decoder and detector head; and IoU-Aware Query Selection represents IoU-aware query selection.

[0053] Specifically, the neck network mainly consists of multiple convolutional layers, a RepNCSPELAN4 module, and an ADown multi-path heterogeneous downsampling module stacked together, generating feature maps at three scales: the first-scale feature map, rich in semantic information; the second-scale feature map, balancing semantic and detail information; and the third-scale feature map, rich in detail information. In terms of resolution, the first-scale feature map < the second-scale feature map < the third-scale feature map. The RepNCSPELAN4 module structure diagram is shown below. Figure 3As shown, the core submodule of the RepNCSPELAN4 module is the RepNCSP module, which preserves semantic integrity through a cross-stage partial connection mechanism. This involves segmenting the input features into a "shortcut branch" and an "enhancement branch." The shortcut branch directly transmits the original features, while the enhancement branch undergoes deep processing through RepNCSP units. The RepNCSPELAN4 module integrates an efficient layer aggregation network structure, concatenating and aggregating the multi-stage features processed by RepNCSP to enhance the multi-scale expressive power of the features, achieving a combination of efficient feature extraction and attention enhancement mechanisms. RepNCSPELAN4 first adjusts the number of channels using a 1×1 convolution to prepare for subsequent channel segmentation, as shown in the following formula:

[0054]

[0055] In the formula H represents the number of channels, and H and W represent the height and width of the feature map at each stage, respectively. The dimension is determined by the number of channels. ,high and width definition, =256, H=1080, W=400. The input features are uniformly divided along the channel dimension to obtain the first and second half of the features. The specific formula is as follows:

[0056]

[0057]

[0058] in, This represents the first half of the features after segmentation, which serves as the basis for shallow features and will be directly used for subsequent feature fusion. The latter half of the segmented features needs to undergo deep semantic extraction through two RepNCSP units, which can be defined as follows:

[0059]

[0060] in, This represents the processed feature map. For the number of channels, =128. yes After processing by the first RepNCSPE unit, the channels are adjusted through convolution. yes After processing by the second RepNCSPE unit, the channels are adjusted through convolution. It retains the basic information of the original features. , This represents the deep semantic enhancement result of the latter half of the features. Finally, the processed feature map is fused with the shallow features to achieve a complementary fusion of shallow and deep semantic features, as shown in the following formula:

[0061]

[0062]

[0063] in, This represents the feature map after fusing shallow features and deep semantic features. This represents the final output feature map after 1×1 convolutional compression of the channels. The RepNCSPELAN4 structure not only reduces computational redundancy but also promotes information flow between different channels, enabling the network to extract features and perform object detection more efficiently. The cross-stage partial connection mechanism facilitates information flow between different stages of the network, improves feature transfer efficiency, avoids redundant computation, and allows the model to retain complete feature representations while reducing computational costs. Furthermore, the parallel structure improves feature extraction efficiency; this dual capability helps identify task-relevant salient features and filter out irrelevant data.

[0064] ADown, as the core downsampling component of the neck network, works efficiently with RepNCSPELAN4 and the overall network architecture. First, ADown performs average pooling on the input features, preserving global semantic information and smoothing background noise, as shown in the following formula:

[0065]

[0066] in, This is the feature map obtained after average pooling (AvgPool) operation. Subsequently, the Favg is uniformly split into two parts along the channel dimension. and The definition is as follows:

[0067]

[0068]

[0069] right Perform convolution operations to extract contextual features of the defect region; Max pooling is performed to enhance local extremum features and highlight defect edges. Then, convolution operations are used to adjust the number of channels to preserve high-frequency detail features. The specific formula is as follows:

[0070] The convolution kernel size is 3×3, and a stride of 2 is used to maintain the regularity of halving the feature map dimensions. An excessively large stride will damage small defect features, so a stride of 2 and padding of 1 are configured to ensure that the output dimension is precisely aligned with the global path. It is the feature of the second half in the ADown component. The output feature map after max pooling enhances local extremum features and highlights defect edges, providing a foundation for subsequent convolutional operations, i.e., adjusting the number of channels and preserving high-frequency details. The parallel design of average pooling and max pooling solves the core trade-off problem in strip edge defect detection: preserving global semantic continuity while enhancing local extrema. This heterogeneous strategy is non-redundant, with each path capturing unique and complementary defect features.

[0071]

[0072]

[0073] in, It is the feature of the first half after segmentation in the ADown module. The output feature map after convolution operation, which enhances the local receptive field. The contextual relevance preserves the global semantic information after average pooling for subsequent fusion. It is the feature of the latter half after segmentation in the ADown module. The output feature map after performing max pooling and convolution operations. Max pooling highlights the strong response regions of defects and enhances local extreme features. Convolution operation adjusts channels while preserving high-frequency details, providing local detail features for subsequent fusion.

[0074] Finally, multiple outputs are concatenated along the channel dimension to generate the final downsampled features. This allows for efficient fusion of high-level and low-level features, preserving fine-grained information in shallow layers and enhancing high-order semantic representations in deeper layers. The specific formula is as follows:

[0075]

[0076] As explained above, ADown maintains excellent detection performance while reducing computational costs. A schematic diagram of the ADown module is shown below. Figure 4 As shown, the number of output channels and the number of input channels can be configured independently and flexibly to maintain the flexibility of the model.

[0077] The PBSF module employs an ELAN structure for efficient feature aggregation and enhances target features through a CAA mechanism, resulting in more natural feature representation. By incorporating a CAA channel attention mechanism, it can better filter and strengthen key feature information, effectively filtering background interference and enhancing key feature responses. This allows for better integration with networks centered around the RepNCSPELAN4 module, ensuring consistency in information flow. Its detailed structure is as follows: Figure 5 As shown.

[0078] The PBSF module employs a multi-branch training and single-branch inference strategy, optimizing feature extraction through block-based progressive processing and channel attention mechanisms. First, the input is uniformly split into two parts after convolution. The first part retains shallow details, while the second part progressively extracts high-order semantics through structural reparameterization and convolution operations in the RepNCSP module, forming multi-scale receptive field features. Second, the multi-path features are concatenated, and the channel weights are dynamically adjusted using a lightweight channel attention (CAA) mechanism. This mechanism compresses spatial information through global average pooling, learns channel dependencies through two fully connected layers, and finally integrates the output through convolution. By combining the inference efficiency of RepNCSP with the context-aware capability of CAA, parameter redundancy is reduced while enhancing the ability to capture complex features, significantly improving detection accuracy and real-time performance. The CAA attention mechanism aims to improve the model's ability to capture long-range contextual information while enhancing the expression of central features. CAA first performs average pooling, followed by a 1×1 convolution to obtain local region features, as shown in the following formula:

[0079]

[0080] Next, two lightweight depthwise separable stride convolutions (DWConv) are used to extract features and expand the receptive field, which also helps in the identification and extraction of slender targets. Depthwise separable convolution decomposes standard convolution into channel-wise convolution and pointwise convolution. First, a single-channel convolution kernel is used to perform independent spatial convolution on each channel, keeping the depth of the input feature map unchanged, resulting in an output feature map with the same number of input channels. The specific formula is as follows:

[0081]

[0082]

[0083] In the above formula and These are the width-direction and height-direction output feature maps of the lightweight depthwise separable convolution (DWConv) operation, respectively. Without increasing parameters and computational cost, it enhances the model's ability to capture long-distance contextual information and slender target features, and is a key step in extracting multi-directional local region features in CAA (channel attention mechanism).

[0084] The CAA module enhances its ability to capture long-range relationships by increasing the size of the stride convolutional kernel. Due to its depth-separable design, the algorithm does not significantly increase computational cost. Finally, the attention scores are normalized to the (0,1) interval using the sigmoid function to generate attention weights, which are then used to weight and optimize the original features. The specific formula is as follows:

[0085]

[0086] In hybrid encoders, the C2PKIK module is a core component for improving feature discrimination in scenes with scale variations and low contrast. The module's structure is as follows: Figure 6 As shown. KAN is the Kolmogorov-Arnold network module, and DWConv is a depthwise separable convolutional module. The C2PKIK module integrates three complementary components, including the cross-stage partial structure C2PSA, the multi-scale PKIKNet (recalibration module), and the KAN network. C2PSA is used to preserve semantic integrity, PKIKNet is used to improve receptive field adaptability, and KAN is used to enhance non-linear expressive power. The C2PKIK module adopts a bi-branch paradigm, given the input feature map. C2PSA divides it into shortcut branches. With Enhancement Branch The formula is as follows:

[0087]

[0088] Among them, shortcut branches Ensure semantic stability and enhance branching. This is achieved through depth transformation to enrich feature representation. Within the enhancement branch, PKIKNet integrates multi-scale KAN-based convolutional kernels with a context anchor attention (CAA) mechanism, as shown in the following formula:

[0089]

[0090] In the formula, Wk represents the convolution kernel parameterized by KAN at different scales. For attention weights, The context features are related to the anchor point region. The outputs F' and F'' are fused with the shortcut branch to generate the final output Fout. This design improves robustness in scale-changing scenarios and suppresses background noise by explicitly fusing receptive fields of different sizes and adaptively strengthening defect-related anchor points. The KAN module further enhances nonlinear representation capabilities through basis function expansion. Unlike traditional neural modules that apply nonlinearity at nodes, KAN transfers nonlinearity to the edges and achieves function expansion through connections, as shown in the following formula:

[0091]

[0092] in, For learnable basis functions, is a coefficient. Using B-spline basis functions To ensure that the expansion possesses both expressive power and numerical stability, KAN's nonlinearity is transferred to the edge. This edge-based design enhances expressive power by modeling higher-order nonlinear relationships, enabling the capture of subtle patterns in complex defect contexts.

[0093] In the hybrid encoder, multiple MKGroupConv modules are also introduced to encode the multi-scale features output by C2PKIK, fuse local details and global context, and provide an effective feature table for the decoder, thereby reducing the number of parameters while enhancing the multi-scale feature extraction capability.

[0094] In one implementation, before step S30, the method further includes: constructing an initial defect detection model, which includes a neck network, a hybrid encoder, and a decoder. The neck network is used for multi-scale feature extraction, and the decoder is used to output defect category and location information. A training dataset is established based on preprocessed image data, and the images in the training dataset are labeled with the true category and bounding box information of the defects. The defect detection model is trained based on the training dataset, wherein the training process is supervised by a multi-task loss function, which includes at least a category classification loss, a bounding box regression loss, an intersection-union prediction loss, and a feature fusion loss. The training steps are iteratively executed until the model converges to obtain the target defect detection model.

[0095] It should be noted that the initial defect detection model refers to the neural network model built according to a pre-defined network architecture before training begins, and whose parameters have not yet been optimized. The initial defect detection model can have structures such as a neck network, a hybrid encoder, and a decoder. The labeled information can include the defect's category, such as edge cracks or holes, and its precise location marked with a bounding box. The multi-task loss function refers to the overall loss function, composed of a weighted sum of multiple independent loss terms, used to simultaneously optimize multiple sub-tasks. Specifically, the category classification loss measures the difference between the model's predicted defect category and the true category, and is used to optimize the model's classification accuracy. The bounding box regression loss measures the difference between the model's predicted defect bounding box location and size and the true bounding box, and is used to optimize the model's localization accuracy. The intersection-over-union (IoU) prediction loss measures the difference between the model's additional predicted bounding box and the true bounding box (IoU) value and the true IoU value, and is used to improve the model's self-evaluation ability regarding the quality of the predicted boxes. The feature fusion loss is a regularization loss designed for the attention weight distribution of the multi-branch feature recalibration module in the hybrid encoder. This regularization loss encourages the multi-branch feature recalibration module to perform more reasonable and diverse feature fusion. After the initial model is fully trained until convergence, the target defect detection model is obtained and used for actual online defect detection tasks.

[0096] For example, the total loss function can be expressed as:

[0097] in, This represents the category classification loss; This represents the bounding box regression loss; This represents the IoU prediction loss, used to improve positioning accuracy; This represents the dynamic feature fusion loss, used to optimize the feature weighting of the C2PKIK module; , , Here, are the weighting coefficients, =5.0, =1.0, =0.5.

[0098] Category classification loss Focal Loss and a class balance factor are used to address defect class imbalance. The strip steel defect dataset exhibits class imbalance, and an improved Focal Loss method is employed, expressed as follows:

[0099] Where N is the number of queries; C is the number of defect categories; For tags; The class probability predicted by the decoder; For category balance factors, specifically, edge cracks =1.5, Hole =1.2, gap =1.0; γ=2 is the modulation coefficient of Focal Loss, used to reduce the weight of easily classified samples and focus on difficult-to-classify samples.

[0100] Bounding box regression loss The dynamic weighted CIoU Loss is expressed as:

[0101] In the formula For prediction boxes With real frame The complete intersection-union ratio; For dynamic weights, defined as:

[0102] in, To increase the optimization priority of highly overlapping bounding boxes; We assign a weight β=2.0 to small targets and β=0.5 to large targets to enhance the accuracy of small defect localization. To improve the confidence of the bounding box and ensure that the IoU prediction value output by the decoder matches the true IoU, we use Smooth L1 Loss for IoU prediction, expressed as:

[0103]

[0104] in, Indicates the true IoU. This represents the predicted IoU value. Its function is to enable the model to distinguish between "high-quality boxes" and "low-quality boxes" through supervised IoU prediction, thereby improving the accuracy of the decoder's query selection.

[0105] For the context anchor attention (CAA) of the C2PKIK module, an attention weight regularization loss is introduced to ensure the rationality of its dynamically weighted multi-scale features. A dynamic feature fusion loss is proposed, expressed as:

[0106] Where K is the number of anchor points in the CAA submodule; Let H be the attention weight for the kth anchor point, with dimensions H×W, corresponding to the dimension of the feature map space. L2 regularization is used to prevent overfitting due to excessively large weights; Entropy( Entropy regularization encourages a diverse distribution of weights, avoids all anchor points focusing on the same region, and enhances the ability to capture features of complex defects, such as multi-scale mixed defects.

[0107] In this implementation, a high-quality, standardized learning material is provided for the model by constructing and training a dataset of strip steel defect images labeled with precise category and location information, thus solving the performance bottleneck caused by data scarcity or inconsistent labeling. During training, a composite multi-task loss function is used for supervision. This function not only ensures the accuracy of model recognition and the precision of localization through classification loss and bounding box regression loss respectively, but also enhances the model's self-evaluation ability regarding the reliability of prediction results by introducing intersection-over-union prediction loss. Simultaneously, a specially designed feature fusion loss is used to constrain the core feature recalibration module, solving the problems of imbalanced multi-task optimization and potential inaccuracies in the feature fusion mechanism. Iterative training until model convergence ensures that model parameters are fully optimized, ultimately resulting in a stable and high-performance target detection model. This systematic model construction and training method synergistically optimizes the entire process from feature extraction and fusion to final prediction, achieving a comprehensive improvement in the detection model's accuracy, robustness, and generalization ability, providing reliable core algorithm support for industrial online inspection.

[0108] In one implementation, step S40 includes: Step S401: The encoded information is decoded by a decoder to generate multiple query vectors about the defects.

[0109] It should be noted that the decoder can convert the abstract, compressed feature representations extracted by the encoder back into a specific task output format, such as detection boxes and categories. A query vector can be understood as a learnable feature vector, where each vector represents a hypothesis or query from the model about a potential defect instance in the image, used to query and aggregate related features from the encoded information.

[0110] Step S402: For each query vector, predict the defect category probability, bounding box coordinates, and predicted intersection-union ratio with the true bounding box in parallel using the detection head.

[0111] It should be noted that the detection head can be attached to a lightweight network module at the end of the decoder, receiving the query vector as input and directly outputting the final prediction result for that query, such as category and coordinates. Parallel prediction means that the detection head simultaneously outputs all corresponding prediction targets for each query vector, namely category, bounding box coordinates, and intersection-over-union (IoU), to improve computational efficiency. Category probability refers to the distribution of the likelihood that the object represented by the current query vector belongs to each preset defect category, as predicted by the model, and can be normalized using the Softmax function. Bounding box coordinates are the positional parameters of the rectangular box predicted by the model for locating defects, which can be expressed as the coordinates of the box's center point, width, and height. The predicted IoU can be understood as an estimate of the degree of overlap between the bounding box predicted by the model for the current query vector and the assumed true bounding box; it is a confidence score of the model's own localization quality.

[0112] Step S403: Determine the final defect category corresponding to each query vector based on the category probability and the predicted intersection-union ratio.

[0113] It should be noted that the final defect category is a unique defect type result determined for each query vector after combining the category probability and the predicted intersection-union ratio.

[0114] Step S404: Determine the defect location corresponding to each query vector based on the bounding box coordinates.

[0115] It should be noted that the defect location can also indicate the position of the defect along the length of the strip. For example, by combining the strip running speed signal and the image acquisition timestamp, the position in the image can be mapped onto the actual steel coil, thereby determining which meter of the strip coil the defect occurred at.

[0116] In this implementation, a decoder transforms semantically rich encoded information into a series of structured query vectors. Each vector focuses on locating and representing a potential defect instance from global features, resolving the feature redundancy and target confusion issues inherent in traditional dense prediction methods. This achieves abstraction and instantiation of the detection process. Subsequently, for each query vector, the detection head predicts its class probability, precise bounding box coordinates, and a prediction crossover ratio (CCR) reflecting the localization quality in parallel. This addresses the problem that traditional methods, relying solely on classification confidence, may assign high classification scores to erroneous predictions with poor localization, thus enhancing the ability to filter high-quality detection results. Through a decoding mechanism based on queries and collaborative prediction, a clearer and more reliable representation and inference of defect instances is achieved, significantly improving the accuracy and reliability of defect detection results in complex industrial scenarios.

[0117] Based on the same inventive concept, such as Figure 7As shown, this application also provides a cold-rolled strip edge defect detection system, which includes: strip 10, hardware subsystem 20, guardrail 30, and processing unit 40; the hardware subsystem 20 is symmetrically installed on both sides of the guardrail 30, and is used to collect defect images of the current strip edge; as shown Figure 8 As shown, the hardware subsystem 20 includes a square steel platform 201, an electrically controlled sliding table unit 202, a support frame 203, a line scan camera 204, a light source 205, and an electrical cabinet 206. The square steel platform is fixed to the ground with anchor bolts to provide support. The electrically controlled sliding table unit 202 is horizontally mounted on the square steel platform. The support frame 203 has an L-shaped structure; its vertical section is connected to the slider of the electrically controlled sliding table unit 202, and its horizontal section is equipped with the line scan camera 204 and the light source 205, extending to the vicinity of the strip edge for image acquisition. The light source 205 is located directly below the line scan camera 204 to provide uniform illumination and enhance image contrast. The electrical cabinet 206 is mounted on the square steel platform and integrates a control unit, which is electrically connected to the electrically controlled sliding table unit 202, the line scan camera 204, and the light source 205, respectively, for centralized control of image acquisition and motion adjustment. The processing unit 40 is communicatively connected to the control unit and is used to execute the cold-rolled strip edge defect detection method described in the above embodiments and implementations.

[0118] It should be noted that the line scan camera 204 can be a high-resolution CCD camera, fixed directly below the horizontal section of the support frame 203 via a camera bracket, with the lens axis perpendicular to the surface of the target object, or the angle can be adjusted according to the detection requirements. The control unit can be a PLC controller.

[0119] The support frame 203 is also equipped with a dustproof device 207 and an anti-collision device 208. The dustproof device 207 covers the line array camera 204 and the light source 205 with a clip to prevent dust and oil from contaminating the optical components. The anti-collision device 208 is installed at the front end of the support frame 203 to monitor obstacles in the movement path and trigger the emergency braking of the electronically controlled slide unit 202 when there is a risk of collision.

[0120] In one implementation, such as Figure 9As shown, the electrically controlled slide unit 202 includes a servo motor 2021, a coupling 2022, a lead screw 2023, a laser rangefinder 2024, a sensor mounting base 2025, a composite slider 2026, a lead screw 2027, and a slide controller 2028. The servo motor 2021 is connected to the lead screw 2023 via the coupling 2022, driving the composite slider 2026 to perform linear reciprocating motion along the lead screw 2023. The laser rangefinder 2024 is mounted on the sensor mounting base 2025, which is fixed to the composite slider 2026, to measure the distance between the line scan camera 204 and the edge of the strip in real time. The slide controller 2028 is connected to the lead screw 2027 and is used to coordinate the movement of the composite slide 2026 to precisely adjust the position of the line scan camera 204.

[0121] It should be noted that the electrically controlled slide unit 202 can be a dual-slide composite linear motion mechanism, consisting of a first slide unit and a second slide unit working together. The first slide unit may include a servo motor 2021, a coupling 2022, a lead screw 2023, and a composite slider 2026. The second slide unit may include a sensor mounting base 2025, a composite slider 2026, a lead screw 2027, and a slide controller 2028. The composite slider 2026 serves as the connection structure between the first and second slide units, ensuring the synchronization and structural rigidity of the dual slide movements.

[0122] In addition, the hardware subsystem also includes a cable chain 209. One end of the cable chain 209 is fixed to the fixed end of the electronically controlled slide unit 202 by a buckle, near the side of the electrical cabinet 206, and the other end is fixed to the vertical section of the support frame 203. Signal cables and power cables for the line scan camera 204, light source 205, and laser rangefinder sensor 2024 are threaded through it. The cable chain 209 is used to extend and retract synchronously with the composite slider 2026 when the support frame 203 moves, protecting the cables from pulling and twisting damage, and ensuring the continuity and stability of signal transmission.

[0123] It should be noted that the processing unit 40 may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processing unit 40 may also include onboard memory for caching purposes. The processing unit 40 may be a single processing unit 40 or multiple processing units 40 for performing different actions of the method flow according to the embodiments of this application.

[0124] In this embodiment, after the electrical cabinet is powered on, the PLC controller sends an initialization command, and the electrically controlled slide unit moves the support frame to the initial set position. The light source and line scan camera enter standby mode. When the target to be measured enters the detection area, the PLC controller receives a signal and sends a motion command to the servo driver of the electrically controlled slide unit. At this time, the laser rangefinder measures the distance moved by the electrically controlled slide unit in real time and feeds the data back to the PLC controller to adjust the movement speed of the slide. When the support frame moves to the designated detection position, the PLC controller sends a command: the light source is turned on and adjusted to the preset brightness, and the line scan camera begins to acquire images. Throughout the entire movement process, the anti-collision device monitors in real time whether the front end of the support frame collides with the strip steel or the guardrail during the movement. If the sensor immediately sends an emergency stop signal to the PLC controller, the electrically controlled slide unit stops moving to avoid damage to the device. Through mechanical assembly and electrical connection, an integrated detection structure is formed. Relying on precise mechanical transmission, real-time signal acquisition, and stable control logic, high-precision, high-speed online detection of edge defects in cold-rolled strip steel is achieved. It should be noted that the cold-rolled strip edge defect detection system provided in this application embodiment and the cold-rolled strip edge defect detection method provided in this application embodiment are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned cold-rolled strip edge defect detection method, and the repeated parts will not be described again.

[0125] In one embodiment, this application also provides a non-transitory storage medium storing a computer program that, when executed by the processing unit 40, implements the aforementioned method for detecting edge defects in cold-rolled strip steel. This storage medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not be assembled into that device / apparatus / system. The aforementioned non-transitory storage medium carries one or more programs, which, when executed, implement the method as described in the embodiments or implementations of this application.

[0126] According to embodiments of this application, a non-transitory storage medium can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. A computer-readable signal medium can also be any storage medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the storage medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, optical fiber, radio frequency signals, etc., or any suitable combination thereof.

[0127] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0128] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application. Therefore, the scope of this application should not be limited to the above embodiments. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for detecting edge defects in cold-rolled strip steel, characterized in that, The method for detecting edge defects in cold-rolled strip steel is applied to the edge defect detection system for cold-rolled strip steel, which includes a linear array camera and a laser rangefinder sensor. The method includes: In response to the running speed of the strip, a synchronous trigger signal is generated to control the line array camera to acquire images. During the image acquisition process, based on the real-time feedback information from the laser rangefinder sensor, the actuator is driven to adjust the distance between the line array camera and the edge of the strip. The original image data of the steel strip edge is acquired from the line scan camera and preprocessed to obtain preprocessed image data. The preprocessed image data is input into the target defect detection model for feature encoding to obtain encoded information. The target defect detection model includes a hybrid encoder and a decoder. The hybrid encoder includes a multi-branch feature recalibration module, a multi-kernel group convolution module, and a progressive feature aggregation module. The multi-branch feature recalibration module is used to recalibrate the basic feature map. The progressive feature aggregation module is used to optimize the feature extraction process through block progressive processing and channel attention mechanism. The encoded information is input into the decoder of the target defect detection model to obtain the defect category and location information; The step of inputting the preprocessed image data into the target defect detection model for feature encoding to obtain encoded information includes: performing preliminary downsampling and feature extraction on the preprocessed image data through a neck network to output at least three basic feature maps at different scales, including: performing initial feature extraction and channel integration on the preprocessed image data through a feature extraction module to obtain initial features, wherein the feature extraction module adopts a cross-stage partial connection structure and a layer aggregation structure; performing dimensionality reduction on the initial features based on the downsampling module by performing average pooling and max pooling operations in parallel, and concatenating the outputs of the two along the channel dimension to generate a basic feature map of one scale; repeating the dimensionality reduction operation of the downsampling module at least twice to generate the at least three basic feature maps at different scales, including a first-scale feature map, a second-scale feature map, and a third-scale feature map; the neck network includes multiple convolutional layers, a RepNCSPELAN4 module, and an ADown multi-path heterogeneous downsampling module; The basic feature map at at least one scale is input to the multi-branch feature recalibration module. The input features are processed in parallel through two paths, and the outputs of the two paths are fused to obtain a multi-scale feature map. The two paths include the path corresponding to the nonlinear function network and the path corresponding to the context attention mechanism. The input of the basic feature map at at least one scale to the multi-branch feature recalibration module includes: inputting the first-scale feature map and the second-scale feature map into the multi-branch feature recalibration module, inputting the third-scale feature map into the first multi-kernel group convolution module, and then inputting it into the multi-branch feature recalibration module sequentially through the AIFI and the second multi-kernel group convolution modules. The multi-scale feature map is input into the progressive feature aggregation module and the multi-kernel group convolution module to obtain the encoded information.

2. The method as described in claim 1, characterized in that, The step of generating a synchronous trigger signal in response to the running speed of the strip to control the line array camera to acquire images, and driving the actuator to adjust the distance between the line array camera and the edge of the strip based on real-time feedback information from the laser rangefinder sensor during the image acquisition process, includes: The current running speed of the strip is obtained, and the corresponding speed signal is converted into a trigger pulse signal that matches the line frequency of the line scan camera; The laser rangefinder continuously measures the actual distance from the front end of the linear array camera lens to the side edge of the strip steel. The actual distance is compared with the preset optimal imaging distance range. When the actual distance exceeds the optimal distance range, a control command is generated to drive the electronically controlled slide to move the line scan camera in a direction perpendicular to the running of the strip until the actual distance falls into the optimal distance range.

3. The method as described in claim 1, characterized in that, The basic feature map includes a first sub-feature and a second sub-feature. The step of inputting the basic feature map at at least one scale into the multi-branch feature recalibration module, processing the input features through dual-path parallel processing, and fusing the outputs of the two paths to obtain a multi-scale feature map includes: The first sub-feature is processed sequentially through a convolutional layer parameterized by a learnable basis function to perform a nonlinear feature transformation, resulting in the nonlinearly transformed first sub-feature. For the second sub-feature, the attention weight map of the spatial dimension is obtained by calculating through the context anchor attention mechanism; The second sub-feature is weighted based on the attention weight map to obtain the weighted second sub-feature. The first sub-feature after the nonlinear transformation is fused with the second sub-feature after the weighting to obtain a multi-scale feature map.

4. The method as described in claim 1, characterized in that, Before the step of inputting the preprocessed image data into the target defect detection model for feature encoding to obtain encoded information, the method further includes: An initial defect detection model is constructed, which includes a neck network, a hybrid encoder, and a decoder. The neck network is used for multi-scale feature extraction, and the decoder is used to output defect category and location information. A training dataset is established based on the preprocessed image data, and the images in the training dataset are labeled with defective true categories and bounding box information. The initial defect detection model is trained based on the training dataset, wherein the training process is supervised by a multi-task loss function, which includes at least category classification loss, bounding box regression loss, intersection-union prediction loss, and feature fusion loss. The training steps are executed iteratively until the model converges, resulting in the target defect detection model.

5. The method as described in claim 1, characterized in that, The step of inputting the encoded information into the decoder of the target defect detection model to obtain the defect category and location information includes: The decoder decodes the encoded information to generate multiple query vectors about the defects; For each query vector, the defect category probability, bounding box coordinates, and predicted intersection-union ratio with the true bounding box are predicted in parallel using the detection head. Based on the category probability and the predicted intersection-union ratio, the final defect category corresponding to each query vector is determined; Based on the bounding box coordinates, the defect location corresponding to each query vector is determined.

6. A cold-rolled strip edge defect detection system, characterized in that, The cold-rolled strip edge defect detection system includes: strip steel, hardware subsystem, guardrail and processing unit; The hardware subsystem is symmetrically installed in the middle of the guardrail and is used to collect defect images of the current steel strip edge. The hardware subsystem includes a square steel platform, an electrically controlled sliding table unit, a support frame, a line scan camera, a light source, and an electrical cabinet. The square steel platform is fixed to the ground with anchor bolts for support. The electrically controlled sliding table unit is horizontally mounted on the square steel platform. The support frame has an L-shaped structure; its vertical section is connected to the slider of the electrically controlled sliding table unit, and its horizontal section houses the line scan camera and the light source, extending to the vicinity of the strip edge for image acquisition. The light source is located directly below the line scan camera to provide uniform illumination and enhance image contrast. The electrical cabinet is mounted on the square steel platform and integrates a control unit, which is electrically connected to the electrically controlled sliding table unit, the line scan camera, and the light source for centralized control of image acquisition and motion adjustment. The processing unit is communicatively connected to the control unit and is used to execute the cold-rolled strip edge defect detection method as described in any one of claims 1 to 5.

7. The system as described in claim 6, characterized in that, The electrically controlled slide unit includes a servo motor, coupling, lead screw, laser rangefinder, sensor mounting base, composite slider, lead screw, and slide controller; The servo motor is connected to the lead screw via the coupling, driving the composite slider to perform linear reciprocating motion along the lead screw. The laser rangefinder is mounted on the sensor mounting base, which is fixed to the composite slider to measure the distance between the line array camera and the edge of the strip in real time. The slide controller is connected to the lead screw and is used to coordinate the movement of the composite slide to precisely adjust the position of the linear array camera.

8. The system as described in claim 6, characterized in that, The support frame is also equipped with a dustproof device and an anti-collision device; The dustproof device covers the line array camera and light source with clips to prevent dust and oil from contaminating the optical components; The anti-collision device is installed at the front end of the support frame to monitor obstacles in the movement path and trigger the emergency braking of the electronically controlled slide unit when there is a risk of collision.