Defect detection method and system for spunlace nonwoven fabric based on large model

CN122510197APending Publication Date: 2026-08-04HUNAN RENRUI NONWOVEN PROD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN RENRUI NONWOVEN PROD CO LTD
Filing Date
2026-05-11
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

[0005]本发明提供了一种基于大模型的水刺无纺布缺陷检测方法及系统,旨在解决上述现有技术中存在的水刺无纺布生产线上材料表面纹理干扰和缺陷多样性导致的检测精度不足的缺陷

Benefits of technology

本发明提供的基于大模型的水刺无纺布缺陷检测方法及系统,针对水刺无纺布生产线上材料表面纹理干扰和缺陷多样性导致的检测精度不足问题,提出了一套自适应性增强的检测框架。本发明通过自适应光照补偿方法处理连续图像序列以增强对比度,结合深度学习模型提取多尺度特征图并聚焦低对比度区域分析,精准定位潜在缺陷候选区域,随后利用边缘检测和形态学滤波精炼缺陷轮廓,依据边界梯度分布分类缺陷并评估严重程度,最终通过并行计算和反馈循环机制实现实时响应和生产线速度调整,同时针对漏检误判风险进行历史数据比对,优化模型参数并更新权重,实现自学习迭代。本发明所取得的有益效果具体为:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122510197A_ABST
    Figure CN122510197A_ABST
Patent Text Reader

Abstract

The application discloses a spunlace non-woven fabric defect detection method and system based on a large model, belongs to the field of modern industrial manufacturing technology, and enhances contrast by processing a continuous image sequence through a self-adaptive illumination compensation method, extracts a multi-scale feature map in combination with a deep learning model, focuses on a low-contrast area analysis, accurately locates a potential defect candidate area, then refines a defect contour by using edge detection and morphological filtering, classifies defects according to boundary gradient distribution and evaluates severity, finally realizes real-time response and production line speed adjustment through a parallel computing and feedback loop mechanism, and compares historical data for the risk of missed detection and misjudgment, optimizes model parameters and updates weights, and realizes self-learning iteration. The application significantly improves the accuracy and real-time performance of defect detection, adapts to changes in material surface texture, and effectively reduces quality risks in the production process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of modern industrial manufacturing technology, and in particular discloses a method and system for detecting defects in spunlace nonwoven fabrics based on a large model. Background Technology

[0002] In modern industrial manufacturing, spunlace nonwoven fabrics are a crucial raw material for high-quality products such as medical and hygiene materials. Their quality testing directly impacts product safety and reliability, making it a core element of the industry's development. However, current mainstream testing methods often struggle to meet the dual demands of high precision and efficiency in complex production environments. This is especially true in fast-paced production lines, where the adaptability and response speed of testing equipment frequently fall short of actual needs, revealing significant shortcomings.

[0003] Existing solutions for handling surface defects in spunlace nonwoven fabrics generally suffer from insufficient ability to identify subtle or low-contrast issues. Many methods are prone to missing or misjudging imperfections such as broken needles, holes, or cloudiness. This limitation stems not merely from hardware constraints but from the weak feature capture capabilities of detection technologies in complex backgrounds, especially when there is significant interference from fabric textures. This makes it difficult to accurately distinguish defects from normal features, significantly reducing detection effectiveness. A deeper technical challenge lies in accurately capturing minute defects in high-speed production line environments while simultaneously ensuring real-time detection. High-speed production lines mean that fabric passes through the detection area at extremely high speeds, leaving very little time for equipment analysis and reaction. Minor defects, such as broken needle remnants with a diameter of only 0.1 mm, are often hidden within complex fabric textures, increasing the difficulty of identification. This dual challenge of time constraints and feature complexity necessitates that the detection system extract and judge subtle features within a very short timeframe; otherwise, critical defects may be missed, impacting subsequent production stages.

[0004] Therefore, how to accurately identify minute defects such as broken needles and cloud spots on a high-speed production line of 600 meters per minute, and complete the detection and take corresponding measures in a timely manner at the millisecond level, has become a key problem that this research urgently needs to overcome. Summary of the Invention

[0005] This invention provides a method and system for defect detection of spunlace nonwoven fabrics based on a large model, aiming to solve the defects in the prior art that result in insufficient detection accuracy due to interference from material surface textures and the diversity of defects on the spunlace nonwoven fabric production line.

[0006] One aspect of the present invention relates to a method for detecting defects in spunlace nonwoven fabrics based on a large model, comprising the following steps: S100: Acquire a continuous image sequence from the spunlace nonwoven fabric production line through an image acquisition device array; use an adaptive illumination compensation method to process the continuous image sequence to address material surface texture interference, and obtain an image sequence with enhanced contrast. S200. Based on the image sequence with enhanced contrast, a deep learning model is used to extract multi-scale feature maps, and local magnification analysis is performed on the low-contrast area to determine potential defect candidate areas. S300. Based on the potential defect candidate region, the edge detection algorithm is used to calculate the boundary gradient distribution, and morphological filtering is performed on the small defects to obtain a refined defect contour map. S400. Based on the refined defect contour map, determine whether the boundary gradient distribution exceeds the preset threshold. If it does, mark it as a high-risk defect area; otherwise, mark it as a normal texture area to obtain a classification defect label set. S500: Obtain the defect location coordinates by classifying the defect label set, and use a parallel computing module to process the defect location coordinates to determine the defect severity score in order to meet the real-time detection requirements. S600: Determine if the defect severity score is higher than the warning threshold. If it is higher, trigger the production line linkage signal. Otherwise, continue to monitor the subsequent image sequence and obtain the response control command. S700 adjusts the production line speed parameters based on the response control command and a feedback loop mechanism. It compares historical data to address the risk of missed detections and misjudgments, obtains optimized detection model parameters, updates the weights of the deep learning model based on the optimized detection model parameters, and performs self-learning iterations to address changes in material surface texture, thereby obtaining an adaptively enhanced detection framework.

[0007] Further, step S100 includes: S110. Obtain the original continuous image sequence on the spunlace nonwoven fabric production line through an image acquisition device array; S120. Divide the original continuous image sequence into blocks, extract the texture feature statistics of each local window, and calculate the local contrast distribution matrix. S130. Construct an adaptive illumination compensation function based on the brightness deviation values ​​of each pixel in the local contrast distribution matrix; S140. The original continuous image sequence is reconstructed frame by frame using an adaptive illumination compensation function to obtain a preliminary enhanced image sequence. S150. Identify the pore structure formed by the hydroentangling process in the preliminary enhanced image sequence. If the edge gradient value of the pore structure is lower than the preset grayscale threshold, call the histogram specification operator to perform global dynamic range adjustment on the preliminary enhanced image sequence to obtain an image sequence with enhanced contrast.

[0008] Further, step S200 includes: S210. Extract the original feature map containing spatial location and semantic information from the image sequence with enhanced contrast. S220. Perform upsampling alignment and weighted fusion processing on the original feature map to obtain a fused feature map with multi-scale representation capabilities; S230. Using preset anchor boxes, a sliding window scan is performed on the fused feature map and redundant boxes are removed to obtain refined candidate target boxes. S240. Perform pixel resampling on the local region corresponding to the candidate target box to obtain a high-resolution local magnified feature block; S250. Use a fully connected network to perform fine-grained classification and boundary regression operations on the locally magnified feature blocks to determine potential defect candidate regions.

[0009] Further, step S300 includes: S310. Extract the local pixel grayscale matrix for the potential defect candidate region, and use the Sobel operator to calculate the derivatives of the local pixel grayscale matrix in the horizontal and vertical directions to determine the boundary gradient distribution of each pixel. S320. Calculate the gradient magnitude of each pixel based on the boundary gradient distribution. If the gradient magnitude is lower than the preset edge strength threshold, set the gray value of the pixel to zero to obtain a preliminary edge feature map. S330. Use a cross-shaped structural element of a preset size to perform an erosion operation on the preliminary edge feature map to obtain a denoised edge image; S340. Perform dilation operation on the denoised edge image using cross-shaped structuring elements to determine the enhanced edge map with complete connected components. S350. By performing topological analysis on the enhanced edge map, closed boundary paths are extracted to obtain a refined defect contour map.

[0010] Further, step S400 includes: S410. Extract the gradient vector from the refining defect profile map. The gradient vector is used to determine the boundary gradient extreme value sequence. S420. Determine whether the boundary gradient extreme value sequence exceeds the preset gradient judgment threshold. If the boundary gradient extreme value sequence exceeds the gradient judgment threshold, assign a high-risk label to the corresponding pixel. S430. If the boundary gradient extreme value sequence does not exceed the gradient determination threshold, then assign the corresponding pixel a normal texture label. S440. Obtain an initial region division map based on high-risk markers and normal texture markers; S450. Perform connectivity analysis on the initial region partitioning map to obtain independent feature regions. After numerical encoding, the independent feature regions are used to obtain a classification defect label set.

[0011] Further, step S500 includes: S510. Extract the centroid pixel mapping based on the defect label set to obtain the defect location coordinates; S520. For the coordinates of the defect location, a clustering algorithm is used to obtain coordinate clusters; S530. Allocate concurrent processing threads to coordinate clusters, extract morphological feature vectors of coordinate clusters through concurrent processing threads, and perform inner product operation on morphological feature vectors to obtain the local severity index. S540. Based on the local severity, perform index lookup to determine the severity score of the defect.

[0012] Further, step S600 includes: S610. Obtain the defect severity score, compare the defect severity score with the warning threshold, and obtain the score comparison difference. S620: Determine whether the score comparison difference is greater than zero. If it is greater than zero, trigger the production line linkage signal; otherwise, generate an image monitoring instruction. S630: Generate a first response control command based on the production line linkage signal, or parse the subsequent image sequence based on the image monitoring command to obtain a second response control command; S640. Encapsulate the first response control instruction or the second response control instruction to obtain the response control instruction.

[0013] Further, step S700 includes: S710: Analyze and respond to control commands to obtain production line speed parameters; S720. Collect detection results based on production line speed parameters, and compare the detection results with historical data to obtain the characteristic distribution differences; S730. Determine whether the difference in feature distribution is greater than a preset difference threshold; S740. If the difference in feature distribution is greater than the preset difference threshold, then extract the features of the misjudged samples to obtain the optimized detection model parameters. S750. Update the model weights according to the optimized detection model parameters to obtain the updated detection model. Iterate using the updated detection model to obtain an adaptively enhanced detection framework.

[0014] Another aspect of the present invention relates to a large-model-based defect detection system for spunlace nonwoven fabrics, used to implement the above-described large-model-based defect detection method for spunlace nonwoven fabrics, comprising: The image sequence acquisition module is used to acquire a continuous image sequence from the spunlace nonwoven fabric production line through an image acquisition device array. The continuous image sequence is processed by an adaptive illumination compensation method to deal with the interference of material surface texture, so as to obtain an image sequence with enhanced contrast. The potential defect candidate region determination module is used to extract multi-scale feature maps based on the image sequence with enhanced contrast using a deep learning model, and to perform local magnification analysis on low-contrast regions to determine potential defect candidate regions. The refined defect contour map acquisition module is used to calculate the boundary gradient distribution based on the potential defect candidate region, and perform morphological filtering on the small defects to obtain the refined defect contour map. The defect label set acquisition module is used to determine whether the boundary gradient distribution exceeds a preset threshold based on the refined defect contour map. If it does, it is marked as a high-risk defect area; otherwise, it is marked as a normal texture area, thus obtaining the defect label set. The defect severity score determination module is used to obtain the defect location coordinates by classifying the defect label set. For real-time detection requirements, a parallel computing module is used to process the defect location coordinates and determine the defect severity score. The response control command acquisition module is used to determine whether the defect severity score is higher than the warning threshold. If it is higher, the production line linkage signal is triggered. Otherwise, the subsequent image sequence is monitored to obtain the response control command. The detection framework acquisition module is used to adjust the production line speed parameters according to the response control command and adopt a feedback loop mechanism. It compares historical data to obtain optimized detection model parameters to address the risk of missed detections and misjudgments. Based on the optimized detection model parameters, it updates the weights of the deep learning model and performs self-learning iteration to address changes in material surface texture, thereby obtaining an adaptively enhanced detection framework.

[0015] The beneficial effects achieved by this invention are as follows: This invention provides a large-model-based method and system for defect detection in spunlace nonwoven fabrics. Addressing the issue of insufficient detection accuracy caused by surface texture interference and defect diversity on spunlace nonwoven fabric production lines, it proposes an adaptive enhanced detection framework. This invention processes continuous image sequences using an adaptive illumination compensation method to enhance contrast. It combines a deep learning model to extract multi-scale feature maps and focuses on low-contrast region analysis to accurately locate potential defect candidate regions. Subsequently, it refines defect contours using edge detection and morphological filtering, classifies defects based on boundary gradient distribution, and assesses their severity. Finally, it achieves real-time response and production line speed adjustment through parallel computing and a feedback loop mechanism. Simultaneously, it compares historical data to optimize model parameters and update weights to mitigate the risk of missed detections and false positives, achieving self-learning iteration. The specific beneficial effects achieved by this invention are as follows: 1. Adaptive illumination compensation is used to process continuous image sequences, with an illumination compensation adaptation rate of ≥99% and an image contrast improvement of over 45%. This effectively overcomes interference such as uneven lighting and reflections, making low-contrast areas clearer and solving the problem of missed detection caused by lighting issues in traditional detection methods.

[0016] 2. By combining deep learning models to extract multi-scale features, the accuracy of low-contrast region analysis is ≥98.8%, the localization accuracy of potential defect candidate regions is ≤0.2mm, and the localization accuracy reaches 99.2%, which can accurately capture subtle defects and avoid missing minor hidden dangers.

[0017] 3. By refining the defect contour through edge detection and morphological filtering, the contour extraction accuracy is ≥98.5%, the defect boundary recognition error is ≤0.15mm, effectively eliminating false defects, reducing misjudgments, and improving the defect recognition accuracy to over 99.3%.

[0018] 4. Based on the boundary gradient distribution, defects are classified and their severity is assessed. The defect classification accuracy is ≥99%, and the severity assessment error is ≤10%. It can accurately distinguish the defect type and level, providing a precise basis for quality control and reducing the risk of quality misjudgment.

[0019] 5. By adopting a parallel computing and feedback loop mechanism, the detection response time is ≤200ms, which improves the real-time performance by 70% compared with traditional methods. It can synchronously adjust the production line speed, improve the production line adaptation efficiency by 50%, and meet the detection needs of high-speed production.

[0020] 6. By comparing historical data and optimizing model parameters, the false negative rate was reduced to below 0.3%, the false positive rate was controlled to below 0.5%, the detection accuracy continued to improve after the model self-learning iteration, and the model adapted to the dynamic changes of material surface texture, with an adaptation rate of 98%.

[0021] 7. Overall improvement in defect detection efficiency and accuracy, reducing product non-conformity rate by more than 35%, reducing rework and scrap costs by about 40%, significantly reducing production quality risks, adapting to various material surface defect detection scenarios, and having strong versatility. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating an embodiment of the defect detection method for spunlace nonwoven fabric based on a large model according to the present invention. Figure 2 This is a functional block diagram of an embodiment of the spunlace nonwoven fabric defect detection system based on a large model according to the present invention.

[0023] Explanation of icon numbers: 10. Image sequence acquisition module; 20. Potential defect candidate region determination module; 30. Refined defect contour map acquisition module; 40. Classified defect label set acquisition module; 50. Defect severity score determination module; 60. Response control command acquisition module; 70. Detection framework acquisition module. Detailed Implementation

[0024] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0025] like Figure 1 As shown, the first embodiment of this invention proposes a defect detection method for spunlace nonwoven fabrics based on a large model. The core of this method is to achieve real-time, accurate, and adaptive detection of defects in spunlace nonwoven fabric production lines through image acquisition and enhancement, deep learning feature extraction, defect contour refinement, classification scoring, and production line feedback optimization. This solves the problems of traditional detection methods, such as weak resistance to texture interference, high missed detection rate of small defects, and poor adaptability of the detection model. It is suitable for online real-time defect detection scenarios in large-scale production lines of spunlace nonwoven fabrics (hygienic, medical, and industrial applications). The method includes the following steps: Step S100: Obtain a continuous image sequence from the spunlace nonwoven fabric production line through an image acquisition device array. Use an adaptive illumination compensation method to process the continuous image sequence to address material surface texture interference, thereby obtaining an image sequence with enhanced contrast.

[0026] At the loading and unloading ends and intermediate transmission section of the spunlace nonwoven fabric production line, a pre-set array of image acquisition devices is deployed to synchronously acquire images of the surface of the spunlace nonwoven fabric continuously transmitted on the production line, forming a continuous image sequence. To address the problems of low image contrast and severe texture interference caused by the disordered natural texture of the spunlace nonwoven fabric surface and uneven lighting on the production line (such as local shadows and light spots), an adaptive lighting compensation method is used to process the continuous image sequence frame by frame. This corrects lighting deviations, suppresses texture interference, and improves the distinction between defect areas and background textures, ultimately resulting in an image sequence with enhanced contrast. This provides a clear and accurate image foundation for subsequent defect feature extraction and candidate region localization. In this step, image acquisition and illumination compensation must meet the following parameter requirements: The acquisition frequency of the image acquisition device array is 10~60fps, preferably 20~40fps. The basis for this selection is that 10fps can meet basic detection needs, 60fps can adapt to high-speed production lines (≤100m / min), and 20~40fps balances detection real-time performance and data processing efficiency; The image resolution is 1024×768~4096×3072px, preferably 2048×1536px. The basis for this selection is that this resolution can clearly capture small defects (≥0.1mm), balancing image clarity and processing speed; The image contrast is improved by 30%~80% after adaptive illumination compensation, preferably 50%~60%. The basis for this selection is to ensure that the defect area and background texture are clearly distinguished, avoiding texture interference that leads to missed detection; The processing delay of illumination compensation is ≤50ms / frame. The basis for this selection is to adapt to the real-time detection needs of the production line and avoid detection lag.

[0027] Image acquisition equipment array refers to a collaborative acquisition array composed of multiple industrial cameras, preferably area array industrial cameras. The deployment quantity is 3-10 units, preferably 5-8 units. The basis for this selection is that 3 units can meet the basic surface acquisition requirements, 10 units can achieve full-width acquisition of non-woven fabrics without blind spots, and 5-8 units balance acquisition coverage and equipment cost. The camera pixel size is 1-5μm, preferably 2-3μm. The basis for this selection is to ensure that it can capture tiny defects (≥0.1mm) and meet the defect detection accuracy requirements. The camera exposure time is 10-50μs, preferably 20-30μs. The basis for this selection is to adapt to the production line transmission speed (10-100m / min) and avoid image blurring. The camera's operational stability is ≥99.9% to avoid detection interruption due to equipment failure. The acquisition overlap rate of adjacent cameras is 10%-20%, preferably 15%. The basis for this selection is to ensure full-width acquisition without blind spots and avoid missed detection in edge areas.

[0028] Spunlace nonwoven fabric refers to nonwoven fabric made using the spunlace process. The material is polyester, viscose fiber, or a blend thereof, with a basis weight of 20~200g / m², preferably 50~150g / m², and a thickness of 0.1~1.0mm, preferably 0.2~0.6mm. These values ​​are based on commonly used spunlace nonwoven fabric specifications for hygiene, medical, and industrial applications. The surface texture is a random mesh structure with a texture spacing of 0.05~0.5mm. This value is based on the characteristics of the spunlace nonwoven fabric production process, as this texture spacing is a major factor interfering with defect detection. Common defects include pinholes, lint, holes, uneven thickness, and stains. The defect size range is 0.1~5mm, and this value is based on clearly defining the detection range to ensure that even minute defects (0.1~0.5mm) are not missed.

[0029] A continuous image sequence refers to a collection of images of the surface of spunlace nonwoven fabric continuously acquired by an image acquisition device array. Each frame is a grayscale or RGB image, and the sequence length is 100~1000 frames / min. The criteria for this value are: to adapt to the production line transmission speed and ensure that at least 5~10 frames are acquired per meter of nonwoven fabric to avoid missing defects; the integrity of the image sequence is ≥99.8%, which is based on: ensuring no image loss and providing complete data support for subsequent continuous inspection; the image storage format is JPG or PNG, and the compression ratio is 1:2~1:5, preferably 1:3, which is based on: balancing image quality and storage efficiency.

[0030] The adaptive illumination compensation method refers to an image processing algorithm used to correct uneven illumination on production lines and improve image contrast. The algorithm architecture consists of three layers: an illumination estimation layer, a deviation correction layer, and a contrast enhancement layer. The illumination estimation layer uses Gaussian filtering (with a kernel size of 3×3 to 7×7, preferably 5×5) to estimate the global illumination distribution of the image and extract areas with uneven illumination. The deviation correction layer is based on the Retinex algorithm to separate the illumination component and reflection component of the image and perform grayscale correction on areas with uneven illumination. The correction coefficient is 0.5 to 1.5, preferably 0.8 to 1.2. The contrast enhancement layer uses a histogram equalization algorithm to stretch the image grayscale range (0 to 255) and improve the contrast between defective areas and the background. The algorithm's processing latency is ≤50ms / frame, based on the following criteria: adapting to the real-time detection needs of the production line; the contrast enhancement accuracy is ≥98%, based on the following criteria: ensuring that defect areas are clearly visible and suppressing texture interference; the algorithm has strong anti-interference capabilities and can adapt to light intensity variations ranging from 500 to 5000 lux, based on the following criteria: covering conventional lighting scenarios in the production line (such as natural light during the day and artificial lighting at night).

[0031] An image sequence with enhanced contrast refers to an image sequence that, after adaptive illumination compensation processing, significantly improves the contrast between the defect area and the background texture. The standard deviation of the image grayscale is 50~150, preferably 80~120. The basis for this value is that the larger the standard deviation of the grayscale, the higher the contrast. This range can ensure that the defect area is clearly distinguishable. The image noise intensity is ≤10dB. The basis for this value is to suppress image noise and avoid noise being misjudged as a minor defect. The grayscale difference between the defect area and the background is ≥30. The basis for this value is to ensure that the defect area and the background can be effectively distinguished, providing a clear foundation for subsequent feature extraction.

[0032] Step S200: Based on the image sequence with enhanced contrast, a deep learning model is used to extract multi-scale feature maps, and local magnification analysis is performed on the low-contrast area to determine potential defect candidate areas.

[0033] The image sequence with enhanced contrast obtained in step S100 is used as input to a preset deep learning model (based on fine-tuning of a large model). The model's multi-scale feature extraction module extracts image feature maps at different resolutions (low-scale captures global texture, high-scale captures local defects). For low-contrast regions in the feature maps (i.e., regions where defects are less distinguishable from the background), a local magnification analysis algorithm is used to magnify and enhance the details of these regions at the pixel level, accurately identifying regions that differ from normal textures and marking them as potential defect candidate regions. This provides a clear regional range for subsequent defect contour refinement and classification, reduces invalid detection areas, and improves detection efficiency. In this step, feature extraction and candidate region localization must meet the following parameter requirements: the feature extraction accuracy of the deep learning model is ≥99%, based on the principle of ensuring accurate extraction of defect features and avoiding missed detections due to feature omissions; the resolution of the multi-scale feature map is 256×192~1024×768px, based on the principle of covering the feature extraction requirements of defects of different sizes; the local magnification factor is 2~8 times, preferably 4~6 times, based on the principle that too low a magnification factor cannot identify small defects, while too high a factor will increase the processing load, and 4~6 times balances detail recognition and processing efficiency; the localization accuracy of potential defect candidate regions is ≤0.05mm, based on the principle of ensuring accurate localization of candidate regions and providing a reliable foundation for subsequent contour refinement; the false detection rate of candidate regions is ≤2%, based on the principle of reducing invalid candidate regions and reducing the pressure of subsequent processing.

[0034] Deep learning models (based on large model fine-tuning) refer to deep learning models fine-tuned for the defect detection scenario of spunlace nonwoven fabrics, based on large visual models (such as ViT and ResNet-50). The model architecture consists of four layers: an input layer, a multi-scale feature extraction module, a local magnification module, and a candidate region output module. The input layer receives image sequences with enhanced contrast and normalizes the images to 224×224~448×448px. The multi-scale feature extraction module uses 4~6 convolutional blocks (kernel sizes 3×3 and 5×5) to extract feature maps at 4~6 scales (scale coefficients of 0.5, 1.0, 2.0, and 4.0). Each convolutional block is followed by a BatchNorm layer and a ReLU activation function to improve feature extraction capability. The local magnification module uses a bilinear interpolation algorithm to magnify pixels in low-contrast areas, and the magnification factor can be adaptively adjusted (2~8 times). The candidate region output module uses an anchor box mechanism (anchor box size of 1×1~10×10px) to filter out candidate regions that match the defect features and outputs the coordinates of the candidate regions. The model has 10 million to 50 million parameters, preferably 20 million to 30 million. The selection criteria are: to ensure that the model has sufficient feature extraction capabilities while taking into account running efficiency; the model has 500 to 2000 training iterations, preferably 1000 to 1500; the convergence threshold is a loss function value ≤ 0.02, which is selected to ensure that the model is fully trained and the detection accuracy meets the standard; the model's inference latency is ≤ 30ms / frame, which is selected to adapt to the real-time detection requirements of the production line.

[0035] Multi-scale feature maps refer to image feature maps of different resolutions and levels extracted by deep learning models. Low-scale feature maps (resolution 256×192px) are used to capture global texture features of spunlace nonwoven fabric, medium-scale feature maps (resolution 512×384px) are used to capture medium-sized defects (0.5~2mm) features, and high-scale feature maps (resolution 1024×768px) are used to capture tiny defects (0.1~0.5mm) features. The values ​​are selected based on the requirement of covering feature extraction of defects of different sizes and ensuring that tiny defects are not missed. The number of channels in the feature map is 64~256, preferably 128~192. The value is selected based on the fact that the more channels there are, the stronger the feature expression ability. This range takes into account both feature extraction accuracy and processing efficiency.

[0036] Low-contrast regions refer to areas in an image sequence with enhanced contrast where the grayscale difference between the defect area and the background texture is less than 30. The area ranges from 10 to 1000 px², and the criteria for this value are: considering the texture characteristics of spunlace nonwoven fabric, the defects in this area have low distinguishability from the background and are easy to miss, so local magnification analysis is required; the recognition accuracy of low-contrast regions is ≥98.5%, and the criteria for this value are: to ensure accurate recognition of low-contrast regions and avoid missing potential defects.

[0037] Local magnification analysis refers to the pixel-level magnification and detail enhancement process of low-contrast areas. A bilinear interpolation algorithm is used for magnification, with a magnification factor of 2-8 times, preferably 4-6 times. The selection criteria are: 2x magnification can identify medium-sized defects, 8x can clearly identify tiny defects (0.1mm), and 4-6x balances detail recognition and processing efficiency. The magnified image resolution is 512×384~4096×3072px, chosen to ensure clear visibility of defect details. The processing delay for local magnification is ≤10ms / area, chosen to avoid affecting overall detection efficiency.

[0038] The potential defect candidate area refers to an area that differs significantly from the normal texture of the spunlace nonwoven fabric and may contain defects. The shape of the area is an irregular polygon or circle, with an area ranging from 10 to 1000 px² (corresponding to an actual defect size of 0.1 to 5 mm). The criteria for this value are: covering the common defect size range of spunlace nonwoven fabric; the positioning accuracy of the candidate area is ≤0.05 mm, which is determined by: ensuring accurate coordinates of the candidate area to provide reliable support for subsequent contour refinement; and the coverage rate of the candidate area is ≥99.5%, which is determined by: ensuring that all real defects are included in the candidate area to avoid missed detection.

[0039] Step S300: Based on the potential defect candidate region, the boundary gradient distribution is calculated using an edge detection algorithm, and morphological filtering is performed on the minor defects to obtain a refined defect contour map.

[0040] Using the potential defect candidate regions obtained in step S200 as the processing objects, a preset edge detection algorithm is called to calculate the boundary gradient for each candidate region, capture the boundary features between the defect region and the background texture, and obtain the boundary gradient distribution data. For possible small defects (size 0.1~0.5mm) and false boundaries caused by noise interference in the candidate regions, a morphological filtering algorithm is used for denoising and smoothing, eliminating false boundaries and retaining real defect boundaries, and finally obtaining a refined defect contour map with clear outline and no noise interference, providing an accurate contour basis for subsequent defect classification and severity scoring. In this step, the boundary gradient calculation and contour refinement must meet the following parameter requirements: the boundary extraction accuracy of the edge detection algorithm is ≥99%, based on the principle of ensuring accurate extraction of defect boundaries and avoiding contour distortion caused by missing boundaries; the calculation accuracy of the boundary gradient distribution is ≤0.1px, based on the principle of ensuring accurate gradient distribution data and providing reliable support for defect classification; the denoising rate of morphological filtering is ≥98%, based on the principle of effectively eliminating false boundaries and noise and avoiding misjudgment; the contour error of the refined defect contour map is ≤0.05mm, based on the principle of ensuring accurate contour and conforming to the actual defect shape.

[0041] Edge detection algorithms are image processing algorithms used to extract the boundaries of potential defect candidate regions and calculate the gradient distribution of the boundaries. The Canny edge detection algorithm is preferred. Its architecture consists of four layers: a Gaussian filtering layer, a gradient calculation layer, a non-maximum suppression layer, and a dual-threshold filtering layer. The Gaussian filtering layer uses a 5×5 Gaussian filter kernel to remove image noise, with a standard deviation of 0.5~2.0, preferably 1.0. The gradient calculation layer uses the Sobel operator (3×3) to calculate the gradient values ​​in the horizontal and vertical directions, obtaining the boundary gradient distribution. The non-maximum suppression layer removes non-peak points on the boundary, refining the boundary. The dual-threshold filtering layer sets a high threshold (150~200, preferably 180) and a low threshold (50~100, preferably 80) to filter out true defect boundaries and remove false boundaries. The algorithm achieves a boundary extraction accuracy ≥99%, based on ensuring accurate defect boundary extraction; a gradient calculation delay ≤10ms / region, based on improving processing efficiency; and strong noise resistance, effectively handling images with noise intensity ≤10dB.

[0042] Boundary gradient distribution refers to the distribution of gray-level differences between adjacent pixels on the boundary of a potential defect candidate region, characterizing the clarity of the boundary. The gradient value ranges from 0 to 255. The larger the gradient value, the clearer the boundary. The criteria for determining the value are: the gray-level difference range conforms to the image gray level (0~255), and when the gradient value is ≥100, the boundary is clearly distinguishable; the uniformity error of the gradient distribution is ≤10%, which is determined to ensure the stability of the boundary gradient distribution and avoid boundary blurring; the gradient calculation accuracy is ≤0.1px, which is determined to ensure the accuracy of the gradient data and provide support for subsequent defect classification.

[0043] Minor defects refer to defects in spunlace nonwoven fabric with a size of 0.1~0.5mm (such as tiny pinholes and fine lint), and a defect area ranging from 10~100px². The basis for these values ​​is: in combination with the actual production of spunlace nonwoven fabric, minor defects are easy to miss and need to be highlighted through morphological filtering; the identification accuracy of minor defects is ≥98%, which is based on: ensuring that no minor defects are missed and improving the comprehensiveness of the detection.

[0044] Morphological filtering refers to image processing algorithms used for denoising, smoothing defect boundaries, and refining defect contours. The algorithm architecture consists of three layers: a dilation layer, an erosion layer, and an opening / closing layer. The dilation operation uses a 3×3 to 5×5 structuring element, with 1 to 3 dilation operations, preferably 2, to fill small gaps in the defect contour. The erosion operation uses a 3×3 structuring element, with 1 to 2 erosion operations, preferably 1, to remove noise points at the contour edges. The opening operation (erosion followed by dilation) removes small noise areas, and the closing operation (dilation followed by erosion) fills contour gaps. The structuring element size is 3×3 to 5×5, preferably 3×3, chosen to ensure filtering effectiveness while avoiding contour distortion. The denoising rate is ≥98%, chosen to effectively remove false boundaries and noise. The filtering delay is ≤5ms / region, chosen to improve processing efficiency.

[0045] A refined defect contour image refers to a defect contour image that has undergone morphological filtering, resulting in a clear contour, no noise interference, and complete boundaries. The continuity of the contour is ≥99%, determined by ensuring that the defect contour is unbroken and closely matches the actual defect shape. The contour error is ≤0.05mm, determined by ensuring the contour is accurate and provides a reliable basis for subsequent defect classification and severity scoring. The grayscale level of the contour image is binarized (0 / 255), determined by clearly distinguishing the defect contour from the background for easy subsequent calculations.

[0046] Step S400: Based on the refined defect contour map, determine whether the boundary gradient distribution exceeds the preset threshold. If it does, mark it as a high-risk defect area; otherwise, mark it as a normal texture area to obtain a classification defect label set.

[0047] Based on the refined defect contour map obtained in step S300, the boundary gradient distribution data corresponding to the contour is extracted. This data is compared with the preset boundary gradient threshold to determine whether the boundary gradient distribution exceeds the preset threshold. If it exceeds the preset threshold, it indicates that the boundary of the area is clear and the defect features are obvious, and it is marked as a high-risk defect area (such as holes or severe stains). If it does not exceed the preset threshold, it indicates that the area is relatively similar to the normal texture and has no obvious defects, and it is marked as a normal texture area. After classifying all potential defect candidate areas, the classification information (defect type, area coordinates, gradient value) of all high-risk defect areas is integrated to generate a classification defect label set, which provides a classification basis for subsequent defect severity scoring and production line linkage. In this step, defect classification and label generation must meet the following parameter requirements: The preset boundary gradient threshold is 100~150, preferably 120. The value is determined based on the gradient distribution of the normal texture of spunlace nonwoven fabric (≤80). When the gradient value is ≥120, it can be clearly identified as a defect area. This threshold has been verified by a large number of samples, with a false positive rate of ≤1% and a false negative rate of ≤0.5%; the defect classification accuracy is ≥99.5%. The value is determined based on ensuring accurate differentiation between high-risk defect areas and normal texture areas; the generation delay of the classified defect label set is ≤20ms. The value is determined based on adapting to the real-time detection needs of the production line; the completeness of the label set is ≥99.8%. The value is determined based on ensuring that all high-risk defect areas are marked without omission.

[0048] The preset threshold (boundary gradient threshold) refers to the critical gradient value used to determine whether a potential defect candidate area is a high-risk defect area. Specifically, it is 100~150, preferably 120. The basis for this value is: the boundary gradient value of normal texture of spunlace nonwoven fabric is ≤80, and the boundary gradient value of defect area is ≥100. Taking 120 as the threshold can effectively distinguish high-risk defects from normal texture and reduce false positives and false negatives. This threshold can be finely adjusted by ±10 according to the basis weight and thickness of spunlace nonwoven fabric. The basis for this value is: there are differences in the texture gradient of nonwoven fabric with different basis weights and thicknesses. Fine adjustment can improve the classification accuracy. The false positive rate of the threshold is ≤1%, and the false negative rate is ≤0.5%. The basis for this value is: after verification with 100,000+ samples, the classification effect of this threshold is optimal and meets the detection accuracy requirements.

[0049] High-risk defect areas refer to defect areas whose boundary gradient distribution exceeds a preset threshold (≥120), have obvious defect characteristics, and have a significant impact on product quality. These include holes (size ≥1mm), severe stains (area ≥5mm²), and large areas of uneven thickness (deviation ≥0.1mm). The criteria for this value are: in accordance with the industry standard "Spunlace Nonwoven Fabrics", such defects will lead to product non-compliance and require key monitoring; the area range of high-risk defect areas is 100~1000px² (corresponding to actual defect size 0.5~5mm), the criteria for this value are: covering the main high-risk defect size range; the identification accuracy rate of high-risk defects is ≥99.5%, the criteria for this value are: ensuring accurate identification of high-risk defects and avoiding missed detections.

[0050] The normal texture area refers to the area where the boundary gradient distribution does not exceed the preset threshold (<120), has no obvious difference from the normal texture of spunlace nonwoven fabric, and is free of defects. The texture spacing and grayscale distribution in the area are consistent with the normal nonwoven fabric. The criteria for this value are: to ensure clear distinction from high-risk defect areas and avoid misjudging normal textures as defects; the misjudgment rate of the normal texture area is ≤1%, and the criteria for this value are: to reduce invalid markings and reduce the pressure of subsequent processing.

[0051] The classification defect label set refers to a structured dataset that integrates classification information for all high-risk defect areas. It includes defect labels (such as "hole", "stain", "lint"), defect location coordinates, boundary gradient values, defect area, defect size, and other information. The label set is in JSON format, and the values ​​are selected based on the following criteria: adapting to the system's data interaction requirements and facilitating subsequent data processing; the label set update cycle is consistent with the image acquisition frequency (10~60fps), and the values ​​are selected based on the following criteria: ensuring real-time synchronization of the label set and adapting to real-time detection requirements; the generation time of a single label is ≤1ms, and the values ​​are selected based on the following criteria: improving the label set generation efficiency.

[0052] Step S500: Obtain the defect location coordinates through the classification defect label set, and use a parallel computing module to process the defect location coordinates to determine the defect severity score in order to meet the real-time detection requirements.

[0053] From the defect label set obtained in step S400, the defect location coordinates (three-dimensional coordinates: production line length direction, width direction, and defect depth) of all high-risk defect areas are extracted to clarify the specific location of each defect on the spunlace nonwoven fabric. To meet the high efficiency requirements of real-time detection on the production line, a preset parallel computing module is invoked to process all defect location coordinates in parallel. At the same time, combined with parameters such as defect area, defect size, boundary gradient value, and defect type, a defect severity scoring model is constructed to calculate the severity score of each high-risk defect area, quantify the impact of defects on product quality, and provide a quantitative basis for subsequent production line linkage and model optimization. In this step, the location positioning and scoring must meet the following parameter requirements: the positioning accuracy of the defect location coordinates ≤ 0.05mm, based on the principle of ensuring accurate positioning of the defect location to facilitate subsequent production line adjustments and defect tracing; the processing latency of the parallel computing module ≤ 30ms / batch (batch size 10~100 defects), based on the principle of adapting to the real-time detection needs of the production line and avoiding processing delays; the defect severity scoring range is 0~100 points, with a scoring accuracy ≤ 1 point, based on the principle of quantifying the severity of defects to facilitate hierarchical management; the accuracy of the scoring model is ≥ 99%, based on the principle of ensuring accurate scoring and reflecting the actual impact of defects.

[0054] Defect location coordinates refer to the three-dimensional spatial coordinates of high-risk defect areas on the spunlace nonwoven fabric. These coordinates include the length coordinates (0~100m, accuracy ≤0.05mm), width coordinates (0~2m, accuracy ≤0.05mm), and defect depth coordinates (0~0.5mm, accuracy ≤0.01mm). The values ​​are selected based on the following criteria: adapting to the specifications of the spunlace nonwoven fabric production line (width 0.5~2m, unlimited length) to ensure accurate defect location; the coordinate update frequency is consistent with the image acquisition frequency (10~60fps), ensuring real-time synchronization for easy real-time monitoring; and the coordinate error is ≤0.05mm, ensuring accurate positioning and providing reliable support for subsequent production line adjustments.

[0055] The parallel computing module is used to process multiple defect location coordinates in parallel and quickly calculate defect severity scores. The module architecture adopts a CPU+GPU collaborative parallel architecture, consisting of three layers: a data distribution layer, a parallel computing layer, and a result integration layer. The data distribution layer distributes defect location coordinates and defect parameters to multiple computing cores in batches. The parallel computing layer uses multi-threaded parallel computing, with each thread processing the score calculation for one defect and calling the defect severity scoring model. The result integration layer integrates the score results of all defects and outputs a complete score list. The module's parallel processing efficiency is 10~100 defects / 30ms, based on the following criteria: adapting to the number of defects on the production line (1~50 defects / minute) to ensure real-time processing; the module's calculation accuracy is ≤1 point, based on the following criteria: ensuring accurate scoring; and the module's operational stability is ≥99.9%, based on the following criteria: avoiding detection delays caused by calculation interruptions.

[0056] The defect severity score is a quantitative indicator used to quantify the impact of high-risk defect areas on the quality of spunlace nonwoven fabric products. The score range is 0-100 points, with the following scoring standards: 0-30 points (minor defects, such as tiny lint), 31-60 points (moderate defects, such as small pinholes), and 61-100 points (severe defects, such as holes and large-area stains). The scores are based on the industry standard "Spunlace Nonwoven Fabrics," which states that minor defects are repairable, moderate defects require monitoring, and severe defects lead to product non-compliance. The scoring model is based on a weighted summation, with the following weights: defect area (40%), defect size (30%), boundary gradient value (20%), and defect type (10%). The scores are based on the fact that defect area and size have the greatest impact on product quality, followed by gradient value and defect type. The scoring accuracy is ≤1 point, which is based on ensuring accurate scoring and facilitating hierarchical management.

[0057] Step S600: Determine whether the defect severity score is higher than the warning threshold. If it is higher, trigger the production line linkage signal; otherwise, continue to monitor subsequent image sequences and obtain response control commands.

[0058] A preset warning threshold for defect severity is established. The severity score of each high-risk defect area obtained in step S500 is compared with the warning threshold to determine whether the score exceeds the threshold. If the score exceeds the threshold, it indicates that the defect is severe and will lead to product non-conformity. The production line linkage signal (such as deceleration, shutdown, and marking the defect location) is immediately triggered. If the score does not exceed the threshold, it indicates that the defect is minor or moderate and will not affect product conformity. The subsequent continuous image sequence is monitored. Based on the comparison results and processing logic, corresponding response control instructions are generated to clarify the operating status of the production line (continue operation, deceleration, shutdown) and the working mode of the detection system (continue monitoring, key monitoring), thereby realizing the linkage control between defect detection and the production line. In this step, the scoring and instruction generation must meet the following parameter requirements: The warning threshold is 60-80 points, preferably 70 points. The criteria for this threshold are: based on industry standards, a score ≥70 indicates a severe defect, which will lead to product non-conformity and requires triggering a linkage signal. This threshold has been verified through numerous production cases, with a false trigger rate ≤0.5%; the generation delay of the response control instruction is ≤10ms. The criteria for this threshold are: to ensure rapid instruction generation, timely linkage of the production line, and prevention of non-conforming products from leaving the production line; the transmission delay of the linkage signal is ≤50ms. The criteria for this threshold are: to ensure rapid production line response and reduce losses; the execution accuracy of the instruction is ≥99.9%. The criteria for this threshold are: to ensure error-free instruction execution and avoid accidental or missed shutdowns.

[0059] The warning threshold is a critical score used to determine whether a defect severity warrants triggering a production line linkage signal. Specifically, it ranges from 60 to 80 points, with 70 points being preferred. The criteria for this threshold are as follows: a score ≥70 indicates a severe defect (such as holes or large stains), which does not meet the industry standard for spunlace nonwoven fabrics and will result in product non-compliance, requiring a linkage signal to be triggered; a score of 60-69 indicates a moderate defect, requiring only close monitoring and no shutdown; a score ≤59 indicates a minor defect, allowing normal production to continue. This threshold can be fine-tuned by ±5 points depending on the product's application (medical or sanitary). The criteria are as follows: medical nonwoven fabrics have stricter defect requirements, so the threshold can be lowered to 65 points, while sanitary fabrics can maintain 70 points. The false trigger rate and missed trigger rate of the threshold are ≤0.5% and ≤0.3%, respectively, based on production case studies demonstrating that this threshold provides optimal linkage control.

[0060] Production line linkage signals refer to the control signals sent by the detection system to the spunlace nonwoven fabric production line when the defect severity score exceeds the warning threshold. These signals include deceleration signals (reducing production line speed by 20%~50%), stop signals (immediate shutdown), and defect marking signals (marking the defect location for subsequent processing). The values ​​are determined based on the following criteria: adaptively sending corresponding signals according to the defect severity, stopping the line for severe defects and decelerating for moderate defects; using Modbus as the transmission protocol, with a transmission delay ≤50ms, to ensure rapid production line response and reduce the number of defective products; and ensuring signal reliability ≥99.9%, to avoid production accidents caused by signal loss or mistransmission.

[0061] Response control commands are instructions generated based on defect severity scoring comparison results to control the production line's operating status and the inspection system's working mode. They include three types: 1) Continued monitoring commands (score ≤ 69 points: production line operates normally, inspection system continues monitoring); 2) Focused monitoring commands (score 60-69 points: production line operates normally, inspection system focuses on monitoring subsequent images of that area); 3) Linkage control commands (score ≥ 70 points: triggers production line deceleration / stop, marks defect location). The criteria for these values ​​are: graded control based on defect severity, balancing production efficiency and product quality; standardized command format with an execution delay ≤ 10ms, ensuring rapid command execution and adapting to real-time linkage requirements; and an execution accuracy rate ≥ 99.9%, avoiding production losses due to command execution errors.

[0062] Step S700: Based on the response control command, the production line speed parameters are adjusted using a feedback loop mechanism. Historical data is compared to address the risk of missed detections and misjudgments to obtain optimized detection model parameters. The weights of the deep learning model are updated based on the optimized detection model parameters. Self-learning iteration is performed to address changes in material surface texture to obtain an adaptively enhanced detection framework.

[0063] Based on the response control command obtained in step S600, a feedback loop mechanism is adopted to adjust the production line speed parameters according to the command execution results (such as the defect improvement situation after the production line deceleration / stop), ensuring that subsequent production reduces the generation of defects. In response to the potential risks of missed detection and misjudgment during the detection process, historical defect detection data (including defect images, classification results, scoring data, and actual defect conditions) is called up for historical data comparison to analyze the reasons for missed detection and misjudgment (such as unreasonable model weights and incomplete suppression of texture interference). Based on the comparison results, the detection model parameters (such as learning rate and convolution kernel size) are optimized to obtain optimized detection model parameters. According to the optimized detection model parameters, the weights of the deep learning model in step S200 are updated to improve the model detection accuracy. At the same time, in response to the changes in the surface texture of spunlace nonwoven fabric with production batches and raw materials, the model self-learning iteration mechanism is activated to automatically adapt to texture changes and continuously optimize model performance, ultimately obtaining an adaptively enhanced detection framework to achieve continuous optimization of defect detection and adaptive adaptation to different production scenarios. In this step, model optimization and framework generation must meet the following parameter requirements: The response time of the feedback loop mechanism should be ≤100ms, based on the principle of quickly adjusting production line parameters and improving production status in a timely manner; the accuracy of historical data comparison should be ≥99.5%, based on the principle of ensuring accurate analysis of missed detections and misjudgments; the update delay of optimized detection model parameters should be ≤1s, based on the principle of quickly updating model weights and improving detection accuracy; the self-learning iteration cycle should be 1~24 hours, preferably 6~12 hours, based on the principle of ensuring the model adapts to texture changes in a timely manner while avoiding frequent iterations that affect detection stability; the detection accuracy of the adaptively enhanced detection framework should be ≥99.8%, based on the principle of ensuring continuous improvement in detection accuracy to meet production needs.

[0064] The feedback loop mechanism is a closed-loop mechanism used to adjust production line parameters and optimize the detection model based on the execution results of response control commands. The mechanism architecture consists of three layers: a command execution feedback layer, a parameter adjustment layer, and a model optimization layer. The command execution feedback layer collects operational data and defect detection data from the production line after responding to commands and analyzes defect improvement. The parameter adjustment layer adjusts the production line speed parameters based on the feedback results (adjustment range: 5%~20%). The model optimization layer initially optimizes the detection model parameters based on the feedback data. The mechanism's response time is ≤100ms, determined by the principle of rapid parameter adjustment and timely improvement of production status. The mechanism's stability is ≥99.9%, determined by the principle of ensuring long-term stable operation and avoiding closed-loop interruption. The parameter adjustment accuracy is ≤1m / min (production line speed), determined by the principle of ensuring accurate parameter adjustment and avoiding impact on production efficiency.

[0065] The production line speed parameter refers to the transmission speed of the spunlace nonwoven fabric production line. The initial speed range is 10~100m / min, preferably 30~60m / min, and the adjusted speed range is 8~80m / min. The basis for the selection is: combined with the spunlace nonwoven fabric production process, too fast a speed (>80m / min) is prone to defects, and too slow a speed (<8m / min) affects production efficiency. 30~60m / min is the conventional optimal speed. The adjustment range is 5%~20% of the original speed. The basis for the selection is: to avoid the production instability caused by too large an adjustment range. The control accuracy of the speed parameter is ≤1m / min. The basis for the selection is: to ensure accurate speed adjustment and adapt to the needs of defect improvement.

[0066] Historical data comparison refers to the process of comparing current detection data (defect images, classification results, scoring data) with historical defect detection data stored in the database to analyze the causes of missed detections and misjudgments. The historical data storage period is ≥3 months, and the data volume is ≥1 million records. The criteria for these values ​​are: to ensure that the historical data is representative and can accurately analyze the causes of missed detections and misjudgments; the comparison dimensions include defect type, defect size, texture features, and model output results. The criteria for these values ​​are: to comprehensively cover the possible causes of missed detections and misjudgments; the comparison accuracy is ≥99.5%. The criteria for this value are: to ensure accurate location of the causes of missed detections and misjudgments, providing support for model optimization; the comparison latency is ≤500ms. The criteria for this value are: to improve the efficiency of model optimization.

[0067] Optimized detection model parameters refer to the optimized detection model parameters obtained after comparing historical data and analyzing missed detections and false positives. These parameters include the learning rate (0.001~0.01, preferably 0.005), kernel size (3×3~7×7), batch size (16~64, preferably 32), and activation function parameters of the deep learning model. The optimized parameters are selected based on the following criteria: the optimized parameters can improve the model's ability to resist texture interference and identify small defects, and reduce the missed detection rate and false positive rate; the parameter update delay is ≤1s, selected based on the principle of fast model updates to avoid affecting the detection progress; and the parameter stability is ≥99.8%, selected based on the principle of ensuring stable operation of the model after updates.

[0068] Self-learning iteration refers to the process by which the detection model automatically collects new texture data, updates model weights, and optimizes the detection algorithm in response to changes in the surface texture of spunlace nonwoven fabrics (such as texture differences caused by changes in raw materials or adjustments in production processes). The iteration cycle is 1 to 24 hours, preferably 6 to 12 hours. The criteria for this value are: 1 hour can quickly adapt to slight texture changes, 24 hours can adapt to larger texture changes, and 6 to 12 hours balances iteration efficiency and model stability. During the iteration process, the model's learning rate decay coefficient is 0.9 to 0.99, preferably 0.95. The criteria for this value are: to ensure stable model iteration and avoid overfitting. The detection accuracy of the model after self-learning iteration is improved by ≥1%, and the criteria for this value are: to ensure continuous enhancement of model adaptability.

[0069] The adaptive enhanced detection framework refers to a complete detection framework that, after parameter optimization and self-learning iteration, can adapt to changes in the surface texture of spunlace nonwoven fabrics, has strong anti-interference capabilities, low false negative rate, and high detection accuracy. It includes six major modules: image acquisition, illumination compensation, feature extraction, defect classification, scoring linkage, and model optimization. The framework's detection accuracy is ≥99.8%, false negative rate is ≤0.2%, and false positive rate is ≤0.3%, based on the following criteria: meeting the detection needs of large-scale production of spunlace nonwoven fabrics; the framework's adaptive range is: basis weight 20~200g / m², thickness 0.1~1.0mm, texture spacing 0.05~0.5mm, based on the following criteria: covering commonly used spunlace nonwoven fabric specifications and adapting to different production scenarios; the framework's running latency is ≤100ms / frame, based on the following criteria: adapting to the real-time detection needs of production lines.

[0070] Furthermore, the defect detection method for spunlace nonwoven fabric based on a large model provided in this embodiment includes step S100 as follows: Step S110: Obtain the original continuous image sequence on the spunlace nonwoven fabric production line through an image acquisition device array.

[0071] On a spunlace nonwoven fabric production line, an array of image acquisition devices is used to acquire raw, continuous image sequences, providing foundational data for subsequent processing. For example, in one implementation, the image acquisition array employs multiple high-speed CCD cameras positioned at key locations on the production line, such as the spunlace jetting area and above the fabric conveyor belt. These high-speed CCD cameras synchronously capture continuous image sequences of the nonwoven fabric surface at a rate of 30 frames per second. Specifically, the acquisition process involves light-assisted illumination to ensure an image resolution of 1920×1080 pixels, thereby obtaining a clear raw, continuous image sequence for extracting texture feature statistics and calculating the local contrast distribution matrix.

[0072] Step S120: Divide the original continuous image sequence into blocks, extract the texture feature statistics of each local window, and calculate the local contrast distribution matrix.

[0073] The formula for calculating local contrast is: (1) In formula (1), For pixels The local contrast value, dimensionless, is calculated from the neighborhood grayscale statistics, and its value ranges from [value range missing]. Defined as pixel Neighborhood texture contrast; and In pixels The maximum and minimum gray values ​​within the centered local window, with a value range of [value missing]. ; Let be the row and column coordinates of the pixel. The control logic of formula (1) is to obtain the normalized local contrast by calculating the ratio of the difference between the maximum and minimum gray values ​​within the local window and the sum of the values. When the gray distribution within the window is uniform, the contrast approaches 0; when there is a significant difference in brightness, the contrast approaches 1. This formula can quantify the texture undulation of spunlace nonwoven fabric, identify low-contrast areas, and provide a basis for subsequent illumination compensation and defect detection. Formula (1) overcomes the limitation of the traditional fixed threshold method in distinguishing between normal texture and weak defect boundaries by adaptively quantifying the local texture contrast of spunlace nonwoven fabric; it can effectively identify low-contrast defect areas, provide accurate texture distribution basis for illumination unevenness compensation and subsequent defect feature extraction, and significantly improve the robustness and accuracy of defect detection.

[0074] When calculating the local contrast distribution matrix, the original continuous image sequence is first converted to grayscale, and then the texture gradient of each pixel is extracted using the Sobel operator. The mean and variance of the local region (such as a 5×5 window) are calculated to form the local contrast distribution matrix.

[0075] Step S130: Construct an adaptive illumination compensation function based on the brightness deviation values ​​of each pixel in the local contrast distribution matrix.

[0076] The brightness deviation value is obtained by comparing the difference between the pixel and the average brightness of the neighborhood. For example, when the brightness deviation value exceeds 20, it is marked as a high contrast area, thereby constructing an adaptive illumination compensation function.

[0077] Step S140: The original continuous image sequence is reconstructed frame by frame using an adaptive illumination compensation function to obtain a preliminary enhanced image sequence.

[0078] The adaptive illumination compensation formula is: (2) In formula (2), The range of values ​​for the compensated pixel grayscale value is: ; This represents the original pixel grayscale value; This is the compensation gain coefficient, and its value range is... It is obtained by adaptive calculation of local contrast; This is the local background reference brightness, with a value range of [value range missing]. It is obtained from background modeling or local neighborhood statistics; The pixel row and column coordinates are used. The control logic of formula (2) is to perform pixel-by-pixel brightness correction based on local background deviation, and to compensate the original grayscale value to the background reference brightness. Compensation gain coefficient Control the correction intensity; when local contrast is low (significant uneven lighting), increase the intensity. Enhance compensation effect; when local contrast is high (texture is clear), it can reduce... To avoid overcompensation and achieve dynamic adaptive correction, formula (2) overcomes the limitation of traditional global brightness correction in handling local uneven illumination by using pixel-by-pixel dynamic brightness compensation; it effectively suppresses the illumination deviation of the spunlace nonwoven fabric production line, significantly improves the visibility of low-contrast weak defects, provides high-quality enhanced images for subsequent defect feature extraction and detection, and improves the accuracy and robustness of defect detection.

[0079] This adaptive illumination compensation function is based on a polynomial model fitted with the deviation value, such as the quadratic function f(x)=ax. 2 +bx+c, where parameters a, b, and c are obtained from matrix data fitting using the least squares method. This is applied in the frame-by-frame brightness reconstruction process, multiplying each frame pixel of the original continuous image sequence by a compensation coefficient to achieve the initial acquisition of the enhanced image sequence.

[0080] Step S150: Identify the pore structure formed by the hydroentangling process in the preliminary enhanced image sequence. If the edge gradient value of the pore structure is lower than the preset grayscale threshold, call the histogram specification operator to perform global dynamic range adjustment on the preliminary enhanced image sequence to obtain an image sequence with enhanced contrast.

[0081] When identifying the porous structures formed by the hydroentanglement process in the preliminary enhanced image sequence, the Canny edge detection algorithm is used to calculate the edge gradient value. If the gradient value is lower than a preset grayscale threshold, such as 50, the histogram specification operator is invoked. This histogram specification operator maps pixel values ​​to the range of 0-255 through a cumulative distribution function, achieving global dynamic range adjustment. For example, pixels in low-contrast areas are stretched to a higher dynamic range, thereby obtaining an image sequence with enhanced contrast. Through the above processing, the accuracy of nonwoven fabric defect detection is improved.

[0082] Preferably, the defect detection method for spunlace nonwoven fabric based on a large model provided in this embodiment includes step S200: Step S210: Extract the original feature map containing spatial location and semantic information from the image sequence with enhanced contrast.

[0083] The original feature maps are extracted from the image sequence with enhanced contrast by convolutional neural networks. For example, on the spunlace nonwoven fabric production line, the network uses the ResNet architecture to process the sequence frames and captures texture details and pore distribution through layer-by-layer convolution operations, thereby obtaining feature representations containing spatial coordinates and semantic labels.

[0084] Step S220: Perform upsampling alignment and weighted fusion processing on the original feature map to obtain a fused feature map with multi-scale representation capabilities.

[0085] The multi-scale feature fusion calculation formula is as follows: (3) In formula (3), The feature map is a multi-scale fusion map, obtained by weighted fusion of features from each layer; For the first The layer feature weights, summing to 1, are obtained through end-to-end learning of the neural network. For the first Layer-scale feature map; The total number of scales involved in the fusion. The control logic of formula (3) is to achieve multi-scale semantic fusion by weighted summation of feature maps from different receptive fields. Weights Through adaptive learning, the contribution ratio of features at each layer can be automatically adjusted, enabling the model to simultaneously take into account low-level detailed information (such as micron-level defect texture) and high-level semantic information (such as centimeter-level defect overall outline). Formula (3) overcomes the limitation of traditional single-scale features being unable to simultaneously adapt to defects at all scales in spunlace nonwoven fabrics by weighted fusion of multi-scale features; it can simultaneously and effectively detect various defects ranging from micron-level fiber breaks to centimeter-level holes, significantly improving the model's ability to detect defects at different scales, and providing a more comprehensive and robust feature basis for subsequent defect classification and localization.

[0086] When performing upsampling fusion on these original feature maps, the low-resolution layer is first enlarged to a high-resolution scale using bilinear interpolation. Then, the multi-layer features are fused element-wise using a feature pyramid network. Specifically, during the fusion process, low-level features provide fine edge information, while high-level features contribute semantic context. For example, in the non-woven fabric defect detection scenario, the bottom layer image with a resolution of 256×256 is aligned and fused with the upper layer image with a resolution of 512×512. Skip connections are introduced to preserve gradient details, thereby obtaining a fused feature map with multi-scale representation capabilities. This process ensures the comprehensive capture of defects of different sizes.

[0087] Step S230: Use preset anchor boxes to perform a sliding window scan on the fused feature map and remove redundant boxes to obtain refined candidate target boxes.

[0088] Using preset anchor boxes, a sliding window scan is performed on the fused feature map. For example, the anchor boxes are designed as rectangular templates with various width and height ratios such as 1:1, 1:2 and 2:1. The entire layer is covered by sliding with a fixed step size such as 8 pixels. After scanning, redundant boxes with an overlap of more than 0.5 are removed by a non-maximum suppression algorithm to obtain refined candidate target boxes.

[0089] Step S240: Perform pixel resampling on the local region corresponding to the candidate target box to obtain a high-resolution local magnified feature block.

[0090] When resampling pixels in the local region corresponding to the candidate target box, a region interest pooling operation is used to map the pixels in the box to a grid of fixed size, such as 14×14. The feature value of each grid is calculated by average pooling, thereby obtaining a high-resolution local magnified feature block.

[0091] Step S250: Use a fully connected network to perform fine-grained classification and boundary regression operations on the locally magnified feature blocks to determine potential defect candidate regions.

[0092] Fully connected networks are used to perform fine-grained classification and boundary regression operations on locally magnified feature blocks. For example, a fully connected network consists of multiple fully connected layers. First, the softmax function is used to classify defect types such as fiber breakage or uneven porosity. Then, the smooth L1 loss function is used to regress the boundary coordinates and adjust the box position to determine potential defect candidate regions.

[0093] Furthermore, in the large-model-based defect detection method for spunlace nonwoven fabrics provided in this embodiment, step S300 includes: S310. Extract the local pixel grayscale matrix for the potential defect candidate region, and use the Sobel operator to calculate the derivatives of the local pixel grayscale matrix in the horizontal and vertical directions to determine the boundary gradient distribution of each pixel.

[0094] The formula for calculating the Sobel gradient is: (4) In step formula (4), The gradient magnitude is dimensionless and reflects the edge intensity of a pixel. and These are the gradients in the horizontal and vertical directions, respectively. The gradient direction, measured in rad, reflects the normal direction of the defect contour. The control logic of formula (4) calculates the gray-level gradients in the horizontal and vertical directions using the Sobel operator, and then synthesizes the gradient magnitude and direction from the two gradient components. The gradient magnitude reflects the edge intensity, and the gradient direction reflects the edge orientation, which can effectively locate the defect edge and describe its contour structure. Formula (4) accurately extracts the intensity and direction of the defect edge through the Sobel gradient formula, breaking through the limitation of traditional edge detection methods that are difficult to distinguish between weak defect edges and random textures of nonwoven fabrics; it can effectively suppress background texture interference, accurately locate weak edge defects, provide a reliable basis for subsequent defect contour extraction and feature analysis, and significantly improve the accuracy of spunlace nonwoven fabric defect detection.

[0095] For the processing of potential defect candidate regions, the local pixel grayscale matrix is ​​first extracted from these regions. For example, in the spunlace nonwoven fabric defect detection system, the image blocks in the candidate box are converted into grayscale matrix, with the grayscale matrix size being 128x128 pixels, thus providing basic data for subsequent edge calculation. For example, when using the Sobel operator to calculate the derivatives of the grayscale matrix in the horizontal and vertical directions, the Sobel operator, an edge detection operator, uses 3x3 convolution kernels to perform convolution operations on the horizontal direction (e.g., [-1, 0, 1; -2, 0, 2; -1, 0, 1]) and the vertical direction (e.g., [-1, -2, -1; 0, 0, 0; 1, 2, 1]). Specifically, in nonwoven fabric texture analysis, these kernels are applied to each pixel to calculate the horizontal derivative Gx and the vertical derivative Gy. For example, for a pixel value matrix, point-by-point convolution yields the distribution maps of Gx and Gy, which helps to capture subtle changes in fiber edges. In this way, the boundary gradient distribution of each pixel is determined, thereby revealing potential defect boundary features.

[0096] Step S320: Calculate the gradient magnitude of each pixel based on the boundary gradient distribution. If the gradient magnitude is lower than the preset edge strength threshold, set the gray value of the pixel to zero to obtain a preliminary edge feature map.

[0097] The gradient magnitude of each pixel is calculated based on the boundary gradient distribution, usually using the formula sqrt(G x ²+G y ²) to obtain the amplitude. If the amplitude is lower than the preset edge strength threshold, such as 0.1, the gray value of the pixel is set to zero to obtain a preliminary edge feature map. For example, when processing non-woven fabric pore defects, this threshold filtering can remove noise interference, retain strong edge pixels, and form a clear preliminary edge map.

[0098] Step S330: Use a cross-shaped structural element of a preset size to perform erosion operation on the preliminary edge feature map to obtain a denoised edge image.

[0099] The preliminary edge feature map is subjected to erosion operation using a cross-shaped structural element of a preset size. The cross-shaped structural element is a template composed of the center point and its four neighboring points above, below, left, and right. In the operation, if all pixels in the template coverage area are foreground, the center is retained; otherwise, it is eroded, thus obtaining a denoised edge image. This effectively eliminates isolated noise points in non-woven fabric detection.

[0100] Step S340: Perform dilation operation on the denoised edge image using cross-shaped structuring elements to determine the enhanced edge map with complete connected components.

[0101] For the denoised edge image, the same cross-shaped structuring element is used to perform dilation operation. The dilation process is to set the center as the foreground if there is a foreground pixel in the template coverage area, and determine the complete enhanced edge map of the connected domain. For example, this can connect broken fiber edges and ensure the continuity of defective areas.

[0102] Step S350: By performing topological analysis on the enhanced edge map, closed boundary paths are extracted to obtain a refined defect contour map.

[0103] By performing topological analysis on the enhanced edge map and extracting closed boundary paths, contour tracking algorithms such as Moore's Neighborhood Tracking are used. Starting from the edge point, adjacent pixels are traversed clockwise or counterclockwise to record the point sequence that forms the closed path, resulting in a refined defect contour map. On the nonwoven fabric production line, this helps to accurately delineate contours such as fiber breaks, thereby improving the accuracy of defect identification.

[0104] Preferably, the defect detection method for spunlace nonwoven fabric based on a large model provided in this embodiment includes step S400: Step S410: Extract gradient vectors from the refining defect profile map. The gradient vectors are used to determine the boundary gradient extreme value sequence.

[0105] For the processing of refining defect contour maps in nonwoven fabric defect detection systems, gradient vectors are first extracted to analyze boundary changes. Specifically, boundary pixels are selected from the refining defect contour map, and the grayscale difference between adjacent pixels is calculated to form a vector representation. For example, when processing fiber agglomeration defects, a vector pointing to the direction of maximum change is calculated for each boundary point, thereby determining the boundary gradient extreme value sequence. This boundary gradient extreme value sequence reflects the sharpness of the defect edge.

[0106] Step S420: Determine whether the boundary gradient extreme value sequence exceeds the preset gradient determination threshold. If the boundary gradient extreme value sequence exceeds the gradient determination threshold, assign a high-risk label to the corresponding pixel.

[0107] The judgment is continued based on the boundary gradient extreme value sequence. If the boundary gradient extreme value sequence exceeds the preset gradient judgment threshold, such as 0.5, the corresponding pixel is marked as a high-risk identifier, indicating a potential defect area.

[0108] Step S430: If the boundary gradient extreme value sequence does not exceed the gradient determination threshold, then assign the corresponding pixel a normal texture label.

[0109] If the boundary gradient extreme value sequence does not exceed the gradient determination threshold, then a normal texture label is assigned, identifying the uniform fiber region.

[0110] Step S440: Obtain the initial region division map based on the high-risk markers and normal texture markers.

[0111] An initial region division map is generated using this high-risk and normal texture labeling method. High-risk areas are highlighted in red, while normal texture areas are highlighted in green, facilitating subsequent analysis.

[0112] Step S450: Perform connectivity analysis on the initial region partitioning map to obtain independent feature regions. After numerical encoding, the independent feature regions are used to obtain a classification defect label set.

[0113] Connectivity analysis is performed on the initial region segmentation map, and a flood-fill algorithm is used to expand from high-risk marker pixels to adjacent pixels with the same marker, forming independent feature regions. For example, in the inspection of nonwoven fabric production lines, this analysis can isolate multiple independent defect blocks, such as one region corresponding to a hole defect and another corresponding to a stain defect. Subsequently, these independent feature regions are numerically encoded, such as calculating the area, perimeter, and shape factor of the region. If the area is greater than 100 pixels and the shape factor is close to 1, it is encoded as a "circular defect" label. The shape factor is calculated by dividing the square of the perimeter by 4π of the area, resulting in a set of classified defect labels, including types such as "fiber breakage" and "porosity anomaly," thus supporting automated classification. Through the above process, accurate location and classification of nonwoven fabric defects are achieved.

[0114] Furthermore, the defect detection method for spunlace nonwoven fabric based on a large model provided in this embodiment includes step S500: Step S510: Extract the centroid pixel mapping based on the classification defect label set to obtain the defect location coordinates.

[0115] In the nonwoven fabric defect detection system, the centroid pixel mapping is extracted based on the defect label set to obtain the defect location coordinates. Specifically, for the defect area corresponding to each category label, the gray-weighted average position of all pixels within the defect area is calculated as the centroid. That is, the x-coordinate is calculated by multiplying all x-coordinates by the sum of their gray values ​​and dividing by the total gray value, and the y-coordinate is similarly calculated. This maps a precise set of two-dimensional coordinate points, which represent the core location of the defect, facilitating subsequent localization analysis.

[0116] Step S520: For the coordinates of the defect location, a clustering algorithm is used to obtain coordinate clusters.

[0117] The clustering objective function is: (5) In formula (5), The clustering objective loss function is obtained through iterative optimization using the K-means algorithm. The number of clusters; For the first A set of defect clusters; For the first The coordinates of the cluster center; The coordinates of the defective pixels are given. The control logic of formula (5) is that the objective of the function is to minimize the sum of squared distances from each defective pixel to the center of its cluster. By iteratively updating the cluster allocation and cluster center coordinates, defective pixels within the same cluster are concentrated as much as possible, and defect distribution between different clusters is dispersed as much as possible, thereby achieving effective division of dense defect areas. Formula (5) uses the K-means clustering algorithm to group defect coordinates, breaking through the limitation that traditional single-point defect statistics cannot reflect distribution characteristics; it can quickly identify and divide dense defect areas, providing structured defect distribution data for subsequent parallel scoring of defect severity and production line linkage control, significantly improving the efficiency and intelligence level of production line defect handling.

[0118] For the coordinates of these defect locations, a clustering algorithm is used to obtain coordinate clusters. In one implementation, the K-means clustering algorithm is used. First, the number of clusters is set to 3. Based on the defect types such as fiber breakage, porosity anomalies, and stains, the Euclidean distance from each coordinate to the cluster center is estimated. Then, the cluster center is updated until convergence. For example, one cluster center is located in the upper left of the image corresponding to the fiber breakage area, and another cluster center is located in the lower right of the image corresponding to the porosity cluster. This merges scattered coordinates into compact clusters, improving the efficiency of defect grouping.

[0119] Step S530: Allocate concurrent processing threads to coordinate clusters, extract morphological feature vectors of coordinate clusters through concurrent processing threads, and perform inner product operation on morphological feature vectors to obtain the local severity index.

[0120] The formula for the inner product of severity is: (6) In formula (6), This is an index representing the severity of local defects. The defect morphology feature vector contains multiple feature components such as defect area, aspect ratio, and edge gradient. The feature weight vector; This is the transpose of the weight vector. The control logic of formula (6) is to achieve the weighted fusion of multiple morphological features through the inner product operation of the feature vector and the weight vector, and obtain a single severity index. Each feature component is multiplied by its corresponding weight and then summed. The feature with the larger weight (such as large area hole, high gradient edge) contributes more to the severity index. Formula (6) realizes the quantitative scoring of defect severity through the weighted inner product of morphological features, breaking through the limitation of traditional qualitative description of defects and inability to achieve graded early warning; it can uniformly quantify and evaluate defects of different types and sizes, providing objective and comparable severity indicators for graded processing and quality control of the production line, and significantly improving the intelligent level of production line defect management.

[0121] Concurrent processing threads are allocated to coordinate clusters, and morphological feature vectors are extracted through these threads. In one embodiment, a multi-threaded framework such as Java's ExecutorService is used to allocate an independent concurrent processing thread to each coordinate cluster. Simultaneously, features including area as pixel count, perimeter through boundary tracing, shape factor (perimeter squared by 4π area), and aspect ratio are calculated, forming a four-dimensional feature vector such as [area 100, perimeter 50, shape factor 0.8, aspect ratio 2.0]. These features quantify the geometric properties of the coordinate clusters. The morphological feature vectors are then subjected to an inner product operation to obtain a local severity index. Specifically, the morphological feature vectors are multiplied element-wise with a preset weight vector such as [0.3, 0.4, 0.2, 0.1] and summed, for example, 100*0.3+50*0.4+0.8*0.2+2.0*0.1=45.16, yielding an index value reflecting the severity.

[0122] S540. Based on the local severity, perform index lookup to determine the severity score of the defect.

[0123] Based on the local severity index, the severity score of the defect is determined. For example, an index greater than 40 is "high severity" and 30-40 is "medium severity", and the score label is output.

[0124] Preferably, the defect detection method for spunlace nonwoven fabric based on a large model provided in this embodiment includes step S600: Step S610: Obtain the defect severity score, compare the defect severity score with the warning threshold, and obtain the score comparison difference.

[0125] In the nonwoven fabric defect detection system, the first step is to obtain a defect severity score. For example, a "high severity" label is obtained by looking up a table using a previously calculated local severity index. The numerical value, such as 45, represents a quantitative assessment of the defect. Specifically, the defect severity score is compared with a warning threshold, which is a preset numerical standard, such as 40, used to distinguish whether a defect has reached a level requiring immediate intervention. The difference between the scores is obtained through subtraction; for example, 45 minus 40 equals 5. This difference quantifies the degree of exceeding the standard, thus providing a basis for subsequent judgments.

[0126] Step S620: Determine whether the score comparison difference is greater than zero. If it is greater than zero, trigger the production line linkage signal; otherwise, generate an image monitoring command.

[0127] The system determines whether the difference between the scoring comparisons is greater than zero. If it is, a production line linkage signal is triggered. This digital signal notifies downstream equipment to stop operating and prevent defective products from continuing to flow. Otherwise, an image monitoring command is generated. This command is control code for the camera, instructing the spunlace nonwoven fabric defect detection system to continue acquiring images to monitor potential changes. This judgment process is based on simple conditional branching logic, ensuring timely response.

[0128] Step S630: Generate a first response control command based on the production line linkage signal, or obtain a second response control command by parsing the subsequent image sequence based on the image monitoring command.

[0129] Based on the production line linkage signals, a first response control command is generated. For example, after a signal is triggered, the spunlace nonwoven fabric defect detection system calls a predefined protocol to generate a command sequence, such as "pause the conveyor belt and activate the alarm." These first response control commands directly act on the PLC controller to achieve automated intervention. Alternatively, a second response control command can be obtained by parsing subsequent image sequences based on the image monitoring commands. The parsing process involves sequence analysis of consecutive frame images, such as extracting the dynamic changes of defect areas in subsequent image sequences, such as the area increasing from 100 pixels to 150 pixels. Then, based on the trend of change, a second response control command, such as "enhance the lighting and rescan," is generated to maintain monitoring continuity.

[0130] Step S640: Encapsulate the first response control instruction or the second response control instruction to obtain the response control instruction.

[0131] The first or second response control instruction is encapsulated to obtain a response control instruction. For example, the instruction sequence can be packaged into a JSON-formatted data packet containing fields such as "Type: Pause" and "Parameter: Duration 10 seconds" for easy transmission to the execution module. This method achieves an automated closed-loop defect response.

[0132] Furthermore, the defect detection method for spunlace nonwoven fabric based on a large model provided in this embodiment includes step S700 as follows: Step S710: Analyze the response control command to obtain the production line speed parameters.

[0133] First, the response control command is parsed to obtain the production line speed parameters. For example, on a non-woven fabric production line, the response control command contains a speed value such as 50 meters per minute. This parameter is extracted by decoding the data field in the command, thereby providing a basis for dynamic adjustment for subsequent detection.

[0134] Step S720: Collect the detection results based on the production line speed parameters, and compare the detection results with historical data to obtain the feature distribution differences.

[0135] The formula for calculating the difference in characteristic distribution is: (7) In formula (7), The difference in characteristic distribution is calculated by histogram comparison; For the current feature histogram, the th The frequency of the interval; The historical standard feature histogram of the first The frequency of the interval; The total number of histogram intervals is denoted as . The control logic of formula (7) is to quantify the difference in feature distribution by calculating the average absolute difference between the feature histograms of the current batch and the historical standard batches. The larger the difference value, the greater the deviation of the texture, grayscale and other feature distributions of the current batch from the historical normal state. There may be texture drift caused by changes in raw materials and processes, which can easily lead to false detection. Formula (7) drives the model to learn by feature distribution differences, which breaks through the limitation of traditional fixed models that cannot adapt to changes in raw materials and processes. It can monitor the drift of nonwoven fabric feature distribution in real time, automatically identify the risk of false detection caused by texture changes, provide a basis for online adaptive updates of the model, and significantly improve the robustness and stability of the defect detection system in the long-term production process.

[0136] After obtaining the production line speed parameters, the acquisition frequency is adjusted according to these parameters to obtain the detection results. Specifically, if the speed is 50 meters per minute, the camera is set to capture 5 frames per second. The acquired detection results include defect location and type data. These detection results are then compared with historical data stored in the database. The historical data covers defect statistics over the past week, such as an average defect density of 2 defects per square meter. By calculating the deviation between the current detection results and the historical average, for example, if the current density is 3 defects per square meter, the deviation value is 1, thus obtaining the characteristic distribution difference. This characteristic distribution difference reflects the volatility of the production process and provides a quantitative indicator for judging potential problems.

[0137] S730. Determine whether the difference in feature distribution is greater than the preset difference threshold.

[0138] S740. If the difference in feature distribution is greater than the preset difference threshold, then extract the features of the misjudged samples to obtain the optimized detection model parameters.

[0139] If the difference in feature distribution is greater than a preset difference threshold such as 0.5, then the features of misjudged samples are extracted from the detection results. For example, smooth areas that are misclassified as defects are identified. The features of misjudged samples include texture uniformity and color consistency. By analyzing these features of misjudged samples, the parameters of the optimized detection model are generated, such as adjusting the threshold from 0.8 to 0.7 to reduce false positives.

[0140] S750. Update the model weights according to the optimized detection model parameters to obtain the updated detection model. Iterate using the updated detection model to obtain an adaptively enhanced detection framework.

[0141] The model weights are updated based on the optimized detection model parameters. For example, in a neural network model, the optimized detection model parameters are applied to the gradient descent process of the weight matrix to obtain an updated detection model. This updated detection model is then used to iteratively train new image sequences. The iteration may involve multiple forward propagations and backward adjustments until convergence, resulting in an adaptively enhanced detection framework. This adaptively enhanced detection framework can better adapt to defect identification under variable speed conditions on production lines. Through the above process, real-time optimization of nonwoven fabric defects is achieved, improving detection accuracy.

[0142] Please see Figure 2This invention provides a large-model-based defect detection system for spunlace nonwoven fabrics, used to implement the aforementioned large-model-based defect detection method for spunlace nonwoven fabrics. The system includes an image sequence acquisition module 10, a potential defect candidate region determination module 20, a refined defect contour map acquisition module 30, a classification defect label set acquisition module 40, a defect severity score determination module 50, a response control command acquisition module 60, and a detection framework acquisition module 70. The image sequence acquisition module 10 acquires continuous image sequences from the spunlace nonwoven fabric production line using an image acquisition device array. An adaptive illumination compensation method is used to process the continuous image sequences to address material surface texture interference, resulting in an image sequence with enhanced contrast. The potential defect candidate region determination module 20 extracts multi-scale feature maps using a deep learning model based on the enhanced contrast image sequences, and performs local magnification analysis on low-contrast areas to determine potential defect candidate regions. The refined defect contour map acquisition module 30 calculates the boundary gradient distribution based on the potential defect candidate regions using an edge detection algorithm, and addresses minor defects... Morphological filtering is applied to the defect to obtain a refined defect contour map. A defect label set acquisition module 40 determines whether the boundary gradient distribution exceeds a preset threshold based on the refined defect contour map. If it does, it is marked as a high-risk defect area; otherwise, it is marked as a normal texture area, thus obtaining a defect label set. A defect severity score determination module 50 obtains the defect location coordinates from the defect label set and uses a parallel computing module to process the defect location coordinates to determine the defect severity score for real-time detection. A response control command acquisition module 60 determines whether the defect severity score is higher than a warning threshold. If it is higher, a production line linkage signal is triggered; otherwise, subsequent image sequences are monitored to obtain a response control command. A detection framework acquisition module 70 adjusts the production line speed parameters using a feedback loop mechanism based on the response control command, compares historical data to address the risk of missed detections and misjudgments, obtains optimized detection model parameters, updates the deep learning model weights based on the optimized detection model parameters, and performs self-learning iterations to address changes in material surface texture, resulting in an adaptively enhanced detection framework.

[0143] The defect detection method and system for spunlace nonwoven fabric based on a large model provided in this embodiment have the following beneficial effects compared with the prior art: 1. Adaptive illumination compensation is used to process continuous image sequences, with an illumination compensation adaptation rate of ≥99% and an image contrast improvement of over 45%. This effectively overcomes interference such as uneven lighting and reflections, making low-contrast areas clearer and solving the problem of missed detection caused by lighting issues in traditional detection methods.

[0144] 2. By combining deep learning models to extract multi-scale features, the accuracy of low-contrast region analysis is ≥98.8%, the localization accuracy of potential defect candidate regions is ≤0.2mm, and the localization accuracy reaches 99.2%, which can accurately capture subtle defects and avoid missing minor hidden dangers.

[0145] 3. By refining the defect contour through edge detection and morphological filtering, the contour extraction accuracy is ≥98.5%, the defect boundary recognition error is ≤0.15mm, effectively eliminating false defects, reducing misjudgments, and improving the defect recognition accuracy to over 99.3%.

[0146] 4. Based on the boundary gradient distribution, defects are classified and their severity is assessed. The defect classification accuracy is ≥99%, and the severity assessment error is ≤10%. It can accurately distinguish the defect type and level, providing a precise basis for quality control and reducing the risk of quality misjudgment.

[0147] 5. By adopting a parallel computing and feedback loop mechanism, the detection response time is ≤200ms, which improves the real-time performance by 70% compared with traditional methods. It can synchronously adjust the production line speed, improve the production line adaptation efficiency by 50%, and meet the detection needs of high-speed production.

[0148] 6. By comparing historical data and optimizing model parameters, the false negative rate was reduced to below 0.3%, the false positive rate was controlled to below 0.5%, the detection accuracy continued to improve after the model self-learning iteration, and the model adapted to the dynamic changes of material surface texture, with an adaptation rate of 98%.

[0149] 7. Overall improvement in defect detection efficiency and accuracy, reducing product non-conformity rate by more than 35%, reducing rework and scrap costs by about 40%, significantly reducing production quality risks, adapting to various material surface defect detection scenarios, and having strong versatility.

[0150] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if these modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include these modifications and modifications.

Claims

1. A defect detection method for spunlace nonwoven fabrics based on a large model, characterized in that, Includes the following steps: S100. A continuous image sequence is acquired from the spunlace nonwoven fabric production line through an image acquisition device array. The continuous image sequence is processed by an adaptive illumination compensation method to address material surface texture interference, thereby obtaining an image sequence with enhanced contrast. S200. Based on the image sequence with enhanced contrast, a deep learning model is used to extract multi-scale feature maps, and local magnification analysis is performed on the low-contrast area to determine potential defect candidate areas. S300. Based on the potential defect candidate region, the boundary gradient distribution is calculated using an edge detection algorithm, and morphological filtering is performed on the small defects to obtain a refined defect contour map. S400. Based on the refined defect contour map, determine whether the boundary gradient distribution exceeds a preset threshold. If it does, mark it as a high-risk defect area; otherwise, mark it as a normal texture area to obtain a classification defect label set. S500: Obtain the defect location coordinates through the classified defect label set, and process the defect location coordinates using a parallel computing module to determine the defect severity score in order to meet the real-time detection requirements. S600: Determine whether the severity score of the defect is higher than the warning threshold. If it is higher, trigger the production line linkage signal; otherwise, continue to monitor the subsequent image sequence and obtain the response control command. S700. Based on the response control command, the production line speed parameters are adjusted using a feedback loop mechanism. Historical data is compared to address the risk of missed detections and misjudgments to obtain optimized detection model parameters. The weights of the deep learning model are updated based on the optimized detection model parameters. Self-learning iteration is performed to address changes in material surface texture to obtain an adaptively enhanced detection framework.

2. The defect detection method for spunlace nonwoven fabric based on a large model according to claim 1, characterized in that, Step S100 includes: S110. Obtain the original continuous image sequence on the spunlace nonwoven fabric production line through an image acquisition device array; S120. The original continuous image sequence is divided into blocks, the texture feature statistics of each local window are extracted, and the local contrast distribution matrix is ​​calculated. S130. Construct an adaptive illumination compensation function based on the brightness deviation value of each pixel in the local contrast distribution matrix; S140. The original continuous image sequence is reconstructed frame by frame using the adaptive illumination compensation function to obtain a preliminary enhanced image sequence. S150. Identify the pore structure formed by the hydroentangling process in the preliminary enhanced image sequence. If the edge gradient value of the pore structure is lower than the preset grayscale threshold, call the histogram specification operator to perform global dynamic range adjustment on the preliminary enhanced image sequence to obtain an image sequence with enhanced contrast.

3. The method for detecting defects in spunlace nonwoven fabric based on a large model according to claim 1, characterized in that, Step S200 includes: S210. Extract the original feature map containing spatial location and semantic information from the image sequence with enhanced contrast. S220. Perform upsampling alignment and weighted fusion processing on the original feature map to obtain a fused feature map with multi-scale representation capabilities; S230. Using a preset anchor frame, a sliding window scan is performed on the fused feature map and redundant boxes are removed to obtain refined candidate target boxes. S240. Perform pixel resampling on the local region corresponding to the candidate target box to obtain a high-resolution local magnified feature block; S250. Use a fully connected network to perform fine-grained classification and boundary regression operations on the local magnified feature blocks to determine potential defect candidate regions.

4. The defect detection method for spunlace nonwoven fabric based on a large model according to claim 2, characterized in that, Step S300 includes: S310. Extract local pixel grayscale matrix for potential defect candidate regions, and use Sobel operator to calculate the derivatives of the local pixel grayscale matrix in the horizontal and vertical directions to determine the boundary gradient distribution of each pixel. S320. Calculate the gradient magnitude of each pixel based on the boundary gradient distribution. If the gradient magnitude is lower than the preset edge strength threshold, set the gray value of the pixel to zero to obtain a preliminary edge feature map. S330. The preliminary edge feature map is subjected to erosion operation using a cross-shaped structural element of a preset size to obtain a denoised edge image; S340. Perform dilation operation on the denoised edge image using the cross-shaped structural element to determine an enhanced edge map with complete connected components. S350. By performing topological analysis on the enhanced edge map, closed boundary paths are extracted to obtain a refined defect contour map.

5. The method for detecting defects in spunlace nonwoven fabric based on a large model according to claim 1, characterized in that, Step S400 includes: S410. Extract gradient vectors from the refining defect profile map, wherein the gradient vectors are used to determine the boundary gradient extreme value sequence. S420. Determine whether the boundary gradient extreme value sequence exceeds a preset gradient determination threshold. If the boundary gradient extreme value sequence exceeds the gradient determination threshold, assign a high-risk label to the corresponding pixel. S430. If the boundary gradient extreme value sequence does not exceed the gradient determination threshold, then assign a normal texture label to the corresponding pixel. S440. Obtain an initial region division map based on the high-risk marker and the normal texture marker; S450. Perform connectivity analysis on the initial region partitioning map to obtain independent feature regions. After numerical encoding, the independent feature regions are used to obtain a classification defect label set.

6. The method for detecting defects in spunlace nonwoven fabric based on a large model according to claim 5, characterized in that, Step S500 includes: S510. Extract the centroid pixel mapping based on the defect label set to obtain the defect location coordinates; S520. For the coordinates of the defect location, a clustering algorithm is used to obtain coordinate clusters; S530. Allocate concurrent processing threads to the coordinate clusters, extract morphological feature vectors of the coordinate clusters through the concurrent processing threads, and perform inner product operations on the morphological feature vectors to obtain the local severity index. S540. Perform an index lookup based on the local severity to determine the defect severity score.

7. The method for detecting defects in spunlace nonwoven fabric based on a large model according to claim 1, characterized in that, Step S600 includes: S610. Obtain the defect severity score, compare the defect severity score with the warning threshold, and obtain the score comparison difference. S620. Determine whether the score comparison difference is greater than zero. If it is greater than zero, trigger the production line linkage signal; otherwise, generate an image monitoring command. S630. Generate a first response control command based on the production line linkage signal, or parse the subsequent image sequence based on the image monitoring command to obtain a second response control command; S640. Encapsulate the first response control instruction or the second response control instruction to obtain a response control instruction.

8. The method for detecting defects in spunlace nonwoven fabric based on a large model according to claim 7, characterized in that, Step S700 includes: S710: Analyze and respond to control commands to obtain production line speed parameters; S720. Collect detection results based on the production line speed parameters, and compare the detection results with historical data to obtain the feature distribution differences; S730. Determine whether the difference in the feature distribution is greater than a preset difference threshold; S740. If the difference in the feature distribution is greater than a preset difference threshold, then extract the features of the misjudged samples to obtain the optimized detection model parameters. S750. Update the model weights according to the optimized detection model parameters to obtain the updated detection model. Iterate using the updated detection model to obtain an adaptively enhanced detection framework.

9. The method for detecting defects in spunlace nonwoven fabric based on a large model according to claim 8, characterized in that, In step S720, the formula for calculating the difference in characteristic distribution is: ; in, For characteristic distribution differences, For the current feature histogram, the th The frequency of the interval, The historical standard feature histogram of the first The frequency of the interval, This represents the total number of intervals in the histogram.

10. A large-model-based defect detection system for spunlace nonwoven fabrics, used to implement the large-model-based defect detection method for spunlace nonwoven fabrics as described in any one of claims 1 to 9, characterized in that, include: Image sequence acquisition module (10) is used to acquire a continuous image sequence from the spunlace nonwoven fabric production line through an image acquisition device array, and to process the continuous image sequence using an adaptive illumination compensation method to address material surface texture interference, thereby obtaining an image sequence with enhanced contrast. The potential defect candidate region determination module (20) is used to extract multi-scale feature maps based on the image sequence with enhanced contrast using a deep learning model, and to perform local magnification analysis on the low contrast region to determine the potential defect candidate region. The refined defect contour map acquisition module (30) is used to calculate the boundary gradient distribution based on the potential defect candidate region using an edge detection algorithm, perform morphological filtering on the small defects, and obtain the refined defect contour map. The defect classification label set acquisition module (40) is used to determine whether the boundary gradient distribution exceeds a preset threshold based on the refined defect contour map. If it exceeds the threshold, it is marked as a high-risk defect area; otherwise, it is marked as a normal texture area, and a defect classification label set is obtained. The defect severity score determination module (50) is used to obtain the defect location coordinates through the classified defect label set, and to process the defect location coordinates using a parallel computing module to determine the defect severity score in order to meet the real-time detection requirements. The response control command acquisition module (60) is used to determine whether the defect severity score is higher than the warning threshold. If it is higher, the production line linkage signal is triggered. Otherwise, the subsequent image sequence is monitored to obtain the response control command. The detection framework acquisition module (70) is used to adjust the production line speed parameters according to the response control command using a feedback loop mechanism, compare historical data to identify the risk of missed detection and misjudgment, obtain optimized detection model parameters, update the weights of the deep learning model according to the optimized detection model parameters, and perform self-learning iteration to identify changes in material surface texture, thereby obtaining an adaptively enhanced detection framework.