A computer vision-based polyester fabric defect detection device and a detection method thereof

CN122989710APending Publication Date: 2026-10-27WUJIANG LIANYANG TEXTILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611399604.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

然而,现有技术仍面临多重挑战:涤纶布表面具有高度重复性和方向性的纹理结构,使得常规滤波或阈值分割方法极易将正常纹理误判为缺陷,或漏检低对比度疵点;此外,生产线环境下光照波动、布面抖动及相机噪声等因素进一步干扰图像质量,导致特征提取不稳定

Benefits of technology

[0025](1)系统运行时,构建多光谱同步成像系统,并通过时间同步控制协调相机曝光与可调谐冷光源闪烁,以获取高动态范围织物图像序列并进行预处理,采用方向梯度直方图引导的各向异性扩散滤波抑制噪声,通过自适应傅里叶变换分离周期性纹理背景,生成异常残差图,将残差图输入由浅层卷积结构与深度残差结构级联的双流特征提取网络,获取融合多尺度空间与语义信息的特征向量,计算自适应阈值,并结合支持向量机完成缺陷判定与分类;通过时空对齐与卡尔曼滤波进行跨帧一致性校验,剔除伪阳性结果,输出稳定检测结果并驱动分拣执行单元。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989710A_ABST
    Figure CN122989710A_ABST
Patent Text Reader

Abstract

The application discloses a computer vision-based polyester fabric defect detection device and a detection method thereof, and relates to the technical field of image processing and textile quality detection. In the system operation, a multispectral synchronous imaging system is constructed, and camera exposure and a tunable cold light source flicker are coordinated through time synchronization control to acquire a high dynamic range fabric image sequence and perform pretreatment. Noise is suppressed by using a direction gradient histogram guided anisotropic diffusion filter. Periodic texture background is separated through adaptive Fourier transform, and an abnormal residual graph is generated. The residual graph is input into a double-flow feature extraction network cascaded by a shallow convolution structure and a deep residual structure to acquire a feature vector fused with multi-scale space and semantic information. An adaptive threshold is calculated, and defect determination and classification are completed in combination with a support vector machine. Cross-frame consistency verification is performed through space-time alignment and Kalman filtering to eliminate false positive results, and stable detection results are output to drive a sorting execution unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing and textile quality inspection technology, specifically to a device and method for detecting defects in polyester fabric based on computer vision. Background Technology

[0002] With the continuous improvement of intelligent manufacturing and industrial automation, surface defect detection technology based on computer vision is increasingly widely used in the textile industry. Polyester fabric, as an important chemical fiber, is susceptible to various defects during production, such as warp breaks, uneven tension, and environmental interference, leading to defects like broken warp threads, skipped stitches, stains, and holes. Traditional manual visual inspection methods are not only inefficient and subjective, but also fail to meet the real-time and consistent quality control requirements of high-speed production lines. Therefore, utilizing high-precision image acquisition and intelligent analysis to achieve automatic identification of defects in polyester fabric has become a key step in improving the yield rate of textiles and the level of intelligent production.

[0003] Among them, computer vision-based fabric defect detection methods acquire images of the fabric surface through optical imaging systems and combine them with image processing algorithms to extract features of abnormal regions to achieve defect identification. The core of this type of method lies in how to accurately separate normal patterns from real defects against a complex texture background, while taking into account both detection speed and robustness. However, existing technologies still face multiple challenges: the highly repeatable and directional texture structure of polyester fabric surfaces makes it easy for conventional filtering or thresholding methods to misjudge normal textures as defects or miss low-contrast defects; in addition, factors such as lighting fluctuations, fabric surface shaking, and camera noise in the production line environment further interfere with image quality, leading to unstable feature extraction.

[0004] In existing technologies, some solutions use fixed template matching or simple statistical models for defect identification, but these are difficult to adapt to the diversity of different fabric structures and defect morphologies. While some deep learning methods improve detection accuracy, they rely on a large number of labeled samples, and the model's generalization ability is limited by the distribution of training data, resulting in poor performance when faced with novel defects or process changes. Furthermore, most systems do not coordinate image acquisition with algorithm processing, leading to data redundancy and computational delays, failing to meet the practical needs of high-speed online detection. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a computer vision-based polyester fabric defect detection device and method, which solves the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting defects in polyester fabric based on computer vision, comprising the following specific steps:

[0007] Step 1: Construct a multispectral synchronous imaging system. Linear array cameras in the visible light and near-infrared bands are arranged on the upper and lower sides of the polyester fabric conveying path, respectively. A tunable cold light source illumination module is configured. The camera exposure and light source flicker frequency are coordinated by a time synchronization controller to ensure that the image acquisition time is precisely matched with the fabric movement speed, so as to obtain a continuous and distortion-free high dynamic range fabric surface image sequence.

[0008] Step 2: Perform image preprocessing and background suppression. The original image is denoised using an anisotropic diffusion filtering algorithm guided by histogram of directional gradients. While preserving texture edges, random noise is suppressed. Then, an adaptive Fourier transform filter is used to separate periodic texture backgrounds from non-periodic abnormal regions, and a residual map is generated as a candidate region for potential defects.

[0009] Step 3: Extract multi-scale spatial features and contextual semantic information. Input the residual map into a two-stream feature extraction network composed of shallow convolutional layers and deep residual networks. The shallow network captures the geometric details of local minor defects, while the deep network models long-distance structural associations. The output is a multi-dimensional feature vector that integrates position, shape, grayscale distribution and texture abrupt change.

[0010] Step 4: Implement dynamic threshold discrimination and defect classification decision-making. Calculate the adaptive segmentation threshold within each detection window based on the online updated local statistical model. Combine the support vector machine classifier to perform binarization judgment and type identification of candidate regions, and output the detection results including defect category labels, bounding box coordinates, and confidence scores.

[0011] Step 5: Establish a closed-loop feedback calibration mechanism, align the detection results of the current frame with the spatial positions of the preceding and following frames in a spatiotemporal manner, predict the defect trajectory through Kalman filtering and verify its consistency, eliminate false positive responses caused by instantaneous jitter or noise, and finally generate a stable and reliable defect report and trigger the sorting execution unit action.

[0012] Preferably, in step 1, the multispectral synchronous imaging system is equipped with a total of 6 linear array cameras on both the upper and lower sides. Three cameras are installed on the upper side, corresponding to imaging channels with wavelengths of 520 nm, 780 nm, and 940 nm respectively. Three cameras with the same configuration are symmetrically arranged on the lower side to achieve transmission imaging mode. All cameras have a resolution of 12,800 pixels per line and a maximum line frequency of 80 kHz, ensuring sub-millimeter-level spatial sampling of polyester fabric with a running speed of up to 120 meters per minute. Preferably, the tunable cold light source illumination module uses an LED array to form a ring-shaped uniform light source. The color temperature is controlled between 5500 Kelvin and 6500 Kelvin, and the light intensity can be programmably adjusted within the range of 100 lux to 1000 lux. Polarizing filters are used to eliminate specular reflection interference from the fabric surface, improving image contrast stability.

[0013] Preferably, the time synchronization controller receives pulse signals from a rotary encoder mounted on the transmission roller. Each pulse triggers a camera exposure, corresponding to a fabric movement distance of 0.05 mm, thereby ensuring a constant image sampling interval and avoiding image stretching or compression due to speed fluctuations.

[0014] Preferably, in step 2, the number of iterations of the anisotropic diffusion filtering algorithm is set to 8, the conduction coefficient parameter is dynamically adjusted according to the local gradient magnitude, ranging from 0.15 to 0.35, and the diffusion step size is 0.25, effectively balancing the smoothing effect and the edge preservation capability.

[0015] Preferably, the adaptive Fourier transform filter automatically calculates the main frequency component based on the warp and weft density of the current fabric, sets the band stop width to the fundamental frequency ±5%, and eliminates the spectral leakage effect caused by the clipping boundary through a phase compensation algorithm, significantly enhancing the suppression capability of periodic textures.

[0016] Preferably, in step 3, the shallow convolutional part of the dual-stream feature extraction network contains four convolutional layers with kernel sizes of 7x7, 5x5, 3x3, and 3x3, respectively. The activation function is a modified linear unit, the pooling method is max pooling, and the stride is 2. The deep residual network consists of 18 basic residual blocks stacked together, each block containing two 3x3 convolutional layers. A batch normalization layer is introduced to accelerate convergence and improve generalization performance.

[0017] Preferably, the multidimensional feature vector has 512 dimensions, including 8-dimensional geometric features (area, perimeter, equivalent diameter, circularity, rectangularity, aspect ratio, convex hull area ratio, Euler number), 16-dimensional gray-level statistical features (mean, variance, skewness, kurtosis, and the average values ​​of four indicators of the gray-level co-occurrence matrix in the 0-degree, 45-degree, 90-degree, and 135-degree directions), and 488-dimensional deep learning abstract features.

[0018] Preferably, in step 4, the online updated local statistical model calculates the mean and standard deviation based on the most recent 200 consecutive normal region samples within the sliding window, refreshes the model parameters every 10 frames, and sets the adaptive segmentation threshold to the mean plus 2.5 times the standard deviation to ensure that a stable discrimination boundary can still be maintained under slow illumination drift conditions.

[0019] Preferably, the support vector machine classifier uses a radial basis function kernel, with a penalty factor C set to 100 and a kernel width γ set to 0.01. During the training phase, a labeled dataset containing 15 common polyester fabric defects is used, with no less than 5,000 samples per class, covering defects such as broken warp, skipped stitches, stains, oil stains, holes, weft gaps, uneven weft, pilling, fuzz, knots, double warp, elastic edges, creases, shiny threads, and foreign matter contamination.

[0020] Preferably, in step 5, the spatiotemporal alignment process sets the search window size to 5 frames before and after based on the fabric running direction, with a spatial tolerance of ±3 pixels. The state variables of the Kalman filter include the center coordinates of the candidate region, velocity, and confidence rate of change. The observation update is only confirmed as a real defect when a target with continuously moving position appears within 3 consecutive frames.

[0021] A computer vision-based defect detection device for polyester fabric deploys a lightweight model inference engine on an on-site industrial control computer. It uses channel pruning and quantization fusion technology to compress the original neural network model to 35% of its original volume, and controls the inference latency to within 12 milliseconds, meeting the real-time requirement of a single image processing cycle of less than 20 milliseconds.

[0022] The system sets up a remote monitoring terminal and a local human-machine interface. The test results are displayed as a heat map overlaid on the fabric unfolding diagram. Operators can access historical defect records through the touch screen. The system automatically generates shift quality reports, including total output, total number of defects, percentage of each type of defect, average defect spacing, and process capability index CPK value.

[0023] The device is integrated into a closed dust cover, maintaining a positive pressure clean environment inside. It is equipped with temperature and humidity sensors and an active cooling fan, with an operating temperature range of 5 degrees Celsius to 40 degrees Celsius and a relative humidity of less than 80%, ensuring long-term stable operation of the optical system.

[0024] This invention provides a computer vision-based device and method for detecting defects in polyester fabric, which has the following advantages:

[0025] (1) During system operation, a multispectral synchronous imaging system is constructed, and the camera exposure and tunable cold light source flashing are coordinated through time synchronization control to obtain high dynamic range fabric image sequences and perform preprocessing. Anisotropic diffusion filtering guided by directional gradient histogram is used to suppress noise. Periodic texture background is separated by adaptive Fourier transform to generate abnormal residual map. The residual map is input into a dual-stream feature extraction network consisting of shallow convolutional structure and deep residual structure to obtain feature vectors that fuse multi-scale spatial and semantic information. Adaptive threshold is calculated and combined with support vector machine to complete defect judgment and classification. Cross-frame consistency verification is performed through spatiotemporal alignment and Kalman filtering to remove false positive results, output stable detection results and drive sorting execution unit.

[0026] (2) This invention constructs a multispectral synchronous imaging system to achieve high-fidelity acquisition of the surface state of polyester fabric under various lighting conditions, effectively overcoming the problem of information loss caused by the difference in reflection and transmission in single-band imaging; adopting a method combining directional gradient-guided anisotropic diffusion and adaptive Fourier filtering, it can accurately peel off complex periodic texture background without damaging the edge of the defect, greatly reducing the false alarm rate caused by normal patterns; introducing a dual-flow depth feature extraction architecture, taking into account both local detail sensitivity and global semantic understanding ability, improves the detection probability of weak, low-contrast and irregular shaped defects; combining online updated statistical models and support vector machine classifiers to form a dynamic discrimination mechanism, enhancing the system's adaptability to different fabric types, process changes and environmental disturbances; further filtering false signals generated by transient interference through closed-loop spatiotemporal consistency verification, improving the reliability of detection results; the whole method optimizes the algorithm complexity while ensuring detection accuracy, meets the real-time processing requirements in high-speed continuous production scenarios, significantly improves the automation level and consistency of textile quality control, and reduces labor costs and the risk of defective products leaving the factory.

[0027] (3) This invention addresses the problems of difficulty in detecting defects, high false detection rate, and insufficient stability during the high-speed continuous production of polyester fabric. It constructs an online detection method and device that combines multispectral synchronous imaging and intelligent analysis. By introducing visible light and near-infrared multi-band linear array cameras on both sides of the fabric conveying path, and utilizing precise time synchronization and tunable illumination control, high dynamic range imaging that strictly matches the fabric movement is achieved. This effectively overcomes the problems of traditional single-light source, single-view imaging, which easily produces motion blur, uneven exposure, and invisible latent defects under high-speed operation conditions. Simultaneously, the synergistic application of transmission and reflection imaging modes ensures that both internal structural anomalies and surface defects can be reliably captured, providing a high-quality, information-redundant raw data foundation for subsequent analysis.

[0028] (4) At the image processing and feature analysis level, this invention effectively separates complex periodic fabric textures from non-periodic defect information by introducing a background suppression strategy that combines anisotropic diffusion filtering guided by directional gradient histograms with adaptive Fourier transform, significantly reducing the false detection probability caused by texture interference. Furthermore, by utilizing a dual-stream feature extraction structure composed of shallow convolutional and deep residual networks, it achieves simultaneous modeling of geometric details of minute defects and long-distance structural correlation features. Compared with traditional manual features or single deep networks, it has stronger generalization ability and discrimination accuracy in complex texture backgrounds. Combined with an online-updated local statistical model and a support vector machine classifier, the system can adaptively adjust the discrimination threshold according to changes in fabric type and working conditions, completing the stable identification task of multi-category defects. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the overall technical solution architecture of a computer vision-based defect detection method for polyester fabric proposed in this invention.

[0030] Figure 2 This is a schematic diagram of the core principle framework of the collaborative processing of multispectral synchronous imaging and adaptive background suppression in this invention;

[0031] Figure 3 This is a flowchart illustrating the logical flow of the fusion of dual-stream feature extraction and dynamic threshold discrimination in this invention.

[0032] Figure 4 This is a schematic diagram of the multi-level interaction relationship and data flow of the spatiotemporal consistency verification and closed-loop feedback calibration mechanism for detection results in this invention. Detailed Implementation

[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0034] Example 1

[0035] This invention provides a computer vision-based method for detecting defects in polyester fabric. Please refer to [link / reference]. Figure 1 Currently, in the production process of polyester fabric, various defects such as warp breaks, skipped stitches, stains, and holes are easily generated due to factors such as mechanical wear, uneven tension, or environmental interference. Traditional manual visual inspection is inefficient and highly subjective, while existing automatic detection technologies have high false detection rates against complex texture backgrounds, serious omissions of low-contrast defects, are greatly affected by light fluctuations and fabric surface shaking, have poor model generalization ability, are difficult to adapt to various fabric structures and new defect morphologies, and cannot meet the real-time requirements of high-speed production lines. To address the above technical problems, this invention proposes to achieve high-fidelity image acquisition by constructing a multispectral synchronous imaging system, accurately stripping periodic texture backgrounds using a combination of directional gradient-guided anisotropic diffusion and adaptive Fourier filtering, introducing a dual-stream depth feature extraction architecture that balances local detail sensitivity and global semantic understanding capabilities, forming a dynamic discrimination mechanism by combining an online-updated statistical model and a support vector machine classifier, and filtering false signals generated by transient interference through closed-loop spatiotemporal consistency verification, thereby improving detection accuracy, robustness, and real-time performance. This invention is applied to a computer vision-based polyester fabric defect detection device and method.

[0036] refer to Figure 1The overall technical architecture of the computer vision-based polyester fabric defect detection device and method described in this invention includes a multispectral synchronous imaging subsystem, an image preprocessing and background suppression module, a dual-stream feature extraction network, a dynamic threshold discrimination and defect classification decision unit, and a closed-loop feedback calibration mechanism. The entire system is deployed within a sealed dustproof enclosure, maintaining a positive pressure clean environment. It is equipped with temperature and humidity sensors and an active cooling fan, with an operating temperature range of 5°C to 40°C and a relative humidity below 80%, ensuring long-term stable operation of the optical system.

[0037] In the above method, step (1) involves constructing a multispectral synchronous imaging system. Linear array cameras in the visible and near-infrared bands are arranged on the upper and lower sides of the polyester fabric conveying path, respectively, and a tunable cold light source illumination module is configured. The camera exposure and light source flicker frequency are coordinated by a time synchronization controller to ensure that the image acquisition time is precisely matched with the fabric movement speed, thereby obtaining a continuous and distortion-free high dynamic range fabric surface image sequence. Specifically, the multispectral synchronous imaging system is configured with a total of 6 linear array cameras on both the upper and lower sides. Three cameras are installed on the upper side, corresponding to imaging channels with wavelengths of 520 nm, 780 nm, and 940 nm, respectively. Three cameras with the same configuration are symmetrically arranged on the lower side to achieve transmission imaging mode. All cameras have a resolution of 12,800 pixels per line and a maximum line frequency of 80 kHz, ensuring sub-millimeter-level spatial sampling of polyester fabric with a running speed of up to 120 meters per minute. The tunable cold light source illumination module uses an LED array to form a ring-shaped uniform light source. The color temperature is controlled between 5500 Kelvin and 6500 Kelvin, and the light intensity can be programmably adjusted within the range of 100 lux to 1000 lux. A polarizer is used to eliminate specular reflection interference from the fabric surface, improving image contrast stability. The time synchronization controller receives pulse signals from a rotary encoder mounted on the drive roller. Each pulse triggers a camera exposure, corresponding to a fabric movement distance of 0.05 mm, thus ensuring a constant image sampling interval and preventing image stretching or compression due to speed fluctuations. This synchronization mechanism ensures that each line of image data strictly corresponds to a fixed physical displacement on the fabric, providing a precise spatial reference for subsequent image stitching and defect location. Image data is transmitted to the on-site industrial control computer's memory buffer at a rate of 850 megabits per second via the Camera Link interface. A double-buffered ping-pong mechanism enables parallel acquisition and processing pipelines, effectively eliminating data bottlenecks.

[0038] Example 2

[0039] This embodiment is an explanation based on Embodiment 1. Please refer to it. Figure 2Specifically, in the above method, step (2) involves image preprocessing and background suppression. An anisotropic diffusion filtering algorithm guided by the directional gradient histogram is used to denoise the original image, suppressing random noise while preserving texture edges. Subsequently, an adaptive Fourier transform filter is used to separate periodic texture backgrounds from non-periodic abnormal regions, generating a residual map as a candidate region for potential defects. Specifically, the anisotropic diffusion filtering algorithm has 8 iterations, and the conduction coefficient parameter is dynamically adjusted according to the local gradient magnitude, ranging from 0.15 to 0.35. The diffusion step size is 0.25, effectively balancing the smoothing effect and edge preservation capability. In each iteration, the algorithm calculates the gradient magnitude and direction of each pixel, constructs a local diffusion tensor based on the gradient direction, so that the diffusion process proceeds along the texture direction while being suppressed perpendicular to the edge direction. Thus, while removing Gaussian white noise and salt-and-pepper noise, it completely preserves key structural information such as defect boundaries and warp and weft intersections of the fabric. The denoised image is input to an adaptive Fourier transform filter. This filter first performs a two-dimensional discrete Fourier transform on the image to obtain its frequency domain representation. Then, it automatically calculates the dominant frequency component based on the latitude and longitude density of the current fabric, sets the bandstop width to ±5% of the fundamental frequency, and eliminates the spectral leakage effect caused by cropping boundaries through a phase compensation algorithm, significantly enhancing the suppression of periodic textures. Phase compensation is achieved by applying a Hanning window function to the image edges in the spatial domain, effectively suppressing the Gibbs phenomenon. The filtered frequency domain image is then restored to a spatial domain residual image through an inverse Fourier transform, where the energy of periodic textures is significantly attenuated, while aperiodic defect areas are highlighted due to the diffuse distribution of spectral energy. (Reference) Figure 2 This collaborative processing framework tightly integrates the multispectral information of the imaging system with the adaptive background suppression algorithm. By weighted fusion of images from different bands, it further improves the signal-to-noise ratio of the residual map. For example, in the 940 nm near-infrared band, the difference in absorption characteristics between oil stains and water stains makes them present higher contrast in the transmission image, thus forming a clearer response in the residual map.

[0040] Example 3

[0041] This embodiment is an explanation based on Embodiment 1. Please refer to it. Figures 1 to 4Specifically: In the above method, step (3) extracts multi-scale spatial features and contextual semantic information, and inputs the residual map into a two-stream feature extraction network composed of shallow convolutional layers and deep residual networks. The shallow network captures the geometric details of local minor defects, and the deep network models long-distance structural associations, outputting a multi-dimensional feature vector that integrates position, shape, grayscale distribution, and texture mutation degree. Specifically, the shallow convolutional part of the two-stream feature extraction network contains 4 convolutional layers with kernel sizes of 7x7, 5x5, 3x3, and 3x3, respectively. The activation function is modified linear unit, the pooling method is max pooling, and the stride is 2. The deep residual network is composed of 18 basic residual blocks stacked together, each block containing two 3x3 convolutional layers. A batch normalization layer is introduced to accelerate convergence and improve generalization performance. The first layer of the shallow network uses a 7x7 convolutional kernel to capture large-scale brightness abrupt changes and coarse contours, while subsequent layers gradually refine the features to pixel-level edge and corner features. The deep residual network alleviates the gradient vanishing problem through skip connections and can learn advanced semantic patterns such as "broken meridians" (continuous missing lines along the meridian) and "latitude gaps" (horizontal strip-like density anomalies). The feature map output by the network is mapped through global average pooling and fully connected layers to finally generate a 512-dimensional multi-dimensional feature vector. The multi-dimensional feature vector has 512 dimensions, including 8-dimensional geometric features (area, perimeter, equivalent diameter, circularity, rectangularity, aspect ratio, convex hull area ratio, Euler number), 16-dimensional gray-level statistical features (mean, variance, skewness, kurtosis, and the average values ​​of four indicators of the gray-level co-occurrence matrix in the 0°, 45°, 90°, and 135° directions), and 488-dimensional deep learning abstract features. Geometric features are directly calculated from the binarized residual map through connected component analysis; grayscale statistical features are extracted from candidate regions in the original residual map; and deep learning abstract features are encoded by activation values ​​of high-level layers of the network, representing the unique patterns of defects against complex texture backgrounds. The design goal of this dual-stream architecture is to address the problem of weak defects being ignored due to insufficient local contrast, while preventing the deep network from losing detailed information about small defects due to over-smoothing.

[0042] In the above method, step (4) implements dynamic threshold discrimination and defect classification decision-making. Based on the online-updated local statistical model, the adaptive segmentation threshold within each detection window is calculated. Combined with the support vector machine classifier, the candidate regions are binarized and type-identified, and the detection result containing defect category labels, bounding box coordinates, and confidence scores is output. Specifically, the online-updated local statistical model calculates the mean and standard deviation based on the most recent 200 consecutive normal region samples within the sliding window. The model parameters are refreshed every 10 frames, and the adaptive segmentation threshold is set to the mean plus 2.5 times the standard deviation to ensure that a stable discrimination boundary can be maintained under slow illumination drift conditions. This statistical model is maintained independently in each imaging channel to cope with the inherent differences in background brightness under different bands. The candidate regions are initially determined by the connected components in the residual map that exceed the adaptive threshold, and their bounding rectangles are used as detection windows and fed into the support vector machine classifier. The support vector machine classifier employs a radial basis function kernel with a penalty factor C of 100 and a kernel width γ of 0.01. During training, a labeled dataset containing 15 common polyester fabric defects is used, with at least 5000 samples per class, covering warp breaks, skipped stitches, stains, oil stains, holes, weft gaps, uneven weft lines, pilling, fuzz, knots, double warp, elastic edges, creases, shiny threads, and foreign matter contamination. The classifier outputs a 15-dimensional probability vector, and the class corresponding to the maximum value is taken as the final label, with its value used as the confidence score. If the maximum confidence score is lower than a preset threshold of 0.7, it is marked as an "unknown defect" and submitted for manual review. This decision mechanism effectively distinguishes between genuine defects and residual texture noise, exhibiting high sensitivity, especially for low-contrast "uneven weft lines" or tiny "fuzz."

[0043] Example 4

[0044] This embodiment is an explanation based on Embodiment 1. Please refer to it. Figure 4Specifically, in the above method, step (5) establishes a closed-loop feedback calibration mechanism, aligns the detection result of the current frame with the spatial position of the adjacent frames, predicts the defect trajectory through Kalman filtering and verifies its consistency, eliminates false positive responses caused by instantaneous jitter or noise, and finally generates a stable and reliable defect report and triggers the sorting execution unit action. Specifically, the spatiotemporal alignment process sets the search window size to 5 frames before and after based on the fabric running direction, with a spatial tolerance of ±3 pixels. The state variables of the Kalman filter include the center coordinates of the candidate region, velocity, and confidence rate of change. The observation update is only confirmed as a real defect when a target with continuously moving position appears within 3 consecutive frames. The Kalman filter predicts the expected position of the defect in the next frame based on the fabric speed. If the actual detection result falls within the predicted covariance ellipse, the state estimate is updated; otherwise, it is regarded as a new target or noise. This mechanism can effectively filter out isolated false positive points caused by instantaneous jitter of the fabric surface, flying lint, or lens stains. Only defects confirmed by three consecutive frames of tracking are written into the defect database and a trigger signal is sent to the downstream pneumatic sorting unit via industrial Ethernet. This signal contains defect type, location, and length information for precise cutting or marking. (Reference) Figure 4 This closed-loop calibration mechanism forms a complete feedback loop from detection to verification to execution, significantly improving the system's reliability in dynamic production environments.

[0045] Furthermore, this includes: deploying a lightweight model inference engine on an industrial control computer, employing channel pruning and quantization fusion techniques to compress the original neural network model to 35% of its original size, controlling inference latency to within 12 milliseconds, and meeting the real-time requirement of a single image processing cycle of less than 20 milliseconds. Channel pruning removes redundant channels by evaluating the contribution of each convolutional channel to the final classification accuracy; quantization fusion converts 32-bit floating-point weights and activation values ​​into 8-bit integers and merges convolution, batch normalization, and activation functions into a single computational unit, significantly reducing memory bandwidth requirements and computational complexity. The inference engine is optimized based on TensorRT, fully utilizing the parallel computing capabilities of GPUs.

[0046] In addition, it includes: setting up a remote monitoring terminal and a local human-machine interface; displaying inspection results as a heat map overlaid on the fabric unfolding diagram; allowing operators to access historical defect records via a touchscreen; and automatically generating shift quality reports including total output, total number of defects, percentage of each type of defect, average defect spacing, and process capability index (CPK) value. The local human-machine interface runs on an embedded touchscreen industrial computer, supporting real-time viewing of the current fabric roll's inspection status, alarm information, and image snapshots; the remote monitoring terminal connects to the factory's MES system via the OPC UA protocol, enabling centralized management and traceability of quality data.

[0047] To further illustrate the technical effects of this invention, a specific application example is constructed: the device of this invention is deployed on a polyester fabric production line operating at a speed of 100 meters per minute. A multispectral synchronous imaging system acquires images at a sampling rate of 0.05 millimeters per line, with a line frequency of 33.3 kHz. After preprocessing, the periodic texture of the plain weave is successfully suppressed in the residual image, highlighting an oil stain defect with a diameter of approximately 0.8 millimeters. In the 512-dimensional feature vector output by the dual-stream feature extraction network, geometric features show a circularity of 0.92, grayscale statistical features show a mean significantly lower than the surrounding area, and depth features activate neurons strongly correlated with the "oil stain" category. The support vector machine classifier identifies it as an "oil stain" with a confidence score of 0.96. This defect is continuously tracked by a Kalman filter in the subsequent four frames, with a smooth trajectory, ultimately confirming it as a genuine defect. The system completes all processing within 20 milliseconds and triggers the sorting unit to affix labels at the corresponding positions on the fabric roll. The entire process ran continuously for 8 hours without any missed detections or false alarms, achieving a detection accuracy of 99.2%, which meets the quality control standards for high-end textiles.

[0048] Example 5

[0049] A computer vision-based defect detection device for polyester fabric, please refer to... Figure 2 Specifically, in this embodiment, the multispectral synchronous imaging system retains only the three upper linear array cameras and eliminates the lower transmission imaging module, making it suitable for detecting surface defects in opaque or thick polyester fabrics. In the image preprocessing stage, the main frequency calculation of the adaptive Fourier transform filter uses fixed template matching instead of automatic warp and weft density analysis, and the template library pre-stores the spectral features of five common fabric structures. The deep residual network of the dual-stream feature extraction network is reduced from 18 blocks to 9 blocks, and the feature vector dimension is reduced to 256 dimensions, of which deep learning abstract features account for 232 dimensions. The training set of the support vector machine classifier is reduced to eight main defect categories, with no fewer than 3000 samples per category. The search window of the closed-loop feedback calibration mechanism is reduced to three frames before and after, and the spatial tolerance is widened to ±5 pixels. Although performance is slightly reduced, this simplified solution reduces hardware costs by 40% and inference latency to 8 milliseconds, making it suitable for production lines with extremely high detection speed requirements and relatively fixed defect types. In actual testing, the detection rate of major defects such as "broken warp", "holes" and "stains" remained above 97%, effectively balancing economy and practicality.

[0050] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for detecting defects in polyester fabric based on computer vision, characterized in that: The specific steps include the following: S1. Construct a multispectral synchronous imaging unit, set visible light and near-infrared linear array cameras on the upper and lower sides of the fabric conveying path, and achieve precise matching between camera exposure and tunable cold light source flicker through time synchronization control to obtain a continuous and distortion-free high dynamic range fabric image sequence. S2. The image sequence is preprocessed by using anisotropic diffusion filtering guided by histogram of directional gradients to suppress random noise, and periodic texture background is separated by adaptive Fourier transform to generate a residual map representing abnormal information. S3. Input the residual map into the dual-stream feature extraction network, which is composed of a shallow convolutional structure and a deep residual structure cascaded together to extract local subtle defect features and long-distance structural correlation features respectively, forming a feature vector that integrates multi-scale spatial and semantic information. S4. Calculate the adaptive segmentation threshold based on the online updated local statistical model, and combine it with the support vector machine to complete the defect determination and type classification of the candidate region, and output the detection results including defect category, spatial location and confidence level; S5. A closed-loop calibration mechanism is established through spatiotemporal alignment and Kalman filtering to verify the consistency of cross-frame defect results, eliminate false positive responses, generate stable defect judgment results, and drive subsequent sorting execution units.

2. The method for detecting defects in polyester fabric based on computer vision according to claim 1, characterized in that: The multispectral synchronous imaging system is equipped with a total of 6 linear array cameras on both the upper and lower sides. Three cameras are installed on the upper side, corresponding to imaging channels with wavelengths of 520 nm, 780 nm and 940 nm respectively. Three cameras with the same configuration are symmetrically arranged on the lower side to achieve transmission imaging mode. All cameras have a resolution of 12,800 pixels per line and a maximum line frequency of 80 kHz.

3. The method for detecting defects in polyester fabric based on computer vision according to claim 1, characterized in that: The tunable cold light source lighting module uses an LED array to form a ring-shaped uniform light source with a color temperature controlled between 5500 Kelvin and 6500 Kelvin. The light intensity can be programmed and adjusted within the range of 100 lux to 1000 lux, and the interference of specular reflection on the fabric surface is eliminated by a polarizer. The time synchronization controller receives pulse signals from the rotary encoder on the transmission roller. Each pulse triggers a camera exposure, corresponding to a fabric movement distance of 0.05 mm.

4. The method for detecting defects in polyester fabric based on computer vision according to claim 1, characterized in that: The anisotropic diffusion filtering algorithm iterates 8 times, and the conduction coefficient parameter is dynamically adjusted according to the local gradient magnitude, ranging from 0.15 to 0.35, with a diffusion step size of 0.

25. The adaptive Fourier transform filter automatically calculates the main frequency component based on the latitude and longitude density of the current planting, sets the band stop width to the fundamental frequency ±5%, and eliminates the spectral leakage effect through a phase compensation algorithm.

5. The method for detecting defects in polyester fabric based on computer vision according to claim 1, characterized in that: The shallow convolutional part of the dual-stream feature extraction network contains four convolutional layers with kernel sizes of 7x7, 5x5, 3x3, and 3x3, respectively. The activation function is a modified linear unit, the pooling method is max pooling, and the stride is 2. The deep residual network consists of 18 basic residual blocks stacked together, each block containing two 3x3 convolutional layers, and a batch normalization layer is introduced.

6. The method for detecting defects in polyester fabric based on computer vision according to claim 1, characterized in that: The multidimensional feature vector has 512 dimensions, including 8-dimensional geometric features, 16-dimensional gray-scale statistical features, and 488-dimensional deep learning abstract features. The 8-dimensional geometric features include area, perimeter, equivalent diameter, circularity, rectangularity, aspect ratio, convex hull area ratio, and Euler number; the 16-dimensional gray-scale statistical features include the mean, variance, skewness, kurtosis, and the average values ​​of four indicators of the gray-scale co-occurrence matrix in the 0-degree, 45-degree, 90-degree, and 135-degree directions.

7. The method for detecting defects in polyester fabric based on computer vision according to claim 1, characterized in that: The online updated local statistical model calculates the mean and standard deviation based on the most recent 200 consecutive normal region samples within the sliding window, refreshes the model parameters every 10 frames, and sets the adaptive segmentation threshold to the mean plus 2.5 times the standard deviation.

8. The method for detecting defects in polyester fabric based on computer vision according to claim 1, characterized in that: The support vector machine classifier uses a radial basis function kernel, with a penalty factor C set to 100 and a kernel width γ set to 0.

01. During the training phase, a labeled dataset containing 15 common polyester fabric defects is used, with no less than 5,000 samples per class. The 15 types of defects include broken warp, skipped stitches, stains, oil stains, holes, weft gaps, uneven weft density, pilling, fuzz, knots, double warp, elastic edges, creases, shiny threads, and foreign matter contamination.

9. The method for detecting defects in polyester fabric based on computer vision according to claim 1, characterized in that: The spatiotemporal alignment process sets the search window size to 5 frames before and after based on the fabric running direction, with a spatial tolerance of ±3 pixels; the state variables of the Kalman filter include the candidate region center coordinates, velocity, and confidence change rate, and the observation update is only confirmed as a real defect when a target with continuously moving position appears within 3 consecutive frames.

10. A computer vision-based defect detection device for polyester fabric, characterized in that: A lightweight model inference engine is deployed on an industrial control computer in the field. Channel pruning and quantization fusion technology are used to compress the original neural network model to 35% of its original size, and the inference latency is controlled within 12 milliseconds. Simultaneously, a remote monitoring terminal and a local human-machine interface are set up. The test results are displayed on the fabric unfolding diagram in the form of a heat map. The system automatically generates shift quality reports, including total output, total number of defects, percentage of various defects, average defect spacing, and process capability index CPK value.