A blanket surface defect detection method and device based on a lightweight model

CN122962009APending Publication Date: 2026-10-23NANTONG YUANLONG FABRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610905274.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0006]本发明旨在针对现有毛毯表面缺陷检测技术中存在的采集时序与输送位移不同步、复杂纹理背景下微小缺陷识别精度不足、连续多帧信息利用不充分、边缘端部署实时性不佳以及缺陷结果难以映射至实际物理位置等问题,提出一种基于轻量化模型的毛毯表面缺陷检测方法及装置,以提升毛毯生产线在线检测的准确性、稳定性和工程适用性

Benefits of technology

本发明通过编码器脉冲触发采样,图像中所检测到的缺陷不仅能被识别出来,还能够被准确换算为布面上的实际位置和长度范围,显著提升了缺陷定位的可用性和后续工艺联动能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122962009A_ABST
    Figure CN122962009A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of blanket surface defect detection method based on lightweight model.The method obtains the pulse signal of blanket conveying mechanism encoder output, calculates blanket conveying displacement and conveying speed;According to the preset sampling pulse interval, gather blanket surface image, establish the corresponding relationship between image frame and blanket actual position;According to the physical displacement compensation amount corresponding to adjacent image, carry out space alignment, and realize multi-frame space-time feature fusion in combination with optical flow field;The image feature after fusion and the time sequence position coding generated by encoder pulse counting are jointly input into mixed lightweight target detection model for defect detection;According to conveying speed and defect probability, dynamically adjust detection frequency;According to detection result and pulse equivalent coefficient, determine defect actual position, size and category.The present application can improve the detection precision of small defect and complex defect in blanket production process, realize online real-time detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision inspection technology, specifically to a method and apparatus for detecting defects on the surface of a blanket based on a lightweight model. Background Technology

[0002] Blankets, as an important category of textiles, are typically produced using a continuous conveyor system to complete weaving, finishing, and winding processes. Due to factors such as raw material fluctuations, wear and tear on weaving equipment, tension variations, and the production environment, blanket surfaces are prone to defects such as broken yarns, stains, foreign objects, holes, and abnormal textures. Failure to detect and locate these defects in a timely manner not only affects product quality but also increases subsequent rework and quality management costs. Therefore, developing online automated detection systems for blanket surface defects is of great significance.

[0003] Current technologies for detecting surface defects in blankets primarily employ industrial cameras combined with target detection algorithms. These methods acquire images at fixed time intervals and use deep learning models to identify defects. However, blankets are continuously moving targets. When production line speeds change, fixed-time sampling can easily lead to inconsistencies in the actual conveying distances of adjacent images, resulting in duplicate defect detection, positional shifts, and even missed detections. Furthermore, most detection methods only utilize single-frame images for analysis, failing to fully leverage the temporal correlation features of defects during continuous conveying. There is still room for improvement in the detection performance for small defects, weakly textured defects, and motion-blurred scenes.

[0004] Furthermore, existing detection systems typically only output the pixel coordinates of defects in images, making it difficult to accurately obtain the actual location and size information of defects on the blanket. This results in a lack of effective correlation between the detection results and subsequent quality traceability, roll-to-roll processing, and production management. Therefore, establishing a correspondence between image detection results and the actual transport position of the blanket, and improving detection accuracy in continuous motion scenarios while ensuring real-time performance, has become a pressing technical problem to be solved in this field.

[0005] To address the aforementioned issues, this application introduces an encoder physical scale constraint mechanism. By establishing a synchronous relationship between the actual displacement of the blanket and image acquisition through encoder pulses, and combining it with a multi-scale recursive feedback detection network to achieve defect identification, thereby improving the detection accuracy, positioning precision, and engineering application value in continuous conveying scenarios. Summary of the Invention

[0006] This invention aims to address the problems existing in current blanket surface defect detection technologies, such as asynchronous acquisition timing and conveying displacement, insufficient accuracy in identifying minute defects against complex texture backgrounds, inadequate utilization of information from multiple consecutive frames, poor real-time performance of edge deployment, and difficulty in mapping defect results to actual physical locations. It proposes a blanket surface defect detection method and device based on a lightweight model to improve the accuracy, stability, and engineering applicability of online detection in blanket production lines.

[0007] A method for detecting surface defects in blankets based on a lightweight model, characterized by comprising the following steps: S1. Obtain the pulse signal output by the encoder installed on the blanket conveying mechanism, and calculate the cumulative conveying displacement and current conveying speed of the blanket according to the pre-calibrated pulse equivalent coefficient. S2. Based on the preset sampling pulse interval, control the image acquisition device to acquire images of the blanket surface and establish the correspondence between the image frame number, the cumulative pulse number and the actual position of the blanket; S3. Calculate the inter-frame physical displacement compensation amount based on the pulse difference corresponding to adjacent image frames, and spatially align the continuous images based on the physical displacement compensation amount to obtain a multi-frame image sequence synchronized with the blanket conveying process. S4. Input the multi-frame image sequence into the lightweight optical flow alignment module, calculate the optical flow field between consecutive frames, and perform spatial transformation on the feature map of the previous frame based on the optical flow field and fuse it with the feature map of the current frame to obtain spatiotemporal fusion image features. S5. The spatiotemporal fusion image features and the temporal position code generated by encoder pulse counting are jointly input into the hybrid lightweight target detection model for defect detection, wherein the hybrid lightweight target detection model includes: The backbone network adopts the MobileNetV3-Large architecture, with shallow layers using grouped convolution and channel shuffling, and deep layers introducing a dual-pooling high-efficiency channel attention module. A multi-scale feature recursive feedback fusion network is used to feed back high-level semantic features to shallow feature layers via a recursive feedback path and iteratively refine shallow detailed features. The detection head employs a decoupled head structure, a dynamic label allocation strategy, and the bounding box FECIoU loss function. S6. In the multi-scale feature recursive feedback fusion network, the current layer features are weighted and fused with the previous high-level features from the feedback path, and the fusion result is propagated along the bottom-up transmission path until a preset recursive round is reached or the feature change amplitude is less than a preset threshold. S7. Determine the defect probability based on the conveying speed and historical detection results, and adjust the image sampling frequency and detection frequency based on the conveying speed and defect probability. S8. Based on the detected defect bounding box and the pulse equivalent coefficient, map the defect area to the actual spatial coordinates of the blanket, and output the location, size and category information of the defect.

[0008] Preferably, the input step of the multi-frame image sequence includes: stacking consecutive multi-frame images along the channel dimension, and before stacking, performing spatial transformation on the previous frame image or the previous frame feature map based on the optical flow field between consecutive frames, so that the target regions of adjacent frames tend to be aligned in spatial position, and then inputting them into the hybrid lightweight target detection model.

[0009] Preferably, the consecutive multi-frame images are 3 to 7 frames, and are obtained using a sparse sampling method; the multi-frame images are fused early before being input into the model, and features are extracted through convolutional layers with shared weights.

[0010] Preferably, the optical flow field is calculated by a lightweight optical flow algorithm, which is a NeuFlow shallow convolutional neural network structure, and the image acquisition time and the encoder pulse counting time are synchronized through the IEEE 802.1AS time synchronization protocol.

[0011] Preferably, the multi-scale feature recursive feedback fusion network includes a bottom-up main transmission path, a top-down feedback path, and feature fusion nodes; in each recursive round, the high-level semantic features output from the previous round are transmitted to the shallow feature layer through the feedback path, and then weighted and fused with the current layer features after aligning with the number of channels, and then continue to be transmitted along the main transmission path.

[0012] Preferably, the number of recursive rounds is 2 to 4, and the change range of the fusion feature is determined after each round of recursion. When the change range is less than a preset threshold, the recursion stops.

[0013] Preferably, the defect probability is determined based on the defect detection rate within the sliding window, wherein the defect detection rate within the sliding window is the ratio of the number of defects detected within the sliding window to the total number of detections. The actual detection frame rate is dynamically calculated based on the base frame rate, defect probability, and adjustment coefficient, and satisfies the following relationship: in, The actual detected frame rate. Based on the frame rate, This represents the defect probability. This is the adjustment coefficient.

[0014] Preferably, the encoder is an incremental rotary encoder installed on a traction roller, drive roller, or take-up roller. The mapping relationship between the image frame number, pulse count value, and the actual position of the blanket is established through a position lookup table, which records the cumulative number of pulses and the converted actual length position corresponding to each image frame.

[0015] Preferably, after mapping the defect area to the actual spatial coordinates of the blanket, the starting position, ending position, center position, length, and category information of the defect are output, and a defect record table is generated.

[0016] A blanket surface defect detection device is used to perform any of the above-described blanket surface defect detection methods.

[0017] Compared with the prior art, the present invention has the following beneficial effects: This invention uses encoder pulse-triggered sampling, which not only identifies defects detected in the image but also accurately converts them into the actual position and length range on the fabric surface, significantly improving the usability of defect location and the ability to link with subsequent processes.

[0018] Secondly, the multi-scale feature recursive feedback fusion network set up in this invention transmits high-level semantic features back to the shallow feature layer through a recursive feedback path, and performs weighted fusion of the current layer features and feedback features in each recursive iteration, so that the shallow detail features are enhanced and corrected in multiple rounds, thereby improving the ability to identify defects with blurred edges, small size and large scale changes, and reducing missed detections and false detections caused by texture interference.

[0019] Furthermore, this invention achieves a balance between detection accuracy and inference speed through the structural design of a hybrid lightweight target detection model. The model is suitable for high-precision identification of complex texture defects and can also meet the real-time deployment requirements at the edge of a blanket production line.

[0020] Finally, this invention can accurately map image detection results to the actual spatial coordinates of the blanket, improving the industrial usability of the detection results. Traditional detection systems typically only output defect bounding boxes on the image, which cannot directly reflect the actual position of the defect along the length of the blanket, causing inconvenience for subsequent roll-to-roll, marking, repair, rejection, and quality traceability. This invention converts pixel coordinates into the actual spatial coordinates of the blanket based on the detected defect bounding box and pulse equivalent coefficient, and outputs the defect's start position, end position, center position, size, and category information. Attached Figure Description

[0021] Figure 1 These are images of common surface defects in blankets; Figure 2 This is a schematic diagram of a device for detecting defects on the surface of a blanket based on a lightweight model. Figure 3 This is a flowchart of a method for detecting defects on the surface of a blanket based on a lightweight model; Figure 4 This is an image acquisition sequence of a method for detecting defects on the surface of a blanket based on a lightweight model; Figure 5 This is a schematic diagram of the synchronous image sequence construction of a method for detecting defects on the surface of a blanket based on a lightweight model; Figure 6 This is a lightweight backbone network structure diagram of a lightweight model-based method for detecting defects on the surface of blankets. Figure 7 This is a block diagram of a multi-scale recursive feedback fusion network structure for a blanket surface defect detection method based on a lightweight model. Detailed Implementation

[0022] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0023] This invention aims to improve several practical problems existing in online detection of surface defects in blankets, particularly addressing issues such as asynchronous image acquisition and actual fabric displacement under high-speed conveying conditions, difficulty in distinguishing defects from normal weave due to repetitive blanket textures, lack of effective temporal constraints between consecutive frames, difficulty in balancing accuracy and speed when deploying lightweight models at edges, and difficulty in directly mapping defect detection results to the actual physical location of the blanket. A method and device for detecting surface defects in blankets are proposed. By organically combining encoder pulse signals, synchronous image acquisition, multi-frame spatiotemporal feature fusion, recursive feedback feature enhancement, and defect physical coordinate mapping, a comprehensive solution suitable for continuous online detection in blanket production lines is formed.

[0024] To achieve the above objectives, see Appendix Figure 1-7 The present invention adopts the following technical solution: A method for detecting surface defects in blankets based on a lightweight model, characterized by comprising the following steps: S1. Obtain the pulse signal output by the encoder installed on the blanket conveying mechanism, and calculate the cumulative conveying displacement and current conveying speed of the blanket according to the pre-calibrated pulse equivalent coefficient.

[0025] Preferably, the encoder is an incremental rotary encoder installed on a traction roller, drive roller, or take-up roller. The mapping relationship between the image frame number, pulse count value, and actual position of the blanket is established through a position lookup table, which records the cumulative number of pulses and the converted actual length position corresponding to each image frame.

[0026] Specifically, in this embodiment, an incremental rotary encoder is installed on the traction roller, drive roller, or take-up roller of the blanket conveying mechanism. The encoder rotates synchronously with the roller and outputs pulse signals. See Appendix. Figure 2 .

[0027] The pulse signal output by the encoder first enters the counting unit in the image acquisition and control module. The counting unit accumulates the pulses in real time to obtain the current cumulative pulse count N. To convert the pulse count into the actual conveying length of the blanket, the pulse equivalent coefficient K needs to be determined in advance. The pulse equivalent coefficient K represents the actual conveying length of the blanket corresponding to a single pulse, and can be obtained by calibration using the encoder resolution and the geometric parameters of the conveying mechanism. For example, when the effective circumference of the roller is C and the number of pulses output per encoder revolution is M, the conveying length corresponding to a single pulse can be expressed as: Then, at any given moment, the cumulative transport displacement L of the blanket can be expressed as: Where L is the actual length of the blanket conveyed cumulatively from zero point, N is the cumulative number of pulses, and K is the pulse equivalent coefficient.

[0028] Furthermore, to obtain the current conveying speed of the blanket, a preset sampling period can be used. Internal statistical pulse increment And convert it into linear velocity based on the pulse equivalent coefficient. The calculation method can be expressed as: Where v is the current conveying speed of the blanket. This represents the number of pulses added between two adjacent sampling times. This represents the time interval between adjacent sampling times.

[0029] During actual operation, when the encoder detects the Z-phase reference pulse, the pulse count can be recalibrated to correct accumulated errors that may occur during long-term operation. Preferably, the pulse counting process can be combined with jitter reduction and filtering to reduce the impact of mechanical vibration, transient interference, or pulse spikes on the displacement calculation results. For high-speed conveying scenarios, the speed results within multiple sampling periods can also be subjected to moving average or weighted smoothing to obtain a more stable real-time conveying speed value and avoid speed fluctuations interfering with subsequent image acquisition cycles.

[0030] S2. Based on the preset sampling pulse interval, control the image acquisition device to acquire images of the blanket surface and establish the correspondence between the image frame number, the cumulative pulse count and the actual position of the blanket.

[0031] In this embodiment, after completing the acquisition of encoder pulse signals and the calculation of displacement and velocity in step S1, the image acquisition control module controls the acquisition timing of the industrial camera according to the preset sampling pulse interval, thereby achieving synchronization between image acquisition and the actual displacement of the blanket conveying. See Appendix. Figure 4 .

[0032] Specifically, the image acquisition control module pre-sets the sampling pulse interval. The sampling pulse interval represents the number of pulses allowed to accumulate between two adjacent image acquisitions. When the accumulated pulse count output by the encoder increases to a preset threshold after the current acquisition start point, the image acquisition control module immediately sends a trigger signal to the industrial camera, controlling the industrial camera to acquire one frame of the blanket surface image. Subsequently, the image acquisition control module continues to accumulate the pulses output by the encoder, and triggers the acquisition of the next frame of image when the preset sampling pulse interval is reached again. This process is repeated cyclically, thereby forming a continuous image acquisition sequence corresponding to the blanket conveying process.

[0033] The preset sampling pulse interval The sampling pulse interval is preferably set based on the spatial resolution required for target detection, the blanket conveying speed, and the camera's field of view. Since the blanket is a continuously conveyed material, if the sampling pulse interval is too large, the actual fabric area corresponding to adjacent images will be too long, easily leading to defects being lost across frames; if the sampling pulse interval is too small, it will introduce a large number of redundant images, increasing the computational burden of subsequent detection. Therefore, in this embodiment, the sampling pulse interval is preferably set to the number of pulses that ensures adjacent images cover a fixed length range of the blanket surface, so that each frame corresponds to a specific position segment on the fabric surface.

[0034] After each image acquisition is completed, the system synchronously records the image frame number corresponding to that frame. The cumulative number of pulses at the acquisition time And the actual position of the blanket calculated based on the pulse equivalent coefficient. The image frame number identifies the current image's order within the entire acquisition sequence, the cumulative pulse count characterizes the blanket's displacement state at the moment the image is acquired, and the actual blanket position establishes a connection between the image information and the physical coordinates along the fabric's length. This correspondence can be expressed as: in, For the first The actual position of the blanket corresponding to the frame image. For the first The cumulative number of pulses corresponding to the frame image acquisition. This is the pulse equivalent coefficient.

[0035] To facilitate subsequent defect location and tracing, this embodiment further establishes a position lookup table of "image frame number - pulse count value - actual blanket position". This table records the physical positional relationship corresponding to each image frame during acquisition; for example, it can be recorded as: the cumulative pulse count corresponding to the first image frame. and location The second frame image corresponds to the cumulative pulse count. and location And so on. Through this lookup table, the image-level defect boxes output by the subsequent model can be mapped to specific location segments along the actual length of the blanket, thus providing basic data support for defect tracking, roll marking, and quality analysis.

[0036] S3. Calculate the inter-frame physical displacement compensation amount based on the pulse difference corresponding to adjacent image frames, and spatially align the continuous images based on the physical displacement compensation amount to obtain a multi-frame image sequence synchronized with the blanket conveying process.

[0037] In this embodiment, after completing the image synchronization acquisition in step S2, it is necessary to further eliminate the spatial misalignment problem caused by displacement between adjacent images during the continuous transport of the blanket. Since the blanket is constantly in motion during transport, even if position synchronization is achieved based on encoder pulses during image acquisition, there will still be displacement differences between adjacent frames corresponding to the fabric area. If these continuous images are directly input into the subsequent detection model, the spatial position of the same defect in different frames can easily shift, thus affecting the multi-frame joint learning effect. Therefore, the core of this step is to calculate the physical displacement compensation amount between adjacent images based on the encoder pulse difference and to spatially align the continuous images so that multiple frames correspond to the same fabric area or adjacent continuous areas as much as possible.

[0038] Specifically, for the first Frame image and the first Frame images are first determined based on their corresponding cumulative pulse count. and Calculate pulse difference ,Right now: Then combine the pulse equivalent coefficient obtained in step S1 Calculate the physical displacement compensation amount between the two frames. ,Right now: in, Indicates the first Frame and the The displacement distance of the blanket in the actual transport direction between frames. This displacement compensation reflects the true movement distance of the blanket between adjacent sampling times and is a fundamental parameter for subsequent image spatial alignment.

[0039] After obtaining the physical displacement compensation amount, the image alignment module adjusts according to the... Spatial transformation processing is performed on continuous images. Specifically, the feature regions corresponding to the previous frame image can be translated and compensated according to the displacement direction, so that they coincide with the corresponding regions in the current frame image as much as possible in space. If the pixel resolution of the acquisition system is known, the physical displacement compensation amount can be further converted into pixel displacement amount. ,Right now: in, This represents the actual length scale corresponding to each pixel in the image, indicating the actual length of the blanket per unit pixel. This conversion allows the physical displacement compensation amount to be transformed into displacement compensation parameters on the image plane, facilitating pixel-level or sub-pixel-level translation of the image.

[0040] In a preferred embodiment, the spatial alignment is achieved using subpixel translation interpolation. Since the displacement calculated by the encoder may not exactly correspond to integer pixels, the image can be resampled via interpolation during the actual alignment process, allowing the target region in the previous frame to be mapped more accurately at the current position. This avoids boundary loss and detail blurring caused by simple integer pixel translation, making it particularly suitable for continuous detection of small defects on blanket surfaces.

[0041] In another implementation, spatial alignment does not directly process the original image. Instead, it first extracts intermediate feature maps from the image and then performs spatial transformation on the feature maps based on physical displacement compensation. Compared to directly aligning pixel images, feature map alignment can reduce interference from background texture repetition to some extent and reduce computational load, which is beneficial for the efficient operation of subsequent models at edges. Regardless of whether image-level alignment or feature-level alignment is used, the goal is to align multiple consecutive frames of images to the same surface area as much as possible before inputting them into the detection model, thereby enhancing the consistency of spatiotemporal features.

[0042] In this embodiment, the number of frames in the multi-frame image sequence can be set according to the detection requirements, preferably more than 3 frames, so that the model can capture the local change trend in the continuous motion scene. For high-speed blanket conveying scenes, the length of the multi-frame image sequence can also be dynamically adjusted according to the conveying speed, sampling pulse interval and target detection window, so that the temporal correlation between adjacent images is maintained, while avoiding excessive computational burden due to excessively long sequences.

[0043] S4. Input the multi-frame image sequence into the lightweight optical flow alignment module, calculate the optical flow field between consecutive frames, and perform spatial transformation on the feature map of the previous frame based on the optical flow field and fuse it with the feature map of the current frame to obtain spatiotemporal fused image features.

[0044] Preferably, the input step of the multi-frame image sequence includes: stacking consecutive multi-frame images along the channel dimension, and before stacking, performing spatial transformation on the previous frame image or the previous frame feature map based on the optical flow field between consecutive frames, so that the target regions of adjacent frames tend to be aligned in spatial position, and then inputting them into the hybrid lightweight target detection model.

[0045] Preferably, the consecutive multi-frame images are 3 to 7 frames, and are obtained using a sparse sampling method; the multi-frame images are fused early before being input into the model, and features are extracted through convolutional layers with shared weights.

[0046] Preferably, the optical flow field is calculated by a lightweight optical flow algorithm, which is a NeuFlow shallow convolutional neural network structure, and the image acquisition time and the encoder pulse counting time are synchronized through the IEEE 802.1AS time synchronization protocol.

[0047] See appendix Figure 5 In this embodiment, after completing the spatial alignment in step S3, although the consecutive frames of images have been kept as consistent as possible in terms of physical displacement, there may still be slight speed fluctuations, local stretching, slight shaking, fabric deformation, and motion blur caused by camera exposure time during the actual transportation of the blanket. Therefore, relying solely on encoder displacement compensation is insufficient to completely eliminate residual deviations between frames. Thus, this step further introduces a lightweight optical flow alignment module to estimate the pixel-level motion relationship between consecutive frames and to perform fine alignment and fusion of preceding and following frames at the feature level, thereby enhancing the adaptability of the subsequent defect detection model to dynamic scenes.

[0048] Specifically, in this embodiment, the lightweight optical flow alignment module receives the multi-frame image sequence constructed in step S3, and performs alignment on adjacent frames. and Calculate the corresponding optical flow field The optical flow field is used to describe the two-dimensional displacement relationship of the same fabric area between adjacent frames, and its expression can be as follows: in, and Representing pixels The optical flow field contains displacement components in the horizontal and vertical directions. By calculating this optical flow field, the motion direction and amplitude of each pixel in adjacent frames can be obtained, thus providing a basis for subsequent spatial transformations.

[0049] In a preferred embodiment, the lightweight optical flow alignment module is implemented using a NeuFlow shallow convolutional neural network structure. The NeuFlow structure features fewer parameters and faster inference speed, making it suitable for real-time deployment at the edge. Its input is adjacent frame images or shallow feature maps extracted from images, and its output is the corresponding optical flow displacement estimation result. Compared to traditional heavy optical flow networks, this structure can significantly reduce computational resource consumption while maintaining basic motion estimation accuracy, making it more suitable for high frame rate, low latency online detection scenarios such as blanket production lines.

[0050] After calculating the optical flow field, the system performs a spatial transformation on the previous frame image or the previous frame feature map based on the optical flow field, so that it overlaps with the current frame image as much as possible in geometric position. Specifically, the previous frame feature map can be denoted as... The transformation operator obtained based on the optical flow field is denoted as... Then the feature map after spatial transformation can be represented as: in, This represents the feature map of the previous frame after optical flow alignment. This spatial transformation process can be implemented using bilinear interpolation, subpixel sampling, or differentiable sampling to ensure a smooth and continuous transformation while preserving as many subtle texture features as possible on the blanket surface. Since blanket defects often have small size, weak boundaries, and low contrast, information loss must be minimized during the spatial transformation process; otherwise, it may affect the subsequent model's ability to identify the defect area.

[0051] After completing the spatial transformation of the previous frame feature map, the transformed previous frame feature map is... With the current frame feature map The data is fused to form a spatiotemporal fusion feature. The preferred fusion method is weighted fusion, channel-stitched convolutional fusion, or attention-guided fusion. In a preferred embodiment, a higher weight can be assigned to moving regions through an attention mechanism, enhancing regions on the blanket surface that exhibit significant motion changes in optical flow estimation, thereby strengthening the characteristic response of the defect location. The fusion result can be expressed as: in, This represents the fused spatiotemporal feature map. The fusion function can be a concatenation, element-wise weighted summation, or adaptive fusion based on attention weights.

[0052] Furthermore, in a preferred embodiment, the spatiotemporal fusion feature not only originates from the alignment relationship between the current frame and the previous frame, but can also be combined with multiple consecutive frames to accumulate stepwise to form a more stable temporal feature. For example, for the ... Frame and the After optical flow alignment of the frame, a fused feature is obtained. This fused feature is then compared with the first frame. Frames continue to be fused, forming a continuous and progressive spatiotemporal feature chain. This approach enhances the sustained response of defects across multiple frames and reduces the interference of random noise from a single frame on the detection results.

[0053] After completing optical flow alignment and spatiotemporal fusion, the system outputs spatiotemporal fused image features, which serve as one of the input features for the subsequent hybrid lightweight target detection model. These features retain the spatial texture information of the blanket surface while fusing motion correlation information between consecutive frames, enabling a better characterization of the dynamic surface state of the blanket during transport.

[0054] S5. The spatiotemporal fusion image features and the temporal position code generated by encoder pulse counting are jointly input into the hybrid lightweight target detection model for defect detection, wherein the hybrid lightweight target detection model includes: The backbone network adopts the MobileNetV3-Large architecture, with shallow layers using grouped convolution and channel shuffling, and deep layers introducing a dual-pooling high-efficiency channel attention module. A multi-scale feature recursive feedback fusion network is used to feed back high-level semantic features to shallow feature layers via a recursive feedback path and iteratively refine shallow detailed features. The detection head employs a decoupled head structure, a dynamic label allocation strategy, and the bounding box FECIoU loss function.

[0055] S6. In the multi-scale feature recursive feedback fusion network, the current layer features are weighted and fused with the previous high-level features from the feedback path, and the fusion result is propagated along the bottom-up transmission path until a preset recursive round is reached or the feature change amplitude is less than a preset threshold.

[0056] Preferably, the multi-scale feature recursive feedback fusion network includes a bottom-up main transmission path, a top-down feedback path, and feature fusion nodes; in each recursive round, the high-level semantic features output from the previous round are transmitted to the shallow feature layer through the feedback path, and then weighted and fused with the current layer features after aligning with the number of channels, and then continue to be transmitted along the main transmission path.

[0057] Preferably, the number of recursive rounds is 2 to 4, and the change range of the fusion feature is determined after each round of recursion. When the change range is less than a preset threshold, the recursion stops.

[0058] In this embodiment, after completing the optical flow alignment and spatiotemporal fusion in step S4, the obtained spatiotemporal fused image features need to be further input into the hybrid lightweight target detection model to achieve the classification, localization, and confidence assessment of defects on the blanket surface. Unlike the traditional method of detection based solely on a single frame image, this step not only utilizes the continuous frame features after spatial alignment and optical flow compensation, but also introduces temporal position coding generated by encoder pulse counting. This enables the model to simultaneously perceive both "image content" and "fabric surface position" when identifying defects, thereby enhancing its ability to discriminate defects in continuous motion scenes.

[0059] Specifically, see Appendix Figure 6 The hybrid lightweight target detection model comprises three parts: a backbone network, a multi-scale feature recursive feedback fusion network, and a detection head. The backbone network preferably adopts the MobileNetV3-Large architecture. Its shallow layers employ grouped convolutions and channel shuffling structures to preserve the texture edge information of the blanket surface as much as possible while reducing the number of parameters and computational cost. The deep layers introduce a dual-pooling efficient channel attention module, which adaptively enhances the channel responses related to defects by simultaneously modeling average pooling and max pooling features, suppressing the interference of large-area repetitive background textures on the detection results. Since blanket surfaces typically exhibit continuous texture, regular repetition, and small local differences, edges, fine lines, spots, and local texture variations in the shallow features are particularly important for defect identification, while the deep attention module helps to highlight more discriminative abnormal regions.

[0060] After basic features are extracted from the backbone network, these features are fed into a multi-scale feature recursive feedback fusion network. (See appendix) Figure 7 Unlike ordinary one-time feature pyramid fusion methods, this network uses a recursive feedback path to feed high-level semantic features back to shallow feature layers, where they are then weighted and fused with shallow detail features. This process is repeated along a bottom-up path, resulting in a multi-round iterative feature refinement process. Its core function is to use high-level semantic information to correct background noise in shallow features, while simultaneously using shallow fine texture information to compensate for the lack of perception of small defects and weakly defined defects by high-level features. For targets like blanket surfaces with relatively repetitive textures but significant differences in defect morphology, this network can significantly enhance the model's response to small targets, weakly contrasted targets, and targets with blurred edges.

[0061] In a preferred embodiment, the recursive feedback fusion network is configured with 2 to 4 rounds of recursive iteration. In each iteration, the current layer features are weighted and fused with the previous high-level features from the feedback path. The fusion result is then propagated downwards or upwards until a preset number of recursive rounds is reached or the feature change is less than a preset threshold. This process can be understood as a "feature iterative correction" mechanism, where the model does not make a final judgment directly in a single forward propagation, but rather continuously adjusts between high-level semantics and low-level texture to make the final output features more stable. This recursive refinement method is particularly effective for defects on blankets that are small in size, have unclear boundaries, and are not significantly different from normal weaves.

[0062] After multi-scale feature recursive feedback fusion, the features are further input into the detection head for defect prediction. The detection head preferably employs a decoupled head structure, separating the classification and regression tasks to avoid interference between the two tasks. The classification branch determines whether a candidate region is a defect and its type, while the regression branch predicts the location and size of the defect bounding box. Simultaneously, the detection head introduces a dynamic label allocation strategy, dynamically determining positive and negative samples based on the matching quality between the predicted and ground truth bounding boxes. This improves the rationality of positive sample allocation during training, particularly beneficial for addressing issues such as large target scale variations in blanket defects, sample imbalance, and complex backgrounds.

[0063] During bounding box regression, the detection head employs an improved FECIoU loss function. Compared to ordinary IoU-type losses, this loss function more comprehensively considers the overlap between the predicted and ground truth boxes, center offset, and boundary fit, and enhances the optimization effect on samples with large localization errors through an adaptive weight adjustment mechanism. This allows the model to output more accurate bounding box results when facing slender defects, blurred edge defects, or locally damaged defects, reducing box selection offset and size estimation errors.

[0064] In addition to the image features themselves, this step also fuses the temporal position code generated by encoder pulse counting with the image features. The temporal position code essentially reflects the blanket conveying position corresponding to the current image; it does not directly replace visual features but is embedded as a physical position prior in the feature fusion process. Specifically, the temporal position code can be fused with image features in the channel dimension, feature dimension, or embedding dimension, enabling the model to perceive the blanket length position, inter-frame displacement relationship, and continuous sampling order corresponding to the current defect. The advantage of this approach is that when identifying defects, the model not only considers the presence of abnormal textures in the current image but also its relative position in the conveying chain, further improving the consistency of defect responses between consecutive frames and reducing false detections caused by background texture repetition or local short-term noise.

[0065] In this embodiment, the introduction of temporal positional encoding also enhances the model's temporal contextual understanding. For example, when a defect appears continuously in adjacent frames, positional encoding helps the model identify the continuous existence of the defect in the blanket conveying direction; when an abnormal response in a frame is merely transient noise, combining positional encoding makes it easier for the model to distinguish between real defects and accidental interference, thereby improving the stability of the detection results. For continuously conveyed materials like blankets, this positional awareness is particularly important for defect tracking and fabric localization.

[0066] Furthermore, in this embodiment, the detection model outputs not only the defect category during inference, but also the defect bounding box and its corresponding confidence score. The classification result distinguishes different types of defects such as broken yarn, stains, wrinkles, foreign object attachment, and texture anomalies; the regression result obtains the spatial location and size information of the defect in the image; and the confidence score measures the reliability of the defect prediction result. If the confidence score is lower than a preset threshold, it can be used as a region to be reviewed for secondary confirmation; if the confidence score is higher than the threshold, it is directly output as a valid defect result. This reduces the risk of false detection while ensuring real-time detection efficiency.

[0067] S7. Determine the defect probability based on the conveying speed and historical detection results, and adjust the image sampling frequency and detection frequency based on the conveying speed and defect probability.

[0068] Preferably, the defect probability is determined based on the defect detection rate within the sliding window, wherein the defect detection rate within the sliding window is the ratio of the number of defects detected within the sliding window to the total number of detections. The actual detection frame rate is dynamically calculated based on the base frame rate, defect probability, and adjustment coefficient, and satisfies the following relationship: in, The actual detected frame rate. Based on the frame rate, This represents the defect probability. This is the adjustment coefficient.

[0069] In this embodiment, after defect detection is completed, in order to enable the entire detection system to adapt to the actual working conditions of varying blanket conveying speed and different probability of defect occurrence in different areas, a dynamic frequency adjustment mechanism based on conveying speed and historical detection results needs to be further introduced. The core purpose of this step is to minimize repeated sampling and inference of low-risk areas while ensuring continuous defect detection, thereby reducing the system's computational burden and improving the overall efficiency and stability of online detection.

[0070] Specifically, the system first calculates the current blanket conveying speed in real time based on the encoder pulse signal obtained in step S1. The conveying speed reflects the actual movement of the blanket within the current time period and is a crucial parameter for adjusting the subsequent sampling and detection frequencies. Simultaneously, the system combines the historical detection results output in step S5 to statistically analyze the defect occurrence in the current detection area, obtaining the defect probability. .

[0071] In a preferred embodiment, the defect probability The defect detection rate is determined based on the sliding window. Specifically, the system sets a fixed-length sliding window during continuous detection and counts the number of detections, the number of defect detections, and the detection confidence level within this window. The more times a defect is detected in a certain area within the sliding window, and the higher the corresponding confidence level, the higher the probability that the defect will reappear in that area, and the higher the defect probability. The defect probability can be expressed as: in, This represents the number of defects detected within the sliding window. This represents the total number of detections within the sliding window. If further consideration of detection confidence is needed, different weights can be assigned to different detection results during statistical analysis to improve the stability and accuracy of defect probability estimation.

[0072] Determining the probability of defects Then, the system determines the speed based on the conveying speed. and defect probability The image sampling and detection frequencies are adjusted together. Unlike traditional fixed sampling methods, the sampling and detection frequencies in this embodiment are not kept constant, but dynamically adjusted according to the current operating conditions. The basic logic is as follows: when the blanket conveying speed is high, in order to avoid defects being lost across frames during high-speed movement, the sampling and detection frequencies should be appropriately increased; when the defect probability in a certain area is high, in order to capture potential anomalies as quickly as possible, a high detection frequency should also be maintained; conversely, when the conveying speed is low and the defect probability is low, the frequency can be appropriately reduced to reduce redundant calculations and repeated judgments.

[0073] In a preferred embodiment, the actual detection frame rate Can be based on base frame rate Defect probability and adjustment coefficient The dynamic adjustment is based on the following formula: in, The actual detected frame rate. Based on the frame rate, For adjustment coefficients, Let be the defect probability. This formula shows that when the defect probability is high, Smaller, actual detection frame rate close to the base frame rate When the defect probability is low, the actual detection frame rate is reduced accordingly, thereby reducing the detection burden of the system in low-risk areas.

[0074] Furthermore, in this embodiment, the conveying speed The correction factor is used as a dynamically adjusted factor in the calculation of the actual detection frame rate. That is, the detection frame rate is affected not only by the defect probability but also by the current blanket conveying speed, to prevent excessive frame rate reduction and missed detections under high-speed conveying conditions. Therefore, in practical applications, a speed correction term can be introduced into the above basic formula, or the minimum frame rate threshold can be dynamically increased based on the conveying speed. Preferably, when the conveying speed exceeds a preset threshold, the minimum frame rate threshold is increased, ensuring that the system does not reduce the detection frequency too low even in low defect probability regions, thereby guaranteeing detection continuity under high-speed operation.

[0075] Through the above methods, this step constructs a dynamic frequency adaptive mechanism based on conveying speed and historical detection results, enabling the image sampling frequency and detection frequency to automatically adjust according to the blanket conveying status and defect risk level. Compared with a fixed-frequency detection scheme, this embodiment can effectively reduce redundant calculations, improve system real-time performance, and enhance adaptability to high-speed and fluctuating operating conditions while ensuring continuous defect detection.

[0076] S8. Based on the detected defect bounding box and the pulse equivalent coefficient, map the defect area to the actual spatial coordinates of the blanket, and output the location, size and category information of the defect.

[0077] Preferably, after mapping the defect area to the actual spatial coordinates of the blanket, the starting position, ending position, center position, length, and category information of the defect are output, and a defect record table is generated.

[0078] In this embodiment, after completing the frequency adaptive adjustment, the system has obtained the image detection results of the carpet surface defects, including the defect category, defect bounding box, and corresponding confidence level. Since the aforementioned detection results still exist in the form of pixel positions in the image coordinate system, while actual production management, roll marking, rework handling, and quality traceability usually require expression in terms of physical position along the length of the carpet, this step further maps the image detection results to the actual spatial coordinates of the carpet, thereby realizing the physical location of the defects and traceable output.

[0079] Specifically, the defect bounding box output by the hybrid lightweight target detection model typically includes the coordinates of the top-left corner. lower right corner coordinates Alternatively, the center point coordinates and width and height parameters. The bounding box represents the pixel range of the defect in the image plane, but since the correspondence between the image frame number, the cumulative pulse number and the actual position of the blanket has been established through step S2 during image acquisition, this correspondence can be used to convert the defect area in the image to the physical coordinates along the actual length direction of the blanket.

[0080] In a preferred embodiment, the system first determines the cumulative pulse count corresponding to the image frame where the defect is located. and the actual location of the corresponding blanket And combined with the pulse equivalent coefficient The start and end positions of the bounding box in the length direction are converted. If the vertical pixel range of the defect in the image is... Then, a transformation relationship can be established based on the pixel length scale and the pulse equivalent coefficient to map the vertical range of the bounding box in the image coordinates to the actual length range on the blanket. For defects in the same frame of the image, their actual starting position and termination position It can be represented as: in, This refers to the actual length scale corresponding to each pixel in the image, that is, the actual length of the blanket corresponding to each unit pixel. The above conversion method shows that the pixel location of the defect in the image can be directly converted into the actual position segment of the blanket surface along the conveying direction, based on the known starting position of the blanket corresponding to the image acquisition.

[0081] The lateral dimensions of the bounding box can be further converted into the actual lateral width of the blanket based on the camera mounting angle, field of view, and calibration parameters. If the two-dimensional physical coordinates of the defect need to be output, the four vertices of the image bounding box can be mapped to the actual planar coordinate system of the blanket surface to obtain the width direction position, length direction position, and defect area range of the defect, thus forming a more complete spatial positioning result. In some embodiments, if production management only focuses on the defect distribution along the length direction of the blanket, the start position, end position, and center position of the defect along the length direction can be mainly output to meet the requirements of roll splitting and marking.

[0082] In this embodiment, the system not only outputs the spatial location of the defect but also simultaneously outputs the defect's size and category information. The size information includes the defect length, defect width, defect area, or a combination thereof. If the detection model outputs a long, narrow defect bounding box, its actual length can be defined as the physical length of the bounding box along the blanket conveying direction, and its actual width as the lateral width perpendicular to the conveying direction. If the detection model outputs an approximately rectangular or irregular region, the actual defect area can be estimated based on the dimensions of the bounding box's circumscribed rectangle, or further combined with post-processing segmentation results. This allows the system's output to go beyond pixel-level image selection and directly serve production line quality control.

[0083] In a preferred embodiment, to improve the accuracy of physical coordinate mapping, the system can also use camera calibration results to perform geometric correction on the image coordinates. Since industrial cameras may experience tilt, parallax, or perspective distortion during installation, the linear mapping between pixel coordinates and actual physical coordinates may deviate without calibration. Therefore, before converting defect coordinates, a calibration relationship between the image plane and the actual plane of the blanket can be established first, and then the defect bounding box can be accurately mapped to actual spatial coordinates using the pulse equivalent coefficient. This method can further improve the accuracy and consistency of defect location output.

[0084] Furthermore, this embodiment can also perform position fusion for the same defect that appears repeatedly in multiple consecutive image frames. Since the same defect may appear in multiple adjacent sampling frames during the continuous transport of the blanket, the system can merge the detection results of the same defect in different frames based on the cumulative pulse count and its mapped position corresponding to each frame, forming a continuous position interval for the defect. For example, when a defect appears in the [number of frames]th [frame ... Frame, First Frame and the When the defect is detected in all three frames, the system can combine the corresponding start and end positions in the three frames to obtain the complete distribution range of the defect along the length of the blanket. This avoids the defect breakage problem caused by single-frame detection and improves the continuity and interpretability of the defect localization results.

[0085] In terms of output format, the system can record defect results as a structured defect information table. This table includes at least: defect number, defect category, defect start position, defect end position, defect center position, defect length, defect width, defect confidence level, and corresponding frame number. This information table can be directly used for subsequent roll marking, quality grading, rework recommendations, and batch traceability on the production line. If further integration with the production line control system is required, the defect location can be sent as a signal to the alarm module, marking module, or rejection module for immediate handling after defect discovery.

[0086] In a preferred embodiment, the system can also generate a defect distribution map based on the actual spatial coordinates of the defects. This defect distribution map unfolds along the length of the blanket, visually displaying the distribution location and length range of each defect within the entire roll of blanket, helping operators quickly determine areas of concentrated defects and the overall quality status of the blanket. For high-frequency defects in continuous production, this distribution map can also provide a basis for adjusting process parameters, such as determining whether a certain equipment step has stability issues, thereby supporting subsequent process optimization.

[0087] Through the above processing, this step achieves a precise mapping from image detection results to the actual physical spatial coordinates of the blanket, enabling the defect detection system not only to identify defects but also to accurately pinpoint their specific location and size on the blanket. Compared to traditional detection methods that only output image frames, this embodiment has stronger engineering applicability and traceability capabilities, better serving online quality control, defect identification, roll-to-roll processing, and quality statistical analysis in blanket production lines. Thus, the entire detection process forms a complete closed loop from encoder pulse acquisition, synchronous image sampling, spatial alignment, spatiotemporal fusion, defect identification, dynamic frequency modulation to physical coordinate mapping, effectively meeting the real-time, accuracy, and traceability requirements of continuous blanket production scenarios.

[0088] A blanket surface defect detection device, used to perform any of the above-described blanket surface defect detection methods, characterized in that it comprises: The encoder signal acquisition module is used to acquire the pulse signal output by the encoder installed on the blanket conveying mechanism, and calculate the cumulative conveying displacement and current conveying speed of the blanket according to the pre-calibrated pulse equivalent coefficient. The image acquisition control module is used to control the image acquisition device to acquire images of the blanket surface according to the preset sampling pulse interval, and to establish the correspondence between the image frame number, the cumulative pulse number and the actual position of the blanket. The image alignment module is used to calculate the inter-frame physical displacement compensation amount based on the pulse difference corresponding to adjacent image frames, and to spatially align the continuous images based on the physical displacement compensation amount to obtain a multi-frame image sequence synchronized with the blanket conveying process. The spatiotemporal fusion module is used to perform lightweight optical flow alignment processing on the multi-frame image sequence, calculate the optical flow field between consecutive frames, and perform spatial transformation on the feature map of the previous frame based on the optical flow field and fuse it with the feature map of the current frame to obtain spatiotemporal fused image features. The defect detection module is used to input the spatiotemporal fusion image features and the temporal position code generated by encoder pulse counting into the hybrid lightweight target detection model for defect detection. The hybrid lightweight target detection model includes a backbone network, a multi-scale feature recursive feedback fusion network, and a detection head. The recursive feedback fusion module is used to perform weighted fusion of the current layer features and the previous high-level features from the feedback path in the multi-scale feature recursive feedback fusion network, and to continue to propagate the fusion result along the bottom-up transmission path until a preset recursive round is reached or the feature change amplitude is less than a preset threshold. The frequency adjustment module is used to determine the defect probability based on the conveying speed and historical detection results, and to jointly adjust the image sampling frequency and detection frequency based on the conveying speed and defect probability. The coordinate mapping output module is used to map the defect region to the actual spatial coordinates of the blanket based on the detected defect bounding box and the pulse equivalent coefficient, and output the location, size and category information of the defect.

[0089] Compared with the prior art, the present invention has the following beneficial effects: This invention achieves high-precision, real-time, and traceable detection of surface defects in blankets through the synergistic effect of multiple mechanisms, including encoder pulse synchronous acquisition, physical scale constraints, continuous multi-frame spatial alignment, temporal position encoding, multi-scale recursive feedback fusion, dual-drive adjustment of speed and defect probability, and defect physical coordinate mapping. Compared with existing technologies, this invention has stronger ability to identify minute defects in complex texture backgrounds, higher adaptability to high-speed conveying scenarios, and better engineering applicability of detection results, thus more effectively meeting the actual needs of online quality control in blanket production lines.

Claims

1. A method for detecting surface defects in blankets based on a lightweight model, characterized in that, Includes the following steps: S1. Obtain the pulse signal output by the encoder installed on the blanket conveying mechanism, and calculate the cumulative conveying displacement and current conveying speed of the blanket according to the pre-calibrated pulse equivalent coefficient. S2. Based on the preset sampling pulse interval, control the image acquisition device to acquire images of the blanket surface and establish the correspondence between the image frame number, the cumulative pulse number and the actual position of the blanket; S3. Calculate the inter-frame physical displacement compensation amount based on the pulse difference corresponding to adjacent image frames, and spatially align the continuous images based on the physical displacement compensation amount to obtain a multi-frame image sequence synchronized with the blanket conveying process. S4. Input the multi-frame image sequence into the lightweight optical flow alignment module, calculate the optical flow field between consecutive frames, and perform spatial transformation on the feature map of the previous frame based on the optical flow field and fuse it with the feature map of the current frame to obtain spatiotemporal fusion image features. S5. The spatiotemporal fusion image features and the temporal position code generated by encoder pulse counting are jointly input into the hybrid lightweight target detection model for defect detection, wherein the hybrid lightweight target detection model includes: The backbone network adopts the MobileNetV3-Large architecture, with shallow layers using grouped convolution and channel shuffling, and deep layers introducing a dual-pooling high-efficiency channel attention module. A multi-scale feature recursive feedback fusion network is used to feed back high-level semantic features to shallow feature layers via a recursive feedback path and iteratively refine shallow detailed features. The detection head employs a decoupled head structure, a dynamic label allocation strategy, and the bounding box FECIoU loss function. S6. In the multi-scale feature recursive feedback fusion network, the current layer features are weighted and fused with the previous high-level features from the feedback path, and the fusion result is propagated along the bottom-up transmission path until a preset recursive round is reached or the feature change amplitude is less than a preset threshold. S7. Determine the defect probability based on the conveying speed and historical detection results, and adjust the image sampling frequency and detection frequency based on the conveying speed and defect probability. S8. Based on the detected defect bounding box and the pulse equivalent coefficient, map the defect area to the actual spatial coordinates of the blanket, and output the location, size and category information of the defect.

2. The method for detecting surface defects in blankets according to claim 1, characterized in that, The input steps of the multi-frame image sequence include: stacking consecutive multi-frame images along the channel dimension, and before stacking, performing spatial transformation on the previous frame image or the previous frame feature map based on the optical flow field between consecutive frames, so that the target regions of adjacent frames tend to be aligned in spatial position, and then inputting them into the hybrid lightweight target detection model.

3. The method for detecting surface defects in blankets according to claim 2, characterized in that, The consecutive multi-frame images consist of 3 to 7 frames and are obtained using a sparse sampling method; the multi-frame images are fused early before being input into the model, and features are extracted through convolutional layers with shared weights.

4. The method for detecting surface defects in blankets according to claim 2, characterized in that, The optical flow field is calculated by a lightweight optical flow algorithm, which is a NeuFlow shallow convolutional neural network structure. The image acquisition time and the encoder pulse counting time are synchronized via the IEEE 802.1AS time synchronization protocol.

5. The method for detecting surface defects in a blanket according to claim 1, characterized in that, The multi-scale feature recursive feedback fusion network includes a bottom-up main propagation path, a top-down feedback path, and feature fusion nodes. In each recursive round, the high-level semantic features output from the previous round are passed to the shallow feature layer through the feedback path, and then weighted and fused with the current layer features after aligning with the number of channels. The features are then passed along the main propagation path.

6. The method for detecting surface defects in a blanket according to claim 5, characterized in that, The recursion rounds are 2 to 4 rounds, and the change range of the fused features is determined after each round of recursion. The recursion stops when the change range is less than a preset threshold.

7. The method for detecting surface defects in a blanket according to claim 1, characterized in that, The defect probability is determined based on the defect detection rate within the sliding window, which is the ratio of the number of defects detected within the sliding window to the total number of detections. The actual detection frame rate is dynamically calculated based on the base frame rate, defect probability, and adjustment coefficient, and satisfies the following relationship: in, The actual detected frame rate. Based on the frame rate, This represents the defect probability. This is the adjustment coefficient.

8. The method for detecting surface defects in a blanket according to claim 1, characterized in that, The encoder is an incremental rotary encoder installed on the traction roller, drive roller, or take-up roller. The mapping relationship between the image frame number, pulse count value, and the actual position of the blanket is established through a position lookup table. The position lookup table records the cumulative number of pulses and the converted actual length position corresponding to each image frame.

9. The method for detecting surface defects in a blanket according to claim 1, characterized in that, After mapping the defect area to the actual spatial coordinates of the blanket, the system outputs the defect start position, defect end position, defect center position, defect length, and defect category information, and generates a defect record table.

10. A blanket surface defect detection device, used to perform the blanket surface defect detection method according to any one of claims 1-9, characterized in that, include: The encoder signal acquisition module is used to acquire the pulse signal output by the encoder installed on the blanket conveying mechanism, and calculate the cumulative conveying displacement and current conveying speed of the blanket according to the pre-calibrated pulse equivalent coefficient. The image acquisition control module is used to control the image acquisition device to acquire images of the blanket surface according to the preset sampling pulse interval, and to establish the correspondence between the image frame number, the cumulative pulse number and the actual position of the blanket. The image alignment module is used to calculate the inter-frame physical displacement compensation amount based on the pulse difference corresponding to adjacent image frames, and to spatially align the continuous images based on the physical displacement compensation amount to obtain a multi-frame image sequence synchronized with the blanket conveying process. The spatiotemporal fusion module is used to perform lightweight optical flow alignment processing on the multi-frame image sequence, calculate the optical flow field between consecutive frames, and perform spatial transformation on the feature map of the previous frame based on the optical flow field and fuse it with the feature map of the current frame to obtain spatiotemporal fused image features. The defect detection module is used to input the spatiotemporal fusion image features and the temporal position code generated by encoder pulse counting into the hybrid lightweight target detection model for defect detection. The hybrid lightweight target detection model includes a backbone network, a multi-scale feature recursive feedback fusion network, and a detection head. The recursive feedback fusion module is used to perform weighted fusion of the current layer features and the previous high-level features from the feedback path in the multi-scale feature recursive feedback fusion network, and to continue to propagate the fusion result along the bottom-up transmission path until a preset recursive round is reached or the feature change amplitude is less than a preset threshold. The frequency adjustment module is used to determine the defect probability based on the conveying speed and historical detection results, and to jointly adjust the image sampling frequency and detection frequency based on the conveying speed and defect probability. The coordinate mapping output module is used to map the defect region to the actual spatial coordinates of the blanket based on the detected defect bounding box and the pulse equivalent coefficient, and output the location, size and category information of the defect.