An artificial intelligence slub yarn fabric visual inspection method and system

By combining multi-scale texture feature extraction and dynamic defect discrimination model, along with a high-resolution scanning camera and programmable light source, the problem of false detection and missed detection in slub yarn fabric inspection is solved, achieving high-precision and high-speed inspection and meeting the quality control requirements of modern textile production lines.

CN121545139BActive Publication Date: 2026-05-08TEXHONG DAFENG(YANCHENG)TEXTILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TEXHONG DAFENG(YANCHENG)TEXTILE CO LTD
Filing Date
2025-10-24
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Traditional fabric inspection methods are prone to misjudging or missing defects in slub yarn fabrics, and are difficult to adapt to the high-speed inspection requirements in complex backgrounds, resulting in high false detection and false detection rates, poor environmental adaptability, and difficulty in meeting the high precision and high speed requirements of modern textile production lines.

Method used

By employing a collaborative working mechanism of multi-scale texture feature extraction architecture and dynamic defect discrimination model, combined with a high-resolution linear scan camera, programmable light source array, and adaptive imaging parameter adjustment, high-precision detection of slub yarn fabrics can be achieved.

Benefits of technology

It significantly improves the accuracy and speed of slub yarn fabric detection, reduces the false detection and missed detection rates, and meets the online quality control requirements of modern high-speed weaving production lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121545139B_ABST
    Figure CN121545139B_ABST
Patent Text Reader

Abstract

The application relates to the field of artificial intelligence, and discloses a kind of artificial intelligence's slub yarn fabric visual inspection method and system, to solve the problems of low recognition rate of micro-defects, high false detection and missed detection rate, poor environmental adaptability and model updating lag in prior art under complex texture background.The method comprises: collecting fabric images through high-resolution line array camera and multispectral programmable light source; constructing a five-layer multiscale texture feature pyramid network, fusing local gradient and global semantic features; deploying a cloud dynamic defect discrimination model, combining defect prior knowledge to guide pixel-level segmentation and classification; establishing an adaptive parameter optimization engine and incremental learning mechanism, the application realizes high-precision automatic detection of slub morphology anomaly and yarn breakage defect through the above-mentioned technical cooperation, the detection rate reaches 99.7%, the false detection rate is less than 0.5%, the detection speed reaches 120 meters / minute, and the online quality control demand of high-speed production line is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence, specifically relating to an artificial intelligence-based visual inspection method and system for slub yarn fabrics. Background Technology

[0002] With the deep penetration of artificial intelligence technology into the intelligent transformation of the textile industry, automated visual inspection of fabric surface defects has become a core link in improving production yield and quality control efficiency. Traditional fabric inspection relies on manual visual inspection or image processing algorithms based on fixed thresholds, and its core principle is based on standard texture models and static feature extraction rules. However, due to its unique irregular segmented structure and randomly distributed coarse and fine details, slub yarn fabrics exhibit highly non-uniform texture features and local morphological distortions under dynamic conditions such as changes in lighting, loom vibration, and yarn tension fluctuations. Fixed threshold methods lack the ability to adaptively model yarn segment morphology, making it easy to misjudge real segmented structures as defects or miss hidden yarn breaks and fuzzy defects caused by blurred intersegment transition areas, resulting in high false alarm and false negative rates. In addition, modern textile production lines place higher demands on detection speed, defect classification accuracy, and flexible adaptability to multiple varieties. The rigid algorithm architecture of traditional vision solutions is difficult to achieve millisecond-level high recall detection under complex background interference, which seriously restricts the large-scale intelligent manufacturing process of high-end slub yarn products.

[0003] Therefore, an artificial intelligence-driven visual inspection method and system for slub yarn fabrics is desired. Summary of the Invention

[0004] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide an artificial intelligence-based visual inspection method and system for slub yarn fabrics. By constructing a multi-scale texture feature extraction architecture and a dynamic defect discrimination model through a collaborative working mechanism, it achieves high-precision identification and localization of minute defects against a complex texture background on the surface of slub yarn fabrics. The system deploys a high-resolution linear scanning camera and a programmable light source array at the physical level, integrates local texture gradient response and global fabric structure semantic modeling at the algorithm level, and establishes an adaptive imaging parameter adjustment mechanism based on real-time feedback at the control level. Thus, without relying on manual intervention, it completes fully automated and highly robust visual inspection of typical defects in slub yarn fabrics, such as abnormal slub morphology, yarn breakage, staining, and uneven density, significantly improving detection efficiency and accuracy, reducing false positives and false negatives, and meeting the stringent requirements of online quality control in high-speed weaving production lines.

[0005] According to one aspect of this application, an artificial intelligence-based visual inspection method for slub yarn fabrics and the control method mentioned in the system are provided, comprising:

[0006] By deploying a linear array scanning imaging device directly above the fabric conveying path, the surface of the continuously moving slub yarn fabric is optically scanned line by line at a sampling frequency of no less than two thousand lines per second to obtain the original grayscale image sequence. The optical resolution of the linear array scanning imaging device is no less than twelve pixels per millimeter, ensuring that it still has sufficient pixel characterization capability when the smallest detectable defect size in the slub yarn is no greater than 0.3 millimeters.

[0007] By using programmable multispectral illumination units configured on both sides of the imaging area, the luminous intensity and incident angle of each illumination channel are dynamically adjusted according to the current movement speed of the fabric and its surface reflection characteristics. The programmable multispectral illumination unit includes a main illumination channel, a side-sweep illumination channel, and a backlight compensation channel. The main illumination channel uses a diffuse white light source to provide uniform basic illumination; the side-sweep illumination channel uses a low-angle oblique light source to enhance the shadow contrast of the micro-uneven structure on the fabric surface; and the backlight compensation channel uses a transmissive light source to suppress the interference of the fabric's underlying structure on the identification of surface defects. The driving current of the three light sources is adjusted in a closed loop by the central controller based on the real-time image contrast feedback value to ensure that the imaging dynamic range is always maintained in the optimal range.

[0008] By constructing a multi-scale texture feature pyramid network in the embedded image processing unit, the original grayscale image sequence is downsampled and feature extracted step by step. The multi-scale texture feature pyramid network contains a five-layer convolutional structure. The first layer uses a 3x3 convolutional kernel to extract local edges and gradient responses. The second layer uses a 5x5 convolutional kernel to capture medium-scale texture periodicity. The third layer uses a 7x7 convolutional kernel to model the macroscopic morphological contour of the bamboo joint region. The fourth and fifth layers use dilated convolution and deformable convolutional structures, respectively, to adapt to non-rigid deformation and local scale changes in bamboo joint yarn fabrics. The feature maps output by each layer are non-linearly transformed by batch normalization and modified linear unit activation functions. The shallow high-resolution features and deep semantic features are spliced ​​together by channel dimension through skip connections to form a multi-scale fusion feature expression with spatial position preservation capability.

[0009] The dynamic defect discrimination model, deployed on a cloud-based inference server, receives fused feature maps from the output of a multi-scale texture feature pyramid network and performs dual tasks of pixel-level defect segmentation and region-level defect classification. The dynamic defect discrimination model adopts an encoder-decoder architecture. The encoder part reuses the deep output of the multi-scale texture feature pyramid network, while the decoder part uses transposed convolution and spatial attention mechanisms to gradually restore the original image resolution. A defect type prior knowledge guidance module is introduced into the decoding path. This module dynamically adjusts the feature weights of each layer of the decoder based on the spatial distribution statistical characteristics of various defects in the historical defect sample library, thereby enhancing the response sensitivity to abnormal bamboo joint morphology areas and yarn breakage trajectories. Finally, the model outputs a structured detection result containing defect location coordinates, defect type labels, and confidence scores.

[0010] By establishing an adaptive parameter optimization engine in the central control unit, based on the confidence score distribution and false detection sample characteristics output by the dynamic defect discrimination model, the engine reversely adjusts the exposure time of the linear array imaging device, the light intensity ratio of the programmable multispectral illumination unit, and the expansion rate parameter of the hole convolution in the multi-scale texture feature pyramid network. The adaptive parameter optimization engine adopts an online learning strategy based on gradient descent, triggering parameter fine-tuning once after processing one kilometer of fabric length, to ensure that the system maintains stable detection performance under fabric batch switching, ambient light fluctuations, or slight equipment drift.

[0011] By constructing an incremental learning mechanism for defect samples, after each manual review and confirmation of false or missed samples, the corresponding original image blocks and annotation information are automatically added to the training sample library, triggering a local weight update of the dynamic defect discrimination model. The local weight update only performs gradient backpropagation on the neuron connections with features that are more similar to the newly added samples than a preset threshold, avoiding model performance oscillations caused by global retraining. At the same time, knowledge distillation technology is used to compress the updated model parameters and deploy them to edge computing nodes, ensuring that the inference latency at the production line is always less than 50 milliseconds.

[0012] By designing a fabric motion state synchronization compensation module, the encoder pulse signal of the fabric conveyor belt is acquired in real time, and the current travel speed and acceleration are calculated accordingly. The speed information is injected into the trigger control circuit of the linear scan imaging device as a timestamp synchronization signal to ensure that the acquisition time of each row of images strictly corresponds to the physical position of the fabric. At the same time, the acceleration information is input into the image preprocessing unit as a motion blur correction factor. The acquired image is sharpened in real time using a deconvolution algorithm based on motion vector estimation to eliminate the image ghosting phenomenon caused by the start and stop of the conveyor belt or speed fluctuations.

[0013] By deploying a multi-camera collaborative calibration and parallax correction subsystem, three linear array scanning imaging devices are arranged in parallel along the fabric width direction. The overlapping area of ​​the fields of view of adjacent cameras is no less than 15%. The calibration board is used to pre-acquire the internal and external parameters and distortion coefficients of each camera while the production line is stopped. During the online inspection process, the parallax field is calculated in real time based on the feature point matching results of the overlapping area, and a bilinear interpolation algorithm is used to perform pixel-level alignment of the images of adjacent cameras. Finally, a seamless inspection image covering the entire width is generated by stitching together, eliminating image seams and geometric distortions caused by camera installation errors or thermal expansion.

[0014] According to another aspect of this application, a control system mentioned in the artificial intelligence-based visual inspection method and system for slub yarn fabrics is provided, comprising:

[0015] Linear scanning imaging device is used to sample the surface of continuously moving fabric line by line with an array of photosensitive elements arranged at fixed physical intervals along the direction of fabric movement. Combined with a high-speed electronic shutter and global exposure control circuit, it achieves distortion-free line-by-line sampling of the fabric surface. Its optical lens adopts a telecentric design, and the depth of field covers the range of fabric thickness fluctuations, ensuring that the focus remains clear even under slight fabric undulations. The image sensor adopts a global shutter type CMOS device with a pixel size of 3.5 micrometers by 3.5 micrometers, a full-well capacity of not less than 20,000 electrons, a readout noise of less than two electrons, and a dynamic range of more than 70 dB, meeting the requirements for high-contrast defect imaging.

[0016] The programmable multispectral illumination unit provides an illumination field with independently adjustable spectral composition and spatial distribution. Its main illumination channel uses a high color rendering index LED array with an adjustable color temperature range of 3,000 Kelvin to 6,000 Kelvin and a light intensity adjustment accuracy of 1%. The side-sweep illumination channel uses a focusing LED combined with a cylindrical lens group to form a continuously adjustable grazing beam with an angle of 15 to 45 degrees with the fabric surface, and the light spot uniformity is better than 95%. The backlight compensation channel uses a large-area surface light source combined with a diffuser plate, and the brightness uniformity is better than 98%. All three light sources are equipped with independent constant current drive modules and temperature feedback closed-loop control circuits to ensure that the light output stability is better than 0.5% during long-term operation.

[0017] The embedded image processing unit performs image preprocessing, feature extraction, and preliminary defect screening tasks. Its hardware platform adopts a multi-core ARM processor and field-programmable gate array (FPGA) collaborative architecture. The ARM processor is responsible for running the operating system and communication protocol stack, while the FPGA implements hardware acceleration for computationally intensive operations such as convolution, image scaling, and histogram statistics. The memory is configured as 8GB DDR4 synchronous dynamic random access memory with a storage bandwidth of no less than 64GB per second. Two external TB solid-state drives are used to cache raw image data and intermediate feature maps. The network interface supports Gigabit Ethernet and industrial real-time Ethernet protocols to ensure low-latency data interaction with the cloud server.

[0018] The cloud-based inference server is used to support the complete inference process and parameter update mechanism of the dynamic defect discrimination model. Its computing core adopts a graphics processor cluster architecture, with each graphics processor equipped with 24GB of video memory, supporting mixed-precision matrix operations, and realizing multi-card parallel computing through a high-speed interconnect bus. The storage system adopts a distributed file system architecture with a total capacity of no less than 100TB, supporting more than 100,000 metadata operations per second, and a network access bandwidth of no less than 10GB per second. It is equipped with a dedicated model service framework, supporting model version management, A / B testing and canary release functions to ensure high availability and scalability of the detection service.

[0019] The central control unit coordinates the working timing and parameter configuration of each subsystem. Its core is an industrial-grade programmable logic controller, equipped with redundant power supply modules and watchdog circuits. The input / output interfaces include sixteen analog inputs, thirty-two digital inputs, and thirty-two digital outputs. It establishes real-time communication links with each subsystem via industrial Ethernet, has a built-in real-time operating system kernel, a task scheduling cycle of one millisecond, supports multi-threaded concurrent execution, and is equipped with non-volatile memory to save system configuration parameters and operation logs. It also supports remote firmware upgrades and fault diagnosis functions.

[0020] The defect sample incremental learning module is used to achieve online continuous optimization of the detection model. Its software architecture includes a sample acquisition agent, a feature similarity calculation engine, a local gradient calculation unit, and a model parameter compressor. The sample acquisition agent listens to the annotation results of the manual review terminal, automatically extracts the corresponding image region and extracts multi-scale feature vectors. The feature similarity calculation engine uses cosine distance to measure the similarity between the new sample and each prototype vector in the historical sample library. The local gradient calculation unit constructs a weighted loss function based on similarity weights and performs backpropagation only on the neuron connections with a similarity greater than 0.7. The model parameter compressor uses channel pruning and weight quantization techniques to compress the updated model to less than 30% of the original size to ensure the feasibility of deployment at the edge.

[0021] The fabric motion state synchronization compensation module is used to eliminate motion blur and position drift errors. Its hardware includes a high-precision rotary encoder, a signal conditioning circuit, and a time synchronization controller. The rotary encoder has a resolution of no less than 5,000 pulses per revolution and is installed at the end of the fabric conveyor roller. The signal conditioning circuit converts the encoder differential signal into TTL level and filters out high-frequency noise. The time synchronization controller calculates the instantaneous velocity and acceleration based on the pulse interval, generates a trigger pulse sequence synchronized with the image acquisition clock, and injects the motion parameters into the image preprocessing pipeline through the DMA channel to trigger the real-time update of the deconvolution filter coefficients.

[0022] The multi-camera collaborative calibration and parallax correction subsystem is used to generate full-width seamless inspection images. It includes an offline calibration workstation and an online correction engine. The offline calibration workstation is equipped with a high-precision two-dimensional translation stage and a standard checkerboard calibration board. During the production line debugging phase, it automatically acquires multi-view calibration images and uses the Zhang Zhengyou calibration method to calculate the intrinsic parameter matrix and distortion coefficient of each camera. At the same time, it solves the extrinsic parameter rotation and translation matrix through feature point matching. The online correction engine acquires images of overlapping areas before each fabric inspection, extracts scale-invariant feature points and calculates matching pairs, uses a random sampling consensus algorithm to eliminate mismatched points, fits a parallax field model, and finally achieves pixel-level image alignment and seamless stitching through bilinear interpolation.

[0023] Compared with the prior art, the advantages and positive effects of this application are as follows:

[0024] The visual inspection system for slub yarn fabric constructed in this application fundamentally solves the core problems of existing visual inspection technologies, such as low recognition rate of small defects, high false detection and false negative rate, poor environmental adaptability, and lagging model update, through the coordinated control of high-resolution imaging and multispectral illumination at the physical layer, deep fusion of multi-scale texture feature pyramid and dynamic defect discrimination model at the algorithm layer, and closed-loop feedback of adaptive parameter optimization and incremental learning mechanism at the control layer. Specifically, the multi-scale texture feature pyramid network effectively integrates local gradient response and global semantic information through the cascaded and skip connections of a five-layer convolutional structure, overcoming the deficiency of traditional single-scale filters in terms of insufficient sensitivity to changes in bamboo joint morphology. The dynamic defect discrimination model introduces a defect type prior knowledge guidance module, significantly improving the discrimination accuracy of morphological anomalies and fracture trajectories, and solving the problem of weak generalization ability of general segmentation models in specific industrial scenarios. The adaptive parameter optimization engine adjusts imaging and algorithm parameters in real time based on confidence feedback, ensuring stable performance of the system under fabric batch switching or environmental disturbances, breaking through the limitations of existing systems that rely on manual parameter tuning. The defect sample incremental learning mechanism enables the model to continuously evolve online, avoiding the model aging problem caused by traditional offline training. At the same time, through local weight updates and knowledge distillation techniques, it ensures the real-time requirements of edge deployment. The fabric motion state synchronous compensation module completely eliminates the impact of motion blur on detection accuracy through encoder feedback and deconvolution sharpening. The multi-camera collaborative calibration and parallax correction subsystem ensures the geometric consistency of the full-width detection images and solves the risk of missed detection caused by multi-camera stitching seams. Based on the above technological innovations, this system achieves a 99.7% detection rate for abnormal slub joint morphology, a 99.2% accuracy rate for yarn breakage identification, and a combined false detection rate of less than 0.5% for stains and uneven density defects in actual production line testing. The detection speed reaches 120 meters per minute, fully meeting the accuracy, speed, and stability requirements of modern high-speed weaving production lines for online quality inspection. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of the overall technical architecture of a visual inspection method and system for slub yarn fabrics based on artificial intelligence proposed in this invention.

[0026] Figure 2 This is a schematic diagram illustrating the core principle framework of the collaborative working mechanism between the multi-scale texture feature pyramid network and the dynamic defect discrimination model in this invention. Detailed Implementation

[0027] Please refer to Figure 1 and Figure 2A linear array scanning imaging device, deployed directly above the fabric conveying path, performs line-by-line optical scanning of the continuously moving slub yarn fabric surface at a sampling frequency of no less than 2,000 lines per second to acquire original grayscale image sequences. The optical resolution of the linear array scanning imaging device is no less than twelve pixels per millimeter, ensuring sufficient pixel characterization capability even when the smallest detectable defect size in the slub yarn is no larger than 0.3 millimeters. During implementation, the photosensitive element array of the linear array scanning imaging device is arranged at fixed physical intervals along the fabric's travel direction. Each photosensitive element corresponds to one lateral pixel on the fabric surface, and the longitudinal resolution is determined by both the scanning frequency and the fabric's travel speed. When the fabric travels at a speed of 120 meters per minute, to maintain a lateral resolution of twelve pixels per millimeter, the scanning frequency needs to be precisely set to 2,400 lines per second. This value is dynamically calculated by the central control unit based on the real-time speed feedback from the encoder and injected into the trigger control circuit. The image sensor employs a global shutter CMOS device with a pixel size of 3.5 μm x 3.5 μm, a full-well capacity of no less than 20,000 electrons, readout noise of less than two electrons, and a dynamic range greater than 70 dB, ensuring detail retention even in high-contrast defect areas. The optical lens uses a telecentric design, with a depth of field covering ±2 mm of fabric thickness variation, maintaining sharp focus even under slight fabric undulations and avoiding edge blurring due to defocus. The original grayscale image sequence is cached line-by-line in the solid-state drive of the embedded image processing unit. Each line of image data contains the pixel grayscale value corresponding to the full width of the fabric, in unsigned 8-bit integer format, with a grayscale range of 0 to 255. During data writing, the system synchronously records the physical position code corresponding to that line of image data. This code is generated by the fabric motion state synchronization compensation module based on the cumulative pulse value of the rotary encoder, ensuring spatial traceability for subsequent image processing and defect localization. If a missing image line or data verification error is detected during the scanning process, the system immediately triggers the resampling mechanism, suspends the output of the current line and re-triggers the sensor acquisition, and sends an abnormal signal to the central control unit to start the device self-test process.

[0028] Programmable multispectral illumination units configured on both sides of the imaging area dynamically adjust the luminous intensity and incident angle of each illumination channel based on the fabric's current travel speed and surface reflectivity. The programmable multispectral illumination unit includes a main illumination channel, a swept illumination channel, and a backlight compensation channel. The main illumination channel uses a diffuse white light source to provide uniform basic illumination; the swept illumination channel uses a low-angle oblique light source to enhance the shadow contrast of the fabric's micro-uneven structure; and the backlight compensation channel uses a transmissive light source to suppress interference from the fabric's underlying structure on surface defect identification. The driving current of the three light sources is adjusted in a closed loop by the central controller based on real-time image contrast feedback values, ensuring that the imaging dynamic range is always maintained within the optimal range. In specific implementation, the main illumination channel consists of a high color rendering index LED array with an adjustable color temperature range of 3,000 Kelvin to 6,000 Kelvin and a light intensity adjustment accuracy of one percent. Its emitting surface forms a uniform Lambertian light source through a diffuser plate, with the illumination angle perpendicular to the fabric surface, ensuring no regional deviation in the basic grayscale distribution. The side-sweep lighting channel uses a focused LED combined with a cylindrical lens assembly to form a continuously adjustable grazing beam with an angle of 15 to 45 degrees to the fabric surface. The beam uniformity is better than 95%. This channel achieves dynamic angle adjustment via a mechanical rotating bracket with an adjustment step accuracy of 0.5 degrees. It is driven by a stepper motor and the current position is fed back to the central control unit. The backlight compensation channel uses a large-area surface light source combined with a diffuser plate, achieving a brightness uniformity better than 98%. It is installed in the gap of the conveyor belt below the fabric, and its luminous intensity is adjusted in conjunction with the main lighting channel to counteract the impact of changes in fabric transmittance on surface imaging. All three light sources are equipped with independent constant current drive modules, with a drive current adjustment range of 0 mA to 1000 mA and an adjustment resolution of 1 mA. A temperature feedback closed-loop control circuit monitors the LED junction temperature in real time. When the temperature exceeds 70 degrees Celsius, it automatically reduces the drive current by 10%, ensuring light output stability better than 0.5%. After processing every ten lines of images, the central controller calculates the standard deviation of the grayscale histogram of the current image block as the contrast feedback value. If the standard deviation is less than 30, it is determined to be a low-contrast scene, and the intensity of the sweep illumination channel is automatically increased by 20% while the intensity of the main illumination channel is decreased by 10%. If the standard deviation is greater than 80, it is determined to be a high-contrast overexposure risk, and the intensity of the sweep illumination channel is automatically decreased by 30% while the intensity of the backlight compensation channel is increased by 15%. This adjustment process adopts a proportional-integral-derivative control algorithm, with the integral time constant set to five seconds to ensure that there is no overshoot oscillation during the adjustment process.

[0029] A multi-scale texture feature pyramid network, constructed within an embedded image processing unit, is used to progressively downsample and extract features from the original grayscale image sequence. This network comprises five convolutional layers: the first layer uses a 3x3 convolutional kernel to extract local edges and gradient responses; the second layer uses a 5x5 convolutional kernel to capture medium-scale texture periodicity; the third layer uses a 7x7 convolutional kernel to model the macroscopic morphological contour of the bamboo joint region; and the fourth and fifth layers employ dilated and deformable convolutional structures, respectively, to adapt to non-rigid deformation and local scale changes in bamboo yarn fabrics. The feature maps output from each layer undergo non-linear transformation through batch normalization and a modified linear unit activation function. Skip connections are used to concatenate shallow high-resolution features with deep semantic features along the channel dimension, forming a multi-scale fusion feature representation with spatial position preservation capabilities. In implementation, the original grayscale image is first cropped into image blocks with a fixed width of 2,000 pixels and a height of 128 rows, which serve as the network input. The first convolutional layer uses 64 3x3 convolutional kernels with a stride of 1 and padding of 1, outputting a 64-channel feature map. Batch normalization and corrected linear unit activation are then applied. This layer primarily responds to local edges and subtle gradient changes on the fabric surface, exhibiting high sensitivity to yarn breakage initiation points and stain edges. The second convolutional layer uses 128 5x5 convolutional kernels with a stride of 2 and padding of 2, outputting a 128-channel feature map. This layer captures typical periodic texture structures in slub yarn by expanding the receptive field, such as the alternating light and dark patterns caused by slub spacing and yarn twist. The third convolutional layer uses 256 7x7 convolutional kernels with a stride of 2 and padding of 3, outputting a 256-channel feature map. This layer models the macroscopic morphological contour of the slub region and encodes the grayscale distribution patterns of the swollen slub areas and transition regions. The fourth layer employs a dilated convolutional structure with a 3x3 kernel size and a dilation rate of 2, outputting a 512-channel feature map. This structure expands the receptive field to 7x7 without increasing the number of parameters, effectively capturing long-range structural associations across multiple slub units. The fifth layer employs a deformable convolutional structure with a 3x3 kernel size. The offset is predicted by an additional convolutional branch, outputting a 1024-channel feature map. This structure learns adaptive offsets from spatial sampling points to adapt to non-rigid deformation and local-scale stretching caused by uneven tension in slub yarn fabrics. The feature map output from each layer is concatenated with the upsampled feature map from the previous layer via skip connections. Upsampling uses bilinear interpolation. After concatenation, channel compression and feature fusion are performed using a 1x1 convolution. The final multi-scale fused feature map is one-eighth the size of the input image, with 1024 channels, preserving the original spatial location information while fusing multi-level semantics from local edges to global structure. The network is deployed in a field-programmable gate array and achieves real-time performance of processing fifty image blocks per second through a pipelined parallel architecture, meeting the production line speed requirements.

[0030] A dynamic defect discrimination model deployed on a cloud-based inference server receives fused feature maps from a multi-scale texture feature pyramid network and performs both pixel-level defect segmentation and region-level defect classification. The dynamic defect discrimination model employs an encoder-decoder architecture. The encoder reuses the deep output of the multi-scale texture feature pyramid network, while the decoder uses transposed convolution and spatial attention mechanisms to progressively restore the original image resolution. A defect type prior knowledge guidance module is introduced into the decoding path. This module dynamically adjusts the feature weights of each layer of the decoder based on the spatial distribution statistical characteristics of various defects in a historical defect sample database, enhancing the response sensitivity to abnormal bamboo joint morphology regions and yarn breakage trajectories. The final output is a structured detection result containing defect location coordinates, defect type labels, and confidence scores. During implementation, the fused feature maps are transmitted to the cloud-based inference server via gigabit Ethernet and processed in parallel by a graphics processing unit cluster. The encoder directly receives the 1024-channel fused feature map without additional downsampling, preserving the maximum spatial resolution. The decoder consists of four transposed convolutional layers. Each layer doubles the feature map size while halving the number of channels. The first layer outputs 512 channels, the second 256, the third 128, and the fourth 64. A spatial attention mechanism is introduced after each transposed convolutional layer to calculate the attention weights at each location in the feature map, expressed by the following formula:

[0031]

[0032] in, This is the transpose of a weight vector. It's used to weight the feature vector to highlight the importance of certain features. Here... It can be understood as a set of parameters learned by the model, used to measure the importance of different features. Represents the position in the feature map The feature vector at that location. This vector contains multi-channel feature information at that location. This is an exponential function used to map the weighted feature values ​​to a positive range, ensuring that all weight values ​​are positive. This is a summation symbol, representing summation over all locations in the feature map. The exponential terms are summed. This step is for normalization, ensuring that the sum of the attention weights at all positions is 1, thus forming a probability distribution. Indicates the position in the feature map The eigenvectors at a given location are weighted to obtain a scalar value. To normalize attention weights and enhance the feature response of defect regions, a defect type prior knowledge guidance module intervenes in the second layer of the decoder. This module maintains a defect prototype library containing typical spatial distribution templates for four types of defects: abnormal bamboo joint shape, yarn breakage, staining, and uneven density. Each template is a 64x64 heatmap, representing the distribution of high-response regions for that type of defect in the feature space. During inference, the cross-correlation score between the current feature map and each prototype template is calculated. The template with the highest score has its weight amplified by two times, while the weights of the other templates remain unchanged, thus enhancing the response to specific defect types. The final output layer uses two parallel branches: the segmentation branch outputs a single-channel probability map, where each pixel value represents the probability that the location belongs to a defect; the classification branch outputs a four-channel probability map, where each channel corresponds to the probability of a defect type. By setting a probability threshold of 0.5 for binarization, connected regions are extracted as defect candidates. The centroid coordinates of each candidate region are calculated as the defect location. The region with the highest probability in the classification branch is taken as the defect type label, and the average probability of the region in the segmentation branch is taken as the confidence score. The structured inspection results are encapsulated in JSON format, including the defect ID, location coordinates, type label, confidence score, and the corresponding image block number, and are transmitted back to the central control unit via the industrial real-time Ethernet protocol.

[0033] An adaptive parameter optimization engine, integrated into the central control unit, adjusts the exposure time of the linear scanning imaging device, the light intensity ratio of the programmable multispectral illumination unit, and the dilation rate parameter of the dilated convolution in the multi-scale texture feature pyramid network based on the confidence score distribution and false detection sample characteristics output by the dynamic defect discrimination model. Employing an online learning strategy based on gradient descent, the engine triggers parameter fine-tuning after processing one kilometer of fabric length, ensuring stable detection performance even under fabric batch switching, ambient light fluctuations, or slight equipment drift. During implementation, the central control unit continuously receives detection results from the cloud, establishes a confidence score histogram, and calculates the proportion of low-confidence samples. When the cumulative processed fabric length reaches one kilometer, if the proportion of low-confidence samples exceeds five percent, the parameter optimization process is triggered. The optimization engine first extracts the original image patches and feature maps corresponding to all samples with confidence scores below 0.3, calculating the distribution difference between these and high-confidence samples in the feature space. If the differences are mainly concentrated in the high-frequency gradient region, it is determined to be insufficient illumination or motion blur, and the sweep illumination intensity is automatically increased by 10% and the exposure time is extended by 0.5 milliseconds. If the differences are concentrated in the low-frequency texture region, it is determined to be a decrease in light source uniformity, and the driving current balance of each LED unit in the main illumination channel is automatically adjusted. If the differences are manifested as insufficient scale sensitivity, it is determined to be a mismatch in the dilation rate of the dilated convolution, and the dilation rate of the fourth layer is adjusted from 2 to 3. The parameter adjustment range is calculated by the gradient descent algorithm, the loss function is defined as the negative log-likelihood of the proportion of low-confidence samples, the initial learning rate is 0.01, and each round of optimization iterations is performed ten times. After each iteration, the performance is evaluated on the validation set. If the mean confidence of the validation set increases, the parameters are retained; otherwise, the process is rolled back and the learning rate is halved. The optimized parameters are distributed to each subsystem through the firmware upgrade protocol. The linear scanning imaging device and the programmable multispectral illumination unit take effect immediately, and the parameters of the multi-scale texture feature pyramid network are dynamically reconfigured through the field-programmable gate array, ensuring that the production line can complete adaptive adjustments without downtime.

[0034] By constructing an incremental learning mechanism for defect samples, after each manual review confirms a false positive or false negative sample, the corresponding original image patch and annotation information are automatically added to the training sample library, triggering a local weight update of the dynamic defect discrimination model. This local weight update only performs gradient backpropagation on neuron connections with feature similarity to the newly added sample exceeding a preset threshold, avoiding model performance oscillations caused by global retraining. Simultaneously, knowledge distillation technology is used to compress the updated model parameters and deploy them to edge computing nodes, ensuring that the inference latency at the production line remains below 50 milliseconds. During implementation, the manual review terminal is equipped with a touchscreen interface. Operators confirm or correct defects marked by the system, and samples confirmed as false positives or false negatives trigger the incremental learning process. The sample acquisition agent automatically extracts the corresponding original image patch, with a size of 512 x 512 pixels, and extracts its feature vector output from the fifth layer of the multi-scale texture feature pyramid network, with dimensions of 64 x 64 x 1024. The feature similarity calculation engine calculates the cosine distance between this feature vector and each prototype vector in the historical sample library. The prototype vector serves as the cluster center for each type of defect, dynamically maintained by an online clustering algorithm. If the cosine distance is less than 0.3, it is considered a high-similarity sample, triggering a local weight update. The local gradient calculation unit constructs a weighted loss function, with weights equal to the square of the similarity score. Backpropagation is only performed on neuron connections with similarity higher than 0.7. The learning rate is set to one-tenth of the global training rate, and the number of iterations is fixed at five to avoid overfitting. The model parameter compressor starts immediately after the update, using channel pruning to remove convolutional channels with response values ​​below a threshold, and weight quantization to convert 32-bit floating-point numbers to 8-bit integers. The compressed model size is 28% of the original. The compressed model is deployed to the field-programmable gate array (FPGA) of the embedded image processing unit via a dedicated transmission channel, replacing the original network weights. The entire process is completed within ten seconds, ensuring continuous production line operation without disruption. The system records sample features and parameter changes for each incremental learning iteration, forming a traceable model evolution log for subsequent analysis.

[0035] By designing a fabric motion state synchronization compensation module, the encoder pulse signal of the fabric conveyor belt is acquired in real time, and the current travel speed and acceleration are calculated accordingly. The speed information is injected as a timestamp synchronization signal into the trigger control circuit of the linear array scanning imaging device to ensure that the image acquisition time of each row strictly corresponds to the physical position of the fabric. Simultaneously, the acceleration information is input as a motion blur correction factor into the image preprocessing unit. A deconvolution algorithm based on motion vector estimation is used to perform real-time sharpening processing on the acquired images, eliminating image ghosting caused by conveyor belt start / stop or speed fluctuations. In implementation, a high-precision rotary encoder is installed at the end of the fabric conveyor roller shaft, with a resolution of no less than 5,000 pulses per revolution. The signal conditioning circuit converts the differential signal to TTL level and filters out high-frequency noise above 100 kHz. The time synchronization controller reads the encoder pulse count at a period of one microsecond and calculates the instantaneous speed through differential calculation, using the formula: ,in For pulse increment, For pulse equivalent, The sampling interval is specified. Acceleration is calculated using quadratic difference. The velocity value is directly used to generate the row trigger pulse, ensuring that the image acquisition interval for each row is strictly proportional to the fabric displacement. The acceleration value is input to the image preprocessing unit as an estimation parameter for the motion blur kernel. The blur kernel model is a linear motion blur with a length of... The direction is consistent with the direction of fabric travel, among which For exposure time. The deconvolution algorithm uses a Wiener filter, whose transfer function is:

[0036]

[0037] in For the spectrum of the blurred image, For the fuzzy kernel spectrum, The signal-to-noise ratio estimate is set to 40. The filter coefficients are calculated in real-time by a field-programmable gate array and applied to the current row of the image. The sharpened image is then fed into a multi-scale texture feature pyramid network. If the absolute value of the acceleration exceeds 0.5 m / s², the system determines this as an abnormal condition, suspends image acquisition, and issues an alarm. Detection resumes once the speed stabilizes.

[0038] By deploying a multi-camera collaborative calibration and parallax correction subsystem, three linear array scanning imaging devices are arranged in parallel along the fabric width direction. The overlap area of ​​the fields of view of adjacent cameras is no less than 15%. Using a calibration board, the intrinsic and extrinsic parameters and distortion coefficients of each camera are pre-acquired while the production line is stopped. During online inspection, the parallax field is calculated in real time based on the feature point matching results of the overlapping area, and a bilinear interpolation algorithm is used to perform pixel-level alignment of adjacent camera images. Finally, a seamless inspection image covering the entire width is generated, eliminating image seams and geometric distortions caused by camera installation errors or thermal expansion. In implementation, the lateral spacing between the three cameras is 800 mm, the field of view of each camera is 900 mm, and the overlap area is 135 mm. In the offline calibration stage, a high-precision two-dimensional translation stage moves a standard checkerboard calibration board within the imaging area, acquiring no fewer than fifty calibration images in different poses. The Zhang Zhengyou calibration method is used to calculate the intrinsic parameter matrix and radial distortion coefficient of each camera. Simultaneously, the extrinsic parameter rotation and translation matrix is ​​solved through feature point matching. The calibration accuracy requires a reprojection error of less than 0.1 pixels. During online detection, after acquiring every 1,000 rows of images, the system automatically extracts scale-invariant feature points from the overlapping areas of adjacent cameras. A random sampling consensus algorithm is used to eliminate mismatched points, retaining at least 100 pairs of interior points. The disparity field is calculated based on these interior point pairs, using a two-dimensional polynomial surface model of order three, with coefficients fitted using the least squares method. A bilinear interpolation algorithm remaps the right camera image pixels according to the disparity field, ensuring complete alignment with the left camera image in the overlapping area. The interpolation weights are determined by the distance between four adjacent pixels. The stitched image is 2,400 pixels wide, covering the full width of the fabric. A weighted average fusion is used at the stitching seam, with the weights decreasing Gaussianly with distance from the seam centerline, and a standard deviation of 10 pixels, ensuring a smooth and seamless transition. If the disparity field fitting residual is greater than 0.5 pixels, the system determines it as an abnormal camera displacement, triggers an alarm, and recommends recalibration.

[0039] This linear array imaging device uses an array of photosensitive elements arranged at fixed physical intervals along the fabric's direction of travel. Combined with a high-speed electronic shutter and a global exposure control circuit, it achieves distortion-free line-by-line sampling of the continuously moving fabric surface. Its optical lens employs a telecentric design, covering the fabric thickness variation range to ensure sharp focus even under slight fabric undulations. The image sensor uses a global shutter type CMOS device with a pixel size of 3.5 μm x 3.5 μm, a full-well capacity of at least 20,000 electrons, readout noise below two electrons, and a dynamic range greater than 70 dB, meeting the requirements for high-contrast defect imaging. The device's mechanical structure includes precision guide rails and a shock-absorbing base, ensuring that the parallelism error between the sensor array and the fabric surface is less than 0.05 degrees. The electronic shutter response time is less than ten microseconds, supporting continuously adjustable exposure times from 0.1 milliseconds to 10 milliseconds in 0.01 millisecond increments. The global exposure control circuit ensures simultaneous integration of all photosensitive elements, preventing deformation of moving objects. The device is equipped with a temperature sensor and a cooling fan to maintain the operating temperature within a range of 25 degrees Celsius ± 5 degrees Celsius, preventing thermal noise from increasing. The data output interface is CameraLink HS, with a transmission rate of 6.25 Gbps, ensuring uncompressed real-time transmission of image data.

[0040] The programmable multispectral illumination unit provides an illumination field with independently adjustable spectral composition and spatial distribution. Its main illumination channel uses a high color rendering index LED array with an adjustable color temperature range of 3,000 Kelvin to 6,000 Kelvin and a light intensity adjustment accuracy of 1%. The side-sweep illumination channel uses a focusing LED combined with a cylindrical lens group to form a continuously adjustable grazing beam with an angle of 15 to 45 degrees to the fabric surface, achieving a light spot uniformity better than 95%. The backlight compensation channel uses a large-area surface light source combined with a diffuser plate, achieving a brightness uniformity better than 98%. All three light sources are equipped with independent constant current drive modules and temperature feedback closed-loop control circuits, ensuring light output stability better than 0.5% over long-term operation. The unit's LED array consists of 360 independently controllable LEDs: 180 for main illumination, 120 for side-sweep illumination, and 60 for backlight. The constant current drive module uses digital pulse width modulation control at a frequency of 20 kHz to avoid flicker perceptible to the human eye. The temperature feedback circuit samples the LED substrate temperature once per second. If the temperature change exceeds 0.5 degrees Celsius, it automatically compensates the drive current to maintain a constant luminous flux. The optical components use quartz glass and an aluminum alloy bracket with matched coefficients of thermal expansion to ensure no focal drift during long-term use.

[0041] The embedded image processing unit performs image preprocessing, feature extraction, and preliminary defect screening. Its hardware platform employs a multi-core ARM processor and a field-programmable gate array (FPGA) architecture. The ARM processor runs the operating system and communication protocol stack, while the FPGA provides hardware acceleration for computationally intensive operations such as convolution, image scaling, and histogram statistics. It is configured with 8GB of DDR4 synchronous dynamic random access memory, providing a storage bandwidth of at least 64GB per second. Two external 2TB solid-state drives (SSDs) are used to cache raw image data and intermediate feature maps. The network interface supports Gigabit Ethernet and industrial real-time Ethernet protocols, ensuring low-latency data interaction with the cloud server. The unit's operating system is a real-time Linux kernel with a task scheduling cycle of one millisecond. The FPGA has at least 500,000 logic cells and a dedicated digital signal processing module, supporting parallel convolution operations. The SSD uses industrial-grade MLCNAND flash memory with a write endurance of at least 3,000 full-disk write cycles. The network protocol stack supports Time-Sensitive Networking (TSN) standards, ensuring data transmission jitter is less than ten microseconds.

[0042] The cloud-based inference server hosts the complete inference process and parameter update mechanism of the dynamic defect discrimination model. Its computing core employs a GPU cluster architecture, with each GPU equipped with 24GB of video memory, supporting mixed-precision matrix operations. Multi-GPU parallel computing is achieved through a high-speed interconnect bus. The storage system uses a distributed file system architecture with a total capacity of at least 100TB, supporting over 100,000 metadata operations per second and a network access bandwidth of at least 10GB per second. It is equipped with a dedicated model service framework, supporting model version management, A / B testing, and canary release functions to ensure high availability and scalability of the detection service. The server cluster contains eight GPUs interconnected via NVLink, with a total bandwidth of 600GB per second. The distributed file system uses a Ceph architecture with a data redundancy of 3, ensuring no single point of failure. The model service framework is customized based on TensorFlowServing, supporting dynamic batch processing and hot model updates, with an inference latency standard deviation of less than five milliseconds.

[0043] The central control unit coordinates the timing and parameter configuration of each subsystem. Its core is an industrial-grade programmable logic controller (PLC), equipped with redundant power modules and a watchdog circuit. Input / output interfaces include sixteen analog inputs, thirty-two digital inputs, and thirty-two digital outputs. It establishes real-time communication links with each subsystem via industrial Ethernet, has a built-in real-time operating system kernel, a task scheduling cycle of one millisecond, supports multi-threaded concurrent execution, and is equipped with non-volatile memory to store system configuration parameters and operation logs. It supports remote firmware upgrades and fault diagnosis. The PLC uses a dual-core ARM Cortex-A9 architecture with a clock frequency of one kilohertz. The watchdog circuit has a timeout threshold of one hundred milliseconds, automatically resetting the system upon timeout. The non-volatile memory is four GBeMMC cells, cyclically recording the operation logs for the past thirty days. Remote upgrades support differential updates with a bandwidth consumption of less than one hundred KB per second.

[0044] The defect sample incremental learning module is used to achieve online continuous optimization of the detection model. Its software architecture includes a sample acquisition agent, a feature similarity calculation engine, a local gradient calculation unit, and a model parameter compressor. The sample acquisition agent monitors the annotation results of the manual review terminal, automatically extracts the corresponding image regions, and extracts multi-scale feature vectors. The feature similarity calculation engine uses cosine distance to measure the similarity between new samples and prototype vectors in the historical sample library. The local gradient calculation unit constructs a weighted loss function based on similarity weights, performing backpropagation only on neuron connections with similarity greater than 0.7. The model parameter compressor uses channel pruning and weight quantization techniques to compress the updated model to less than 30% of its original size, ensuring the feasibility of deployment at edge devices. This module runs on a cloud server, the sample library is stored in a distributed file system, and prototype vectors are updated hourly. The channel pruning threshold is set to 10% of the feature map mean, and linear quantization is used, ranging from -12.8 to +12.7, with a step size of 0.1. The compressed model checksum is calculated using the SHA-256 algorithm to ensure transmission integrity.

[0045] The fabric motion state synchronization compensation module is used to eliminate motion blur and position drift errors. Its hardware includes a high-precision rotary encoder, signal conditioning circuitry, and a time synchronization controller. The rotary encoder has a resolution of at least 5,000 pulses per revolution and is mounted on the fabric conveyor roller shaft. The signal conditioning circuit converts the encoder differential signal to TTL level and filters out high-frequency noise. The time synchronization controller calculates instantaneous velocity and acceleration based on the pulse interval, generates a trigger pulse sequence synchronized with the image acquisition clock, and injects motion parameters into the image preprocessing pipeline via a DMA channel, triggering real-time updates of the deconvolution filter coefficients. The encoder is a magnetoelectric absolute encoder with strong anti-vibration interference capability. The signal conditioning circuit includes a Schmitt trigger and a low-pass filter with a cutoff frequency of 50 kHz. The time synchronization controller is implemented using an FPGA with an internal clock of 100 MHz, and the speed calculation delay is less than 10 microseconds. The DMA channel bandwidth is 8 GB per second, ensuring no delay in motion parameter injection.

[0046] A multi-camera collaborative calibration and parallax correction subsystem is used to generate full-width seamless inspection images. It comprises an offline calibration workstation and an online correction engine. The offline calibration workstation is equipped with a high-precision 2D translation stage and a standard checkerboard calibration board. During the production line debugging phase, it automatically acquires multi-view calibration images, calculates the intrinsic parameter matrix and distortion coefficients of each camera using the Zhang Zhengyou calibration method, and solves the extrinsic parameter rotation and translation matrix through feature point matching. The online correction engine acquires images of overlapping areas before each fabric inspection, extracts scale-invariant feature points and calculates matching pairs, uses a random sampling consensus algorithm to eliminate mismatched points, fits a parallax field model, and finally achieves pixel-level image alignment and seamless stitching through bilinear interpolation. The translation stage positioning accuracy of the offline calibration workstation is 0.01 mm, and the repeatability is 0.005 mm. The online correction engine runs on an embedded image processing unit. Feature point extraction uses the FAST algorithm, matching uses the BRISK descriptor, the random sampling consensus algorithm iterates 1000 times, and the confidence level is 99.9%. The quality of the stitched image is evaluated using a structural similarity index, which must be greater than 0.9.

Claims

1. A visual inspection method for slub yarn fabrics using artificial intelligence, characterized in that, include: By deploying a linear array scanning imaging device directly above the fabric conveying path, the surface of the continuously moving slub yarn fabric is optically scanned line by line at a sampling frequency of no less than two thousand lines per second to obtain the original grayscale image sequence. The optical resolution of the linear array scanning imaging device is no less than twelve pixels per millimeter. By using programmable multispectral illumination units configured on both sides of the imaging area, the luminous intensity and incident angle of each illumination channel are dynamically adjusted according to the current travel speed of the fabric and the surface reflection characteristics. The programmable multispectral illumination unit includes a main illumination channel, a side-swept illumination channel and a backlight compensation channel. The original grayscale image sequence is downsampled and its features are extracted step by step by a multi-scale texture feature pyramid network constructed in the embedded image processing unit. The multi-scale texture feature pyramid network contains a five-layer convolutional structure. The first layer uses a 3x3 convolutional kernel to extract local edges and gradient responses. The second layer uses a 5x5 convolutional kernel to capture medium-scale texture periodicity. The third layer uses a 7x7 convolutional kernel to model the macroscopic shape contour of the bamboo joint region. The fourth layer uses a dilated convolutional structure. The fifth layer uses a deformable convolutional structure. The dynamic defect discrimination model deployed in the cloud inference server receives the fused feature map output by the multi-scale texture feature pyramid network and performs the dual tasks of pixel-level defect segmentation and region-level defect classification. The dynamic defect discrimination model adopts an encoder-decoder architecture, and the decoder part introduces a defect type prior knowledge guidance module. By using an adaptive parameter optimization engine built into the central control unit, the exposure time of the linear array imaging device, the light intensity ratio of the programmable multispectral illumination unit, and the dilation rate parameter of the hole convolution in the multi-scale texture feature pyramid network are adjusted in reverse based on the confidence score distribution and false detection sample characteristics output by the dynamic defect discrimination model. By constructing a defect sample incremental learning mechanism, after manual review and confirmation of false or missed samples, the corresponding original image blocks and annotation information are automatically added to the training sample library, and the local weight update of the dynamic defect discrimination model is triggered. By designing a fabric motion state synchronization compensation module, the encoder pulse signal of the fabric conveyor belt is acquired in real time, the current travel speed and acceleration are calculated, the speed information is injected as a timestamp synchronization signal into the trigger control circuit of the linear array scanning imaging device, and the acceleration information is input as a motion blur correction factor into the image preprocessing unit. By deploying a multi-camera collaborative calibration and parallax correction subsystem, three linear array scanning imaging devices are arranged in parallel along the fabric width direction. The parallax field is calculated in real time based on the feature point matching results of the overlapping area, and a bilinear interpolation algorithm is used to perform pixel-level alignment of adjacent camera images.

2. The artificial intelligence-based visual inspection method for slub yarn fabrics according to claim 1, characterized in that, By using programmable multispectral illumination units configured on both sides of the imaging area, the luminous intensity and incident angle of each illumination channel are dynamically adjusted according to the current movement speed of the fabric and its surface reflectivity, including: The main lighting channel uses a diffuse white light source to provide uniform basic lighting, the side lighting channel uses a low-angle oblique light source to enhance the shadow contrast of the micro-uneven structure of the fabric surface, and the backlight compensation channel uses a transmissive light source to suppress the interference of the fabric's underlying structure on the identification of surface defects. The driving current of the three-channel light source is adjusted in a closed loop by the central controller based on the real-time image contrast feedback value. After processing every ten lines of images, the standard deviation of the grayscale histogram of the current image block is calculated. If the standard deviation is less than 30, the intensity of the sweep illumination channel is increased by 20% and the intensity of the main illumination channel is decreased by 10%. If the standard deviation is greater than 80, the intensity of the sweep illumination channel is decreased by 30% and the intensity of the backlight compensation channel is increased by 15%.

3. The artificial intelligence-based visual inspection method for slub yarn fabrics according to claim 2, characterized in that, The original grayscale image sequence is downsampled and its features extracted step-by-step using a multi-scale texture feature pyramid network built into the embedded image processing unit, including: The original grayscale image is cropped into an image block with a width of 2,000 pixels and a height of 128 rows as network input; The first convolutional layer uses sixty-four 3x3 convolutional kernels with a stride of one and padding of one, outputting a 64-channel feature map. The second convolutional layer uses 128 five-by-five convolutional kernels with a stride of two and padding of two, outputting a feature map with 128 channels. The third convolutional layer uses 256 seven-by-seven convolutional kernels with a stride of two and padding of three, outputting a 256-channel feature map. The fourth layer uses a dilated convolutional structure with a kernel size of 3x3 and a dilation rate of 2, outputting a 512-channel feature map. The fifth layer uses a deformable convolutional structure with a kernel size of 3x3. The offset is predicted by an additional convolutional branch, and the output is a 1024-channel feature map. Each layer's output feature map is concatenated with the upsampled feature map of the previous layer through skip connections to achieve channel-dimensional concatenation. The final output is a multi-scale fusion feature map with a size one-eighth of the input image and 1,024 channels.

4. The artificial intelligence-based visual inspection method for slub yarn fabrics according to claim 3, characterized in that, The dynamic defect discrimination model deployed on a cloud-based inference server receives the fused feature map output by the multi-scale texture feature pyramid network and performs dual tasks of pixel-level defect segmentation and region-level defect classification, including: The encoder section directly receives the fused feature map of 1024 channels; The decoder consists of four transposed convolutional layers, each of which doubles the feature map size and halves the number of channels. A spatial attention mechanism is introduced after each transposed convolution layer to calculate the attention weights at each location in the feature map; The prior knowledge guidance module for defect types intervenes in the second layer of the decoder. Based on the spatial distribution templates of four types of defects in the historical defect sample library, namely abnormal bamboo joint shape, yarn breakage, staining, and uneven density, the feature weights of each layer of the decoder are dynamically adjusted. The final output layer uses two parallel branches: the segmentation branch outputs a single-channel probability map, and the classification branch outputs a four-channel probability map. The map is binarized by setting a probability threshold of 0.5, and connected regions are extracted as defect candidates. The centroid coordinates are calculated as the defect location. The region with the highest probability in the classification branch is taken as the defect type label, and the average probability of the region in the segmentation branch is taken as the confidence score.

5. The artificial intelligence-based visual inspection method for slub yarn fabrics according to claim 4, characterized in that, Through an adaptive parameter optimization engine established in the central control unit, based on the confidence score distribution and false detection sample characteristics output by the dynamic defect discrimination model, the exposure time of the linear array scanning imaging device, the light intensity ratio of the programmable multispectral illumination unit, and the dilation rate parameter of the dilated convolution in the multi-scale texture feature pyramid network are adjusted in reverse, including: The central control unit continuously receives the detection results returned from the cloud, establishes a confidence score histogram, and counts the proportion of low-confidence samples. If the proportion of low-confidence samples exceeds 5% after processing 1,000 meters of fabric, the parameter optimization process will be triggered. Extract the original image patches and feature maps corresponding to all samples with confidence levels below 0.3, and calculate the distribution difference between them and high-confidence samples in the feature space; If the difference is mainly concentrated in the high-frequency gradient region, increase the sweep illumination intensity by 10% and extend the exposure time by 0.5 milliseconds; If the differences are concentrated in the low-frequency texture area, adjust the driving current balance of each LED unit in the main lighting channel. If the difference manifests as insufficient scale sensitivity, then the void ratio of the fourth layer will be adjusted from two to three. The parameter adjustment range is calculated by the gradient descent algorithm. The loss function is defined as the negative log-likelihood of the proportion of low-confidence samples. The initial learning rate is 0.01, and each round of optimization is iterated ten times.

6. The artificial intelligence-based visual inspection method for slub yarn fabrics according to claim 5, characterized in that, By constructing an incremental learning mechanism for defect samples, after manual verification and confirmation of false or missed samples, the corresponding original image patches and annotation information are automatically added to the training sample library, triggering local weight updates of the dynamic defect discrimination model, including: The sample acquisition agent automatically extracts the original image patch corresponding to the sample, with a size of 512 by 512 pixels, and extracts its feature vector output from the fifth layer of the multi-scale texture feature pyramid network. The feature similarity calculation engine calculates the cosine distance between the feature vector and each prototype vector in the historical sample library; If the cosine distance is less than 0.3, it is determined to be a high similarity sample, triggering a local weight update; The local gradient calculation unit constructs a weighted loss function with the weights being the squares of the similarity scores. Backpropagation is performed only on neuron connections with a similarity score higher than 0.

7. The learning rate is set to one-tenth of the global training rate, and the number of iterations is fixed at five. The model parameter compressor uses channel pruning and weight quantization techniques to compress the updated model to less than 28 percent of its original size.

7. The artificial intelligence-based visual inspection method for slub yarn fabrics according to claim 6, characterized in that, By designing a fabric motion state synchronization compensation module, the encoder pulse signal of the fabric conveyor belt is acquired in real time, and the current traveling speed and acceleration are calculated, including: A high-precision rotary encoder is installed on the end of the fabric conveyor roller shaft, with a resolution of no less than 5,000 pulses per revolution; The time synchronization controller reads the encoder pulse count in a one-microsecond cycle and calculates the instantaneous speed through differential calculation. Acceleration is calculated using the second difference method; The velocity value is used to generate row trigger pulses, ensuring that the image acquisition interval for each row is strictly proportional to the fabric displacement. The acceleration value is used as the estimation parameter of the motion fuzzy kernel. The fuzzy kernel model is a linear motion fuzzy model, and the length direction is consistent with the direction of fabric movement. The deconvolution algorithm uses a Wiener filter to sharpen the current row of the image in real time.

8. The artificial intelligence-based visual inspection method for slub yarn fabrics according to claim 7, characterized in that, By deploying a multi-camera collaborative calibration and parallax correction subsystem, three linear array scanning imaging devices are arranged in parallel along the fabric width direction, including: The three cameras are spaced 800 mm apart laterally, each camera has a field of view of 900 mm, and the overlapping area is 135 mm. During the offline calibration phase, no fewer than fifty calibration images with different poses were acquired, and the intrinsic parameter matrix and distortion coefficients of each camera were calculated using the Zhang Zhengyou calibration method. During online detection, after collecting every thousand rows of images, scale-invariant feature points in the overlapping areas of adjacent cameras are extracted, and a random sampling consensus algorithm is used to remove mismatched points. The disparity field is calculated based on the interior point matching pairs. The model is a two-dimensional polynomial surface of order three, and the coefficients are fitted by the least squares method. The bilinear interpolation algorithm performs pixel remapping on the right camera image based on the disparity field. Weighted average fusion is used at the stitching seam, and the weights decrease in a Gaussian distribution with a standard deviation of ten pixels as they move away from the center line of the seam.

9. A detection system for visual inspection of slub yarn fabrics using artificial intelligence as described in any one of claims 1-8, characterized in that, include: Linear scanning imaging device is used to obtain a photosensitive element array arranged at fixed physical intervals along the direction of fabric travel, in conjunction with a high-speed electronic shutter and a global exposure control circuit, to achieve distortion-free line-by-line sampling of the surface of continuously moving fabric. A programmable multispectral illumination unit is used to provide an illumination field with independently adjustable spectral composition and spatial distribution, including a main illumination channel, a side illumination channel, and a backlight compensation channel; The embedded image processing unit is used to perform image preprocessing, feature extraction and preliminary defect screening tasks. Its hardware platform adopts a multi-core ARM processor and field-programmable gate array collaborative architecture. The cloud-based inference server is used to carry the complete inference process and parameter update mechanism of the dynamic defect discrimination model. Its computing core adopts a graphics processor cluster architecture. The central control unit is used to coordinate the working timing and parameter configuration of each subsystem, and its core is an industrial-grade programmable logic controller. The defect sample incremental learning module is used to realize the online continuous optimization of the detection model. Its software architecture includes a sample acquisition agent, a feature similarity calculation engine, a local gradient calculation unit, and a model parameter compressor. The fabric motion state synchronization compensation module is used to eliminate motion ambiguity and position drift error. Its hardware includes a high-precision rotary encoder, signal conditioning circuit and time synchronization controller. The multi-camera collaborative calibration and parallax correction subsystem is used to generate full-frame seamless inspection images, and it includes an offline calibration workstation and an online correction engine.

10. The artificial intelligence-based visual inspection system for slub yarn fabrics according to claim 9, characterized in that, The embedded image processing unit is used for: Perform image preprocessing, feature extraction, and preliminary defect screening tasks; The hardware platform adopts a collaborative architecture of multi-core ARM processor and field-programmable gate array. The ARM processor is responsible for running the operating system and communication protocol stack, while the field-programmable gate array realizes hardware acceleration for computationally intensive operations such as convolution, image scaling and histogram statistics. The memory configuration is 8GB DDR4 synchronous dynamic random access memory, with a storage bandwidth of no less than 64GB per second; Two external 2TB solid-state drives are used to cache raw image data and intermediate feature maps; The network interface supports Gigabit Ethernet and industrial real-time Ethernet protocols, ensuring low-latency data interaction with cloud servers.

Citation Information

Patent Citations

  • Fabric classification method based on adaptive convolution neural network

    CN109272500A

  • Construction and detection method of textile fabric defect detection model based on artificial intelligence

    CN115294136A