A neural network-based textile fabric defect detection method

By combining multimodal information fusion of visual and physical state data, and dynamically correcting the defect judgment threshold, the false alarm problem of textile defect detection in complex environments is solved, and highly reliable and stable defect recognition is achieved.

CN122134699APending Publication Date: 2026-06-02SHANDONG INST FOR PROD QUALITY INSPECTION

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG INST FOR PROD QUALITY INSPECTION
Filing Date
2026-03-03
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing methods for detecting defects in textile fabrics have a high false alarm rate in complex industrial environments, making it difficult to effectively distinguish between environmental artifacts and real material defects, thus reducing detection accuracy.

Method used

By combining fabric visual state data and basic physical state data, and through analysis using a neural network model, combined with spectral deviation and temperature gradient outliers, the confidence threshold for defect judgment is dynamically adjusted to generate the final defect judgment result.

Benefits of technology

It improves the reliability and stability of textile defect detection, reduces the false alarm rate, and ensures accurate identification under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134699A_ABST
    Figure CN122134699A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of image visual recognition technology and provides a neural network-based method for detecting defects in textile fabrics. The method includes performing neural network detection and analysis based on fabric visual state data to obtain a defect judgment confidence value and generate an initial defect judgment result. Based on this, the defect judgment confidence threshold is corrected according to the fabric's environmental coupling state type to obtain an updated corrected defect judgment result. Finally, based on the initial and corrected defect judgment results, a final defect judgment result is obtained to characterize whether a defect exists in the target detection area. The neural network-based textile fabric defect detection method provided by this invention avoids the problem of environmental artifacts interfering with the recognition results caused by judging solely based on static image features, reduces the false alarm probability caused by complex working conditions such as vibration and temperature differences, and improves the stability and reliability of fabric defect detection results under complex environmental conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image visual recognition technology, and specifically relates to a method for detecting defects in textile fabrics based on neural networks. Background Technology

[0002] Currently, most textile defect detection methods on the market acquire fabric images using industrial cameras and then utilize pre-trained neural network models (such as Convolutional Neural Networks, CNNs) to extract features and classify the images, thereby automatically identifying common defects such as holes, stains, color differences, and warp and weft anomalies, replacing traditional manual visual inspection or traditional image processing algorithms. However, existing neural network models for textile defect detection have the following problems in practical defect detection applications: In automated visual inspection of textile fabrics, they mainly rely on high-resolution industrial cameras to acquire image data and built-in algorithms to identify defects. However, in actual applications, due to the complex and variable production environment, such as periodic vibrations from loom operation, and minor deformations and temperature differences on the fabric surface caused by airflow or local heating, these factors can affect the acquired image data. That is, they introduce non-defect texture interference or artifacts into the acquired images, making it difficult to effectively and reasonably distinguish between "false anomalies" caused by environmental coupling effects and real material defects. This results in a large fluctuation in the overall false alarm rate and a decrease in the accuracy of defect detection.

[0003] Therefore, it is necessary to design a neural network-based defect detection method for textile fabrics that can at least solve some of the above problems and defects. Summary of the Invention

[0004] To address the above technical problems, this invention proposes a neural network-based method for detecting defects in textile fabrics. This method avoids the problem of environmental artifacts interfering with the recognition results caused by relying solely on static image features, reduces the probability of false alarms caused by complex working conditions such as vibration and temperature differences, and improves the reliability and stability of textile fabric defect detection results under variable industrial conditions.

[0005] The technical solution of this invention is:

[0006] This invention proposes a method for detecting defects in textile fabrics based on neural networks, comprising the following steps:

[0007] Step S1: Obtain the fabric visual state data and fabric basic physical state data of the target detection area. The fabric basic physical state data includes micro vibration state parameters and surface temperature distribution parameters.

[0008] Step S2: Input the fabric visual state data into a preset fabric defect detection neural network model for analysis, output the defect judgment confidence value, and judge the defect judgment confidence value by combining the preset judgment conditions and the preset defect judgment confidence threshold to generate an initial defect judgment result.

[0009] Step S3: Compare the micro-vibration state parameters with preset micro-vibration values ​​to obtain the spectral deviation, and compare the spectral deviation with a preset first threshold to obtain a first comparison result;

[0010] Step S4: Compare the surface temperature distribution parameters with the preset surface temperature values ​​to obtain abnormal temperature gradient values, and compare the abnormal temperature gradient values ​​with the preset second threshold to obtain a second comparison result;

[0011] Step S5: Match the first comparison result and the second comparison result with the preset judgment rules to determine the fabric environment coupling state type;

[0012] Step S6: Based on the fabric environment coupling state type, the defect judgment confidence threshold is corrected to generate a corrected defect judgment confidence threshold. The defect judgment confidence value is compared with the corrected defect judgment confidence threshold to obtain the corrected defect judgment result.

[0013] Step S7: Obtain the final defect determination result based on the initial defect determination result and the corrected defect determination result.

[0014] Preferably, step S2 further includes the following steps:

[0015] The visual state data of the fabric is preprocessed to form preprocessed image data;

[0016] The target detection region and abnormal texture region are identified in the preprocessed image data to form preliminary visual feature information;

[0017] The preliminary visual feature information is quantized to form a set of feature vectors;

[0018] The set of feature vectors is input into the fabric defect detection neural network model for analysis, and the defect judgment confidence value is output.

[0019] Preferably, obtaining the spectral deviation in step S3 includes the following steps:

[0020] The microscopic vibration state parameters are preprocessed to obtain vibration time series data;

[0021] The vibration time series data and the preset micro vibration values ​​are subjected to fast Fourier transform to obtain the actual vibration power spectral density curve and the reference vibration power spectral density curve.

[0022] The actual vibration power spectral density curve and the reference vibration power spectral density curve are divided into several frequency bands according to a preset frequency range. The amplitude difference of each frequency band is calculated to obtain the vibration deviation value of each frequency band.

[0023] The vibration deviation values ​​of each frequency band are weighted and summed to obtain the spectral deviation.

[0024] Preferably, the weighted summation process includes the following steps:

[0025] Based on the vibration frequency band feature database, the preset weights corresponding to the vibration deviation values ​​of each frequency band are obtained, and a particle swarm optimization algorithm model with the coupling sensitivity factor of the loom working condition as the optimization objective is constructed.

[0026] The preset weights are input into the particle swarm optimization algorithm model, the output optimization weights are iteratively updated, and the vibration deviation values ​​of each frequency band are weighted and summed with the corresponding optimization weights to obtain the spectral deviation.

[0027] Preferably, the fitness function of the particle swarm optimization algorithm model is:

[0028] ;

[0029] in, For the coupling sensitivity factor of loom operating conditions; The number of key vibration frequency bands; For the first Prior importance coefficients for each frequency band when distinguishing between environmental vibration and defect vibration; In the first The number of data points sampled within each frequency band; Let be the vibration power spectral density value of the fabric sample containing known welts at the j-th sampling point in the i-th frequency band; and These are the mean and standard deviation of the vibration power spectral density values ​​of a normal fabric under various stable operating conditions at the j-th sampling point in the i-th frequency band, respectively. The weighting coefficients for the sudden vibration components; In the first Peak frequency of sudden vibrations detected within a time window; For the corresponding number The fundamental vibration frequency within a time window.

[0030] Preferably, the neural network-based textile defect detection method provided by the present invention further includes material damping correction processing of the fitness function of the particle swarm optimization algorithm model:

[0031] ;

[0032] ;

[0033] in, , All are balanced weights, and ; For material damping adaptation correction; The number of low-frequency resonance peaks used for evaluation; For the current batch of fabrics being tested, in the [number]th [year]... Measured damping ratio at each characteristic resonance peak; The calibration sample set used for model training is in the first... The average damping ratio at each characteristic resonance peak.

[0034] Preferably, obtaining the temperature gradient outlier in step S4 includes the following steps:

[0035] The surface temperature distribution parameters are preprocessed to obtain temperature distribution data;

[0036] The temperature distribution data is compared point by point with the preset surface temperature value to calculate the temperature deviation at each corresponding location, and a temperature gradient outlier matrix is ​​formed based on the spatial relationship.

[0037] Statistical analysis is performed on the outliers in the temperature gradient outlier matrix to obtain the temperature gradient outliers.

[0038] Preferably, the step S6 of correcting the defect determination confidence threshold includes the following steps:

[0039] Based on the fabric environment coupling state type, a corresponding threshold correction rule is determined from a preset threshold correction rule set;

[0040] The confidence threshold for defect determination is adjusted according to the threshold correction rule to generate a corrected confidence threshold for defect determination.

[0041] Preferably, the fabric environment coupling state type includes stable working condition, vibration disturbance working condition, temperature disturbance working condition, and combined disturbance working condition.

[0042] The threshold correction rules include threshold direction adjustment and threshold magnitude adjustment.

[0043] The present invention has the following advantages and effects compared with the prior art:

[0044] (1) The textile fabric defect detection method based on neural network provided by the present invention can simultaneously acquire the visual state data of the fabric and the physical state parameters of vibration and temperature reflecting the production environment during the continuous production process of textile fabric. Based on the preset normal working condition reference spectrum and temperature field model, the intensity and coupling mode of the current environmental interference are analyzed. Thus, when performing image recognition and defect judgment analysis based on neural network on fabric images, the degree of interference that the current environmental state may cause to visual features can be accurately quantified. On this basis, by matching the dynamic correction rules between the coupling state type of the fabric environment and the confidence threshold required for image recognition judgment, the preliminary image recognition results of defects obtained from fabric image information are subject to feedback verification and correction of the real-time physical environment state. This avoids the problem of image recognition results being interfered with by environmental artifacts due to judgment based solely on static image features, reduces the false alarm probability caused by complex working conditions such as vibration and temperature difference, and improves the reliability and stability of textile fabric defect image recognition results in variable industrial environments.

[0045] (2) The textile fabric defect detection method based on neural network provided by the present invention executes an independent image recognition analysis path based on visual neural network and an adaptive threshold correction path based on physical state perception in parallel during the process of generating the final defect judgment result. The initial defect judgment result and the corrected defect judgment result are obtained. The two sets of results are logically compared and conflict adjudicated by a preset consistency verification rule. Thus, when making the final decision on the judgment with differences, the consistency and traceability of the decision logic can be ensured according to the verification rule. On this basis, the corrected defect judgment result after multimodal information fusion verification is forcibly adopted as the final output in the case of inconsistency. Finally, the image recognition decision is established on the dual constraints and closed-loop optimization of visual feature analysis and physical environment state perception. This avoids the occasional deviation of a single image recognition path or adaptive correction module from directly causing system misjudgment. A fault-tolerant decision mechanism with internal cross-validation capability is constructed to further improve the overall robustness and decision credibility of the automated detection system in long-term continuous operation. Attached Figure Description

[0046] The invention will now be further described with reference to the accompanying drawings.

[0047] Figure 1 This is a flowchart illustrating the neural network-based defect detection method for textile fabrics provided by the present invention. Detailed Implementation

[0048] To enable those skilled in the art to better understand the present invention, specific embodiments will now be described in further detail. It should be understood that the specific embodiments described herein are for illustrative and explanatory purposes only and are not intended to limit the scope of the invention.

[0049] In the embodiments of this invention, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0050] Example 1:

[0051] like Figure 1 As shown, this invention provides a method for detecting defects in textile fabrics based on neural networks, specifically including the following steps:

[0052] Step S1: Acquire the visual state data and basic physical state data of the fabric in the target detection area. The basic physical state data includes microscopic vibration parameters and surface temperature distribution parameters. Specifically, the target detection area refers to the specific physical region defined by the detection system on a continuously moving fabric, based on a preset field of view and detection cycle, and used for the current analysis. The fabric visual state data is digitized image data reflecting the optical properties of the target detection area surface, acquired through an optical imaging device. The microscopic vibration parameters are physical quantity data reflecting the mechanical vibration characteristics of the target detection area at a microscale, acquired through a vibration sensing device. The surface temperature distribution parameters are two-dimensional distribution data reflecting the temperature values ​​at various points on the surface of the target detection area, acquired through an infrared sensing device.

[0053] For example: When a fabric passes through a fixed inspection station at a constant speed, the inspection device deployed at that station first determines the real-time position of the fabric based on encoder signals, thereby defining the physical area corresponding to that position as the target inspection area. For this target inspection area, the inspection device simultaneously triggers its integrated two types of sensors to acquire data: A high-resolution industrial linear or area scan camera, under uniform and stable lighting, acquires digital images reflecting the fabric's surface texture, color, and structure, serving as visual state data; simultaneously, a non-contact laser Doppler vibration meter, aligned with the center point of the area, acquires time-domain or frequency-domain signals reflecting the minute vibrations of the fabric caused by mechanical transmission, ambient airflow, etc., serving as microscopic vibration state parameters; and an infrared thermal imager scans the area to obtain an infrared image reflecting its surface thermal radiation distribution, which, after temperature calibration, is converted into a two-dimensional temperature matrix, serving as surface temperature distribution parameters. The inspection device controls the acquisition actions of all sensors to be synchronized using a unified time base signal, ensuring that the obtained multimodal data strictly corresponds to the fabric state at the same time and physical location.

[0054] Understandably, by simultaneously capturing the fabric's appearance image, microscopic vibration spectrum, and surface temperature field in a single detection event, a multi-source information source that is fully aligned in time and space is provided for subsequent analysis. This breaks through the limitations of traditional detection that relies solely on a single visual dimension, enabling the system to perceive the fabric's real-time working condition more comprehensively from physical aspects such as mechanical vibration and thermal states. This lays a crucial data fusion foundation for accurately distinguishing between real defects and environmental interference.

[0055] Step S2: Input the fabric visual state data into the preset fabric defect detection neural network model for analysis, output the defect judgment confidence value, and judge the defect judgment confidence value by combining the preset judgment conditions and the preset defect judgment confidence threshold to generate the initial defect judgment result.

[0056] Furthermore, step S2 specifically includes the following steps:

[0057] Image preprocessing is performed on the visual state data of the fabric, including denoising, brightness equalization and texture enhancement, to form preprocessed image data;

[0058] Identify target detection regions and abnormal texture regions in preprocessed image data to form preliminary visual feature information;

[0059] The preliminary visual feature information is quantized, including texture intensity, edge density and local contrast, to form a set of feature vectors;

[0060] The feature vector set is input into the fabric defect detection neural network model for analysis, and the defect judgment confidence value is output.

[0061] Subsequently, by comparing the defect judgment confidence value with the preset defect judgment confidence threshold and combining it with preset judgment conditions, the preset judgment conditions are used to determine whether there are defects in the target detection area based on the confidence value. At the same time, preliminary visual feature information can be selectively combined for auxiliary judgment to generate an initial defect judgment result.

[0062] Furthermore, the aforementioned preset judgment conditions include a confidence threshold range for defect judgment and auxiliary judgment rules based on preliminary visual feature information. Specifically, the confidence value for defect judgment is analyzed to determine whether it falls within the confidence threshold range. When the confidence value meets the threshold range, a defect is confirmed to exist in the corresponding area; otherwise, it is determined that no defect exists.

[0063] In addition, the auxiliary judgment rules specifically include using preliminary visual feature information to weight the target detection area when the judgment result is uncertain or close to the threshold boundary, so as to help generate an initial defect judgment result. The preliminary visual feature information includes texture intensity, edge density and local contrast.

[0064] It should be noted that the preset fabric defect detection neural network model specifically refers to a deep learning model that has been trained and optimized using a large number of normal fabric samples and various defective fabric samples. It can output a probability value representing the possibility of a defect based on the input feature vector. This neural network is a deep convolutional neural network (CNN). The defect judgment confidence value refers to the probability value output by the neural network model. The preset defect judgment confidence threshold is a core numerical threshold included in the preset judgment conditions. The preset judgment conditions refer to the set of logical rules and threshold parameters used to convert the probability value into a binary judgment conclusion (the presence or absence of a defect). The aforementioned feature vector refers to a data structure formed by sequentially combining the three scalar values ​​of texture intensity, edge density, and local contrast in the same region. The feature vector set refers to the set composed of feature vectors from all abnormal texture regions. The confidence threshold range refers to the critical interval of the confidence value used for defect judgment. The auxiliary judgment rule refers to the optional rule used to combine preliminary visual feature information to weight the target detection area to assist in generating the judgment when the judgment result is uncertain. The fuzzy interval refers to a preset range around the preset defect judgment confidence threshold. When the confidence value falls within this interval, the judgment result is considered uncertain.

[0065] The initial defect judgment result is a preliminary conclusion about whether there are defects in the target detection area, generated solely based on the fabric visual state data and preset judgment conditions, without considering the basic physical state data of the fabric.

[0066] For example: First, a Gaussian filter is used to denoise the fabric visual state data to eliminate random noise, and a histogram equalization algorithm is applied to achieve brightness equalization to eliminate the influence of uneven illumination. Second, a Gabor filter bank is used for texture enhancement to highlight potential abnormal texture structures, ultimately forming higher-quality preprocessed image data. Next, in the preprocessed image data, the detection device accurately identifies the boundary of the target detection area through an image segmentation algorithm, and uses edge detection or local texture analysis algorithms to mark local blocks within the area whose texture patterns differ significantly from the surrounding background. These blocks are defined as abnormal texture areas, and their position and shape information are extracted to form preliminary visual feature information. Subsequently, for each identified abnormal texture area, the detection device sequentially performs feature quantization to generate its feature vector. First, the texture intensity of the area is obtained by generating the gray-level co-occurrence matrix of the area and calculating its contrast. Next, the Canny edge detection operator is applied to the area, and the proportion of its internal edge pixels to the total pixels of the area is calculated to obtain the edge density of the area. Then, the difference between the average gray level of the area and the average gray level of its immediate neighbors is calculated to obtain the local contrast of the area. Finally, the three scalar values ​​of texture intensity, edge density, and local contrast are combined to form a multidimensional feature vector that characterizes the features of the region; the feature vectors corresponding to all abnormal texture regions together form the feature vector set input to the neural network.

[0067] The detection device inputs a set of feature vectors into the network, which processes them sequentially: the input data first passes through a convolutional layer to extract features and generate a feature map; this feature map is then downsampled by a pooling layer to reduce its dimensionality; subsequently, the data flows through a second convolutional layer and a pooling layer for deep feature abstraction; then, the extracted high-dimensional features are flattened into a one-dimensional vector; this vector is then passed through a fully connected layer for high-order combination and non-linear mapping; finally, the output layer is normalized using the sigmoid function, outputting a defect judgment confidence value between 0 and 1; at this point, the detection device compares the defect judgment confidence value with a preset defect judgment confidence value. A threshold (e.g., 0.75, which is derived from an empirical value and will not be elaborated further) is used for comparison. If the value is greater than or equal to the threshold, an initial defect judgment result of "defect exists" is directly generated. If it is lower than the threshold, an initial judgment result of "no defect exists" is generated. During this process, if the confidence value is within a preset fuzzy range around the threshold (e.g., 0.70-0.80), the detection device can selectively activate auxiliary judgment rules, that is, call the preliminary visual feature information such as texture intensity and edge density corresponding to the region for comprehensive weighted evaluation to help determine the final initial judgment result.

[0068] It should be noted that: through standardized image preprocessing and feature engineering, the original image is transformed into high-dimensional features suitable for neural network processing; by introducing a specific deep convolutional neural network model, its powerful spatial feature extraction and pattern recognition capabilities are utilized to achieve automated and intelligent preliminary screening and probabilistic expression of defect features; finally, through preset judgment logic, the probability output is transformed into a clear preliminary judgment conclusion.

[0069] Step S3: Compare the micro-vibration state parameters with the preset micro-vibration values ​​to obtain the spectral deviation, and compare the spectral deviation with the preset first threshold to obtain the first comparison result; it should be noted that the preset first threshold is a value calculated based on a large amount of data experience, which will not be elaborated here.

[0070] Furthermore, obtaining the spectral deviation in step S3 includes the following steps:

[0071] The micro-vibration state parameters are preprocessed, including denoising, filtering and smoothing, to obtain stable vibration time series data;

[0072] The processed vibration time series data and the preset micro vibration values ​​are subjected to Fast Fourier Transform (FFT) to obtain the actual vibration power spectral density curve and the reference vibration power spectral density curve.

[0073] The actual vibration power spectral density curve and the reference vibration power spectral density curve are divided into several frequency bands according to a preset frequency range. The amplitude difference of each frequency band is calculated to obtain the vibration deviation value of each frequency band.

[0074] The vibration deviation values ​​of each frequency band are weighted and summed to obtain the spectral deviation.

[0075] It should be noted that the preset micro-vibration values ​​refer to reference data pre-collected and stored under standard stable operating conditions to characterize the typical vibration state of defect-free fabrics in a normal production environment. These data are represented as a reference vibration time series or a reference power spectrum. The spectral deviation is a scalar value used to quantify the overall difference in frequency domain characteristics between the currently collected micro-vibration state parameters and the preset micro-vibration values. The preset first threshold is a pre-set numerical threshold used to determine whether the spectral deviation constitutes a significant anomaly.

[0076] Furthermore, the first comparison result refers to the binary conclusion (e.g., "normal vibration" or "abnormal vibration") drawn by comparing the spectral deviation with a preset first threshold; vibration time series data refers to a stable time series signal obtained after denoising, filtering, and smoothing the original microscopic vibration state parameters; Fast Fourier Transform (FFT) is an algorithm for converting time-domain signals to the frequency domain; power spectral density curve refers to the distribution curve of signal power in the frequency domain; frequency range refers to the frequency band range preset for analysis; frequency band refers to a specific frequency range after the power spectral density curve is divided; vibration deviation value refers to the difference between the average amplitude of the actual vibration signal power spectral density curve and the average amplitude of the reference vibration power spectral density curve within a certain frequency band.

[0077] For example: The detection device first uses a medium-range filter to remove impulse noise from the original micro-vibration state parameters collected from the target detection area, and uses a bandpass filter to filter out power frequency interference and irrelevant high-frequency components. Then, it uses a moving average method to smooth the signal, thereby obtaining a stable vibration time series data. Next, it performs Fast Fourier Transform (FFT) on this processed vibration time series data and the preset micro-vibration values ​​(i.e., the reference time series) to transform them to the frequency domain, thereby obtaining the actual vibration power spectral density curve and the reference vibration power spectral density curve of the current signal, respectively.

[0078] Subsequently, the detection device divides the two power spectral density curves into several continuous frequency bands according to a pre-set frequency range (e.g., 0-50Hz, 50-150Hz, 150-500Hz). For each frequency band, the absolute or relative difference between the average amplitude of the actual power spectral density curve and the average amplitude of the reference power spectral density curve within that frequency band is calculated, and this is used as the vibration deviation value for that frequency band.

[0079] Then, based on the contribution of each frequency band to characterizing external vibration interference, a preset weighting coefficient is assigned to the vibration deviation value of each frequency band. The weighted deviation values ​​of all frequency bands are summed to calculate a comprehensive, scalarized overall spectral deviation.

[0080] For each frequency band, calculate the average amplitude of the actual vibration power spectral density curve within that band. Average amplitude of the reference vibration power spectral density curve relative deviation between The calculation formula is: Subsequently, based on the pre-calibrated set of weighting coefficients reflecting the corresponding frequency bands, the weighting coefficients were determined experimentally. The overall spectral deviation is calculated by weighted summation of the vibration deviation values ​​across all frequency bands. The calculation formula is: ,in For frequency band index, and .

[0081] Finally, the detection device directly compares the calculated overall spectral deviation with a preset first threshold: if the spectral deviation is greater than or equal to the first threshold, a first comparison result indicating "abnormal vibration" is generated; if the spectral deviation is less than the first threshold, a first comparison result indicating "normal vibration" is generated.

[0082] It is understandable that by analyzing the frequency domain and quantizing the characteristics of micro-vibration signals, the time-domain vibration signals, which are difficult to interpret directly, can be converted into an indicator (spectral deviation) that can objectively reflect the intensity of environmental mechanical interference.

[0083] Furthermore, the above weighted summation process also includes the following steps:

[0084] Based on the vibration frequency band feature database, the preset weights corresponding to the vibration deviation values ​​of each frequency band are obtained. A particle swarm optimization algorithm model with the coupling sensitivity factor of the loom working condition as the optimization objective is constructed. The preset weights assigned to each frequency band are optimized through the particle swarm optimization algorithm model.

[0085] The preset weights are input into the particle swarm optimization algorithm model, the output optimization weights are iteratively updated, and the vibration deviation values ​​of each frequency band are weighted and summed with the corresponding optimization weights to obtain the spectral deviation.

[0086] It should be noted that the preset weights refer to the coefficients that are pre-assigned to the vibration deviation values ​​of different frequency bands and reflect their importance, while the weighted summation refers to the calculation method of multiplying the vibration deviation values ​​of each frequency band by their corresponding weights and then summing them.

[0087] Specifically, in this embodiment, the specific steps for iteratively updating the output optimization weights using the particle swarm optimization algorithm model are as follows:

[0088] Initialize a particle swarm, where the position vector of each particle represents a set of preset weight allocation schemes for each vibration frequency band;

[0089] For each particle, the weighted sum of the preset weights it represents is calculated to determine its fitness value on the historical dataset, which contains vibration signal samples labeled with environmental vibration disturbance type and defect type.

[0090] Update the individual particle's historical best position and the group's global best position based on the fitness value;

[0091] Iteratively update the particle's velocity and position until the convergence condition is met or the maximum number of iterations is reached;

[0092] The weight allocation scheme represented by the global optimal position of the group is used as the updated optimized weight scheme and applied to online detection.

[0093] In the actual production environment of a textile factory, typical loom vibration interference mainly originates from the following aspects. These vibrations are transmitted to the fabric surface in the detection area through the frame, guide rails, or air (e.g., periodic vibration of the spindle rotation and impact vibration of the weft insertion mechanism). Among them, the periodic vibration of the spindle rotation is a periodic forced vibration caused by bearing wear, shaft imbalance, or poor coupling alignment when the loom spindle rotates at high speed. Typical characteristics include: stable frequency (e.g., a main frequency of 1500 rpm corresponds to 25 Hz, and its second harmonic is 50 Hz, third harmonic is 75 Hz, etc.) and obvious spectral peaks on the spectrum diagram, with the vibration amplitude increasing with the rotational speed. Furthermore, the main motor is the driving force for the entire loom (including the spindle). Each rotation of the motor rotor generates a periodic excitation due to electromagnetic force imbalance, mechanical eccentricity, etc. The frequency of this excitation is the "fundamental frequency of the main motor" (calculated as: motor speed (RPM) / 60). This excitation is directly transmitted to the spindle through couplings, gears, and other transmission components, thereby forcing the spindle to produce forced vibration at the same frequency. Therefore, the fundamental frequency of the main motor is also an important cause of the periodic vibration of the spindle rotation. When performing a frequency spectrum analysis (FFT) on the spindle vibration signal, the most intuitive manifestation of the periodic vibration of the spindle rotation on the spectrum is: a prominent peak appears at the fundamental frequency of the main motor, and a series of regular harmonics appear at integer multiples of the fundamental frequency (such as 2nd harmonic, 3rd harmonic, etc.). This is because the nonlinearity of the mechanical system amplifies and generates harmonics. The impact vibration mechanism of the weft-feeding mechanism is the instantaneous impact generated at the end of each weft-feeding action by the rapier, air jet, or water jet weft-feeding mechanism. For example, the typical characteristics of the periodic impact of the weft-feeding shaft are mainly three aspects: firstly, a wideband impact response (frequency range typically 50-500Hz); secondly, a pulse-like time-domain waveform with a repetition frequency consistent with the weft-feeding frequency; and thirdly, multiple harmonic components in the power spectrum.

[0094] Understandably, before performing the crucial weighted summation process, an optimization step is embedded—that is, dynamically optimizing the "preset weights" using the particle swarm optimization algorithm. This is an improvement over the traditional method of setting static parameters "according to preset weights." By optimizing the core parameters (weights) of vibration analysis, the accuracy and robustness of the "vibration analysis" front-end sensing module are essentially improved. The more accurate the front-end sensing, the more reliable the environmental state judgment (step S5), and the more precise the threshold correction (step S6), thus ultimately forming a positive feedback loop of "sensing optimization." For example, if the vibration analysis mistakenly identifies normal loom vibration as abnormal, it will lead the system to misjudge it as a "vibration interference condition," thereby incorrectly raising the detection threshold (potentially missing real defects). Therefore, the above operation reduces such misjudgments by optimizing the weights.

[0095] Specifically, in this embodiment, the fitness function of the particle swarm optimization (PSO) model aims to optimize the overall spectral deviation's ability to distinguish between the subtle abnormal vibrations caused by actual defects under typical loom vibration disturbance conditions (loom condition coupling sensitivity factor). The fitness function of the particle swarm optimization model is as follows:

[0096] ;

[0097] in, For the coupling sensitivity factor of loom operating conditions; The number of key vibration frequency bands; For the first Prior importance coefficients for each frequency band when distinguishing between environmental vibration and defect vibration; In the first The number of data points sampled within each frequency band; Let be the vibration power spectral density value of the fabric sample containing known welts at the j-th sampling point in the i-th frequency band; and These are the mean and standard deviation of the vibration power spectral density values ​​of a normal fabric under various stable operating conditions at the j-th sampling point in the i-th frequency band, respectively. The weighting coefficients for the sudden vibration components; In the first Peak frequency of sudden vibrations detected within a time window; For the corresponding number The fundamental vibration frequency within a time window.

[0098] To verify the improved discrimination performance and effectiveness after weight allocation optimization, the inventors collected relevant test sample data to generate a comparative data list, which includes simulated real-world working condition data. This list demonstrates how the optimized weight allocation scheme effectively improves the discrimination performance of "overall spectral deviation" (i.e., increases the detection rate of real defects while suppressing false alarms of ordinary environmental vibrations) under different loom vibration modes and fabric materials. See Table 1 below for details:

[0099] Table 1. Comparison of defect detection and discrimination performance before and after weight allocation optimization in different scenarios. Serial Number Application scenario description Key vibration interference sources Weights before optimization (preset fixed values) PSO-optimized weights (example) Performance before optimization: Detection rate / False alarm rate Optimized performance: Detection rate / False alarm rate 1 High-speed weft insertion section of loom Harmonics at the main motor's fundamental frequency (50Hz) and high-frequency impacts on the rapier shaft (>200Hz). Uniform weighting: Low frequency (0-50Hz): 0.3, Mid frequency (50-150Hz): 0.3, High frequency (>150Hz): 0.4 Adaptive weights: Low frequency: 0.15, Mid frequency: 0.25, High frequency: 0.60 92.5% / 18.3% 95.8% / 7.2% 2 Air-jet loom beat-up area Periodic impact of weft shaft (main frequency ~8Hz), vibration transmitted from the workshop floor (15-30Hz). Empirical weighting: Low frequency: 0.5, Mid frequency: 0.3, High frequency: 0.2 Adaptive weights: Low frequency: 0.40, Mid frequency: 0.45, High frequency: 0.15 88.0% / 22.5% 93.2% / 9.8%

[0100] Table 1 above shows a comparison of key performance indicators before and after optimization using the Particle Swarm Optimization (PSO) model under two typical spinning / weaving scenarios (accompanied by periodic vibration of the spindle rotation and impact vibration of the weft insertion mechanism, i.e., periodic impact of the weft insertion shaft). Clearly, in Experiment 1, the optimized algorithm model successfully suppressed strong low-frequency fundamental interference, focusing weights on the high-frequency impact segment that better characterizes weft insertion component anomalies (such as scissor wear), significantly reducing false alarms. In Experiment 2, the optimized algorithm model enhanced sensitivity to weft insertion impact anomalies (manifested as mid-frequency energy changes) while reducing attention to non-critical high-frequency noise, resulting in improved overall performance.

[0101] It is understandable that the fitness function of the above particle swarm optimization algorithm model includes vibrational spectrum data. This also implicitly includes information about the fabric sample (defects vs. normal), while also considering sudden changes in the time dimension. This paper proposes a fitness function that associates "vibration spectrum characteristics" with "the ability to distinguish between environmental disturbances and real defects." Optimizing the weights essentially maximizes the effectiveness of this fitness function. Compared to traditional linear combination weighted summation, by introducing nonlinear factors such as variance comparison and peak analysis, it can more precisely consider complex operating conditions in quantitative calculations.

[0102] Step S4: Compare the surface temperature distribution parameters with the preset surface temperature values ​​to obtain the abnormal temperature gradient values, and compare the abnormal temperature gradient values ​​with the preset second threshold to obtain the second comparison result; it should be noted that the preset second threshold is a value calculated based on a large amount of data experience, which will not be elaborated here.

[0103] Furthermore, the acquisition of temperature gradient outliers in step S4 specifically includes the following steps:

[0104] The surface temperature distribution parameters are preprocessed, including noise reduction, smoothing, and outlier filtering, to obtain stable temperature distribution data.

[0105] The temperature distribution data is compared point by point with the preset surface temperature values ​​to calculate the temperature deviation at each corresponding location, and a temperature gradient outlier matrix is ​​formed based on the spatial relationship.

[0106] Statistical analysis is performed on the outliers in the temperature gradient outlier matrix to obtain the average outlier within the region, thus obtaining the temperature gradient outlier values.

[0107] It should be noted that the preset surface temperature value specifically refers to reference data pre-collected and stored under standard stable operating conditions to characterize the typical surface temperature distribution of defect-free fabrics in a normal production environment. It is represented as a reference temperature matrix corresponding to the spatial location of the target detection area. The temperature gradient outlier is an indicator used to quantify the degree of temperature difference between the currently collected surface temperature distribution parameters and the preset surface temperature value at various points in space and overall. It can be represented as a matrix reflecting point-by-point deviations or as a scalar value summarizing the overall anomaly level (i.e., the overall temperature gradient outlier). The preset second threshold is a pre-set numerical threshold used to determine whether a temperature gradient anomaly constitutes a significant anomaly.

[0108] Furthermore, the second comparison result refers to a binary conclusion (e.g., "normal temperature distribution" or "abnormal temperature distribution") drawn by comparing the overall temperature gradient anomaly with a preset second threshold; the temperature distribution data refers to a stable two-dimensional temperature matrix obtained after denoising, smoothing, and filtering out anomalies from the original surface temperature distribution parameters; spatial alignment refers to the operation of registering the temperature distribution data with the preset surface temperature values ​​on spatial coordinates; point-by-point comparison refers to the operation of calculating the difference in temperature values ​​at each corresponding coordinate position in the two temperature matrices based on spatial alignment; the temperature gradient anomaly matrix refers to a matrix formed by the temperature differences at all coordinate positions according to their spatial relationships; statistical analysis refers to the method of summarizing and calculating the values ​​in the temperature gradient anomaly matrix; among them, the average anomaly refers to the average of the absolute values ​​of all differences in the temperature gradient anomaly matrix; the overall temperature gradient anomaly refers to a single scalar value that characterizes the degree of overall temperature anomaly in the region, obtained through statistical analysis.

[0109] For example, suppose the target detection area is a 10-pixel x 10-pixel square region, with a preset surface temperature value. (Reference matrix) This is a "standard temperature profile" of the region learned in advance under stable operating conditions without defects or disturbances. It may look like a very uniform matrix, for example, with values ​​around 25.0℃ at all locations, with slight fluctuations. This is a 10 x 10 reference temperature matrix (unit: °C), and its values ​​are generally close to 25.0:

[0110] ;

[0111] Current surface temperature distribution parameters (Current Matrix) This is the actual temperature data obtained by the infrared thermal imager scanning the same area at the current moment. If there is ambient airflow interference, the temperature on one side may be lower; if there is a local frictional heat source (suspected defect), the temperature at a certain point may be higher. This is a current temperature matrix (unit: °C) that is subject to disturbance, and its values ​​may be too low (due to cold air) or too high (due to defects or noise):

[0112] ;

[0113] Then, point-by-point comparisons are performed to form a temperature gradient outlier matrix, which is about to be... and After spatial alignment, calculate each corresponding coordinate. absolute temperature difference This yields a 10 x 10 temperature gradient outlier matrix. It visually demonstrates the degree of temperature "abnormality" at each point:

[0114] ;

[0115] ;

[0116] Finally, statistical analysis is performed to obtain the overall temperature gradient anomalies. The most common approach is to calculate the entire... The average value of all elements in the matrix, i.e., the overall temperature gradient outlier. equal matrix The average value of all elements is assumed to yield the temperature gradient anomaly after calculation. It is 1.2℃. The value of 1.2℃ is the final scalar value used for judgment, which summarizes the average level of deviation of the entire region from the "standard temperature profile," while assuming a preset second threshold. Using a value of 1.0℃, the calculated temperature gradient anomaly value will be... With the preset second threshold The comparison revealed a second result: "abnormal temperature distribution." This means that the overall temperature field on the fabric surface is significantly different from its normal state, possibly due to the influence of ambient hot air, cold airflow, or large-area abnormal heating.

[0117] For example: The detection device uses median filtering or Gaussian filtering algorithms to remove image noise, employs spatial smoothing algorithms to make the temperature field transition naturally, and identifies and filters out isolated extreme abnormal temperature points based on statistical methods, thereby obtaining a set of stable temperature distribution data. Next, the detection device spatially aligns and compares the processed temperature distribution data with preset surface temperature values ​​point by point, calculates the temperature difference at each corresponding coordinate position in the two matrices, and forms a temperature gradient outlier matrix based on the spatial coordinate relationship of all the temperature differences at all positions.

[0118] Subsequently, the detection device can select the maximum value among the absolute values ​​of all differences in the area as the maximum outlier, or calculate the average value of the absolute values ​​of all differences as the average outlier, or calculate a weighted average based on the preset weight of the sensitivity of each location to the thermal characterization of defects to obtain a weighted comprehensive outlier. This statistical value is a scalar that characterizes the overall temperature anomaly of the area, i.e., the overall temperature gradient outlier.

[0119] Finally, the detection device directly compares the calculated overall temperature gradient anomaly value with a preset second threshold: if the overall temperature gradient anomaly value is greater than or equal to the second threshold, a second comparison result indicating "abnormal temperature distribution" is generated; if the overall temperature gradient anomaly value is less than the second threshold, a second comparison result indicating "normal temperature distribution" is generated.

[0120] Understandably, by analyzing and quantifying the spatial distribution and differences of the temperature field on the fabric surface, objective monitoring of abnormal temperature changes caused by factors such as ambient airflow, local heat sources, or uneven thermal properties of the material itself is achieved. This provides another crucial dimension of physical sensing information for the system to determine whether the fabric is in a temperature-interference environment that may cause misjudgments in visual detection. Combined with vibration sensing, this forms the physical sensing basis for a comprehensive assessment of the environmental coupling state.

[0121] Step S5: Match the first comparison result and the second comparison result with the preset judgment rule to determine the fabric environment coupling state type; wherein, the preset judgment rule defines the fabric environment coupling state type corresponding to different logical combinations of the first comparison result and the second comparison result, and determines the state type corresponding to the matched logical combination as the fabric environment coupling state type of the current fabric.

[0122] It should be noted that the preset judgment rule is a predefined and stored set of logical rules used to map to a specific fabric environment coupling state type based on different logical combinations of the first comparison result and the second comparison result; the fabric environment coupling state type is a classification conclusion used to qualitatively describe the working condition category of the current target detection area, which integrates the effects of mechanical vibration and thermal environment; the logical combination refers to a specific pairing situation formed by the first comparison result and the second comparison result.

[0123] For example, the detection device has a pre-stored rule base containing various logical combinations and their corresponding state types. This rule base defines, for instance: when the first comparison result is "normal vibration" and the second comparison result is "normal temperature distribution," the corresponding fabric environment coupling state type is "stable condition"; when the first comparison result is "abnormal vibration" and the second comparison result is "normal temperature distribution," the corresponding state type is "vibration disturbance condition"; when the first comparison result is "normal vibration" and the second comparison result is "abnormal temperature distribution," the corresponding state type is "temperature disturbance condition"; and when both the first and second comparison results are "abnormal," the corresponding state type is "composite disturbance condition." During the judgment process, the detection device obtains the first and second comparison results and matches this result combination with each logical condition in the pre-set rule base. When a completely matching logical combination is found, the detection device determines that the fabric environment coupling state type of the current fabric is the type pre-set for that combination.

[0124] Understandably, this step fuses and logically integrates the two independent physical perception results (vibration state and temperature state) to generate a comprehensive qualitative judgment of the environmental state. This marks the system's transition from the "multi-dimensional physical quantity perception" stage to the "environmental state understanding" stage, providing a direct and high-level decision-making basis for subsequent targeted adjustments to the visual detection strategy (i.e., adaptive threshold correction).

[0125] Step S6: Based on the fabric environment coupling state type, the defect judgment confidence threshold is corrected to generate an updated corrected defect judgment confidence threshold. The defect judgment confidence value is compared with the corrected defect judgment confidence threshold to obtain the corrected defect judgment result. That is, when the defect judgment confidence value meets the corrected defect judgment confidence threshold, it is confirmed that there is a defect in the target detection area; otherwise, it is confirmed that there is no defect in the target detection area, thus obtaining the corrected defect judgment result.

[0126] Furthermore, step S6, which modifies the confidence threshold for defect determination, includes the following steps: determining the threshold correction rule corresponding to the fabric environment coupling state type from a preset set of threshold correction rules based on the fabric environment coupling state type; adjusting the confidence threshold for defect determination according to the threshold correction rule to generate a modified confidence threshold for defect determination.

[0127] Specifically, the threshold correction rules include threshold direction adjustment and threshold magnitude adjustment, which are used to limit the adjustment direction and adjustment range of the defect determination confidence threshold.

[0128] It should be noted that the threshold correction rule set is a predefined and stored rule base, in which a specific threshold correction rule is associated with each possible fabric environment coupling state type. The threshold correction rule is used to explicitly specify the calculation method or parameters for adjusting the defect determination confidence threshold. It at least defines the adjustment direction (e.g., increasing or decreasing the threshold) and the allowed adjustment range (e.g., increasing by 0.05 to 0.15 or decreasing by 0.02 to 0.10 based on the original threshold). The adjustment direction refers to whether the defect determination confidence threshold is increased or decreased as specified in the threshold correction rule. The adjustment range refers to the specific numerical range for adjusting the defect determination confidence threshold as specified in the threshold correction rule.

[0129] For example: The detection device first searches and matches a preset set of threshold correction rules based on the current coupling state type of the fabric environment. The rule set contains correction rules that correspond one-to-one with different state types. For example, if the state type is "stable condition", the associated rule may be "keep the threshold unchanged" or "fluctuate within a very small range (such as ±0.02) on the basis of the original threshold"; if the state type is "vibration disturbance condition", the associated rule may be "increase the threshold by 0.08 to 0.12"; if the state type is "temperature disturbance condition", the associated rule may be "increase the threshold by 0.05 to 0.08"; if the state type is "compound disturbance condition", the associated rule may be "increase the threshold by 0.10 to 0.15".

[0130] After selecting a matching threshold correction rule, the detection device adjusts the original defect judgment confidence threshold (e.g., 0.75) according to the adjustment direction and amplitude range defined by the rule, thereby generating an updated corrected defect judgment confidence threshold (e.g., under "vibration interference conditions," the threshold may be increased to 0.85). Subsequently, the detection device compares the defect judgment confidence value corresponding to the same target detection area, output by the neural network in step two, with this updated threshold. If the confidence value is greater than or equal to the updated threshold, a defect is confirmed to exist in the target detection area, resulting in a corrected defect judgment result of "defect exists"; if the confidence value is less than the updated threshold, a defect is confirmed to not exist in the target detection area, resulting in a corrected defect judgment result of "no defect exists."

[0131] It is understandable that by mapping the macroscopic qualitative judgment of the environmental state (the type of coupling state of the fabric environment) to the specific adjustment of the detection sensitivity (confidence threshold correction), the dynamic response of the detection standard to environmental interference is realized.

[0132] Step S7: Obtain the final defect judgment result based on the initial defect judgment result and the corrected defect judgment result. Specifically, in this embodiment, the initial defect judgment result and the corrected defect judgment result are checked for consistency. When the initial defect judgment result and the corrected defect judgment result are inconsistent, the corrected defect judgment result is used as the final defect judgment result for fabric defect detection corresponding to the target detection area. The final defect judgment result includes at least a binary judgment conclusion indicating whether there is a defect in the target detection area, and a defect judgment confidence value corresponding to the binary judgment conclusion.

[0133] It should be noted that consistency verification refers to the logical process of comparing two results from different decision paths generated in the same target detection area to determine whether their core conclusions conflict; binary decision conclusion refers to a logical judgment result with only two mutually exclusive states, which in this embodiment specifically refers to the conclusion that the target detection area "has defects" or "does not have defects".

[0134] For example: The detection device first acquires an initial defect judgment result and a revised defect judgment result, both corresponding to the same target detection area. Then, the detection device extracts the binary judgment conclusions from these two results and compares them, that is, it determines whether the two conclusions regarding "whether a defect exists" in the area are the same. If the comparison results are the same (e.g., both are "a defect exists"), it indicates that the two judgment paths have consistent conclusions, and the detection device directly outputs the initial defect judgment result as the final defect judgment result for fabric defect detection. If the comparison results are different (i.e., one is "a defect exists" while the other is "no defect exists"), it indicates that the conclusions conflict, and the detection device adopts the revised defect judgment result as the final defect judgment result for fabric defect detection. In either case, when outputting the fabric defect detection result, the detection device simultaneously records and outputs the corresponding defect judgment confidence value.

[0135] Example 2:

[0136] Embodiment 2 of the present invention is based on the neural network-based textile fabric defect detection method provided in Embodiment 1 above, and further improves upon it. The contents that are the same as those in Embodiment 1 will not be described in detail here.

[0137] Considering that only the loom operating condition coupling sensitivity factor is applied in Example 1 As the sole fitness function, the inherent damping characteristics of different batches of fabric materials differ in practical applications (the damping characteristics of cotton, polyester, and blended fabrics differ greatly), which will also affect the detection and discrimination results. This is the problem of "difference in material damping characteristics". If the sensitivity factor coupled with the loom operating conditions is used as the sole fitness function, the overall generalization will be insufficient. In particular, there are potential defects and risks of failure when applied across batches and materials. Therefore, this embodiment introduces and adds material damping influencing factors.

[0138] Specifically, the neural network-based textile defect detection method provided in this embodiment further includes material damping correction processing of the fitness function of the particle swarm optimization algorithm model:

[0139] ;

[0140] ;

[0141] in, , All are balanced weights, and ; For material damping adaptation correction; The number of low-frequency resonance peaks used for evaluation; For the current batch of fabrics being tested, in the [number]th [year]... Measured damping ratio at each characteristic resonance peak; The calibration sample set used for model training is in the first... The average damping ratio at each characteristic resonance peak.

[0142] It is understandable that a material damping adaptation correction term is introduced. This allows the optimized weighting scheme to adapt to the energy dissipation characteristics of the current fabric material, reducing misjudgments of spectral deviation caused by material variations. For example, for thick fabrics with high damping, the weighting of low-frequency vibrations may be reduced; for thin fabrics with low damping, the sensitivity to high-frequency micro-vibrations may be increased.

[0143] In addition, the balancing weight and Its function is to adjust the relative importance of the loom operating condition coupling sensitivity factor and the material damping adaptation correction term in the fitness calculation. A larger value (close to 1) indicates that the optimization process focuses more on the coupling relationship between the loom's operating conditions and fabric vibration, making it suitable for production environments with relatively stable material damping characteristics; if A larger value (close to 1) emphasizes the consistency between the current fabric material and the damping characteristics of the calibration sample, and is suitable for scenarios where there are large differences between batches of materials.

[0144] In practical applications, and The value of can be determined based on the following experience or experiments: When the material consistency is high: if the damping characteristics of different batches of fabric change little, it can be set to . =0.8, =0.2, with the operating condition coupling sensitivity factor as the dominant factor. When there are significant material differences: if the fabric raw materials have diverse sources and significant damping fluctuations, a setting can be made... =0.5, =0.5, or even >0.5, to enhance adaptability to material properties.

[0145] In summary, the neural network-based textile defect detection method provided by this invention can avoid the problem of environmental artifacts interfering with the recognition results caused by making judgments based solely on static image features, reduce the probability of false alarms caused by complex working conditions such as vibration and temperature differences, and improve the reliability and stability of textile defect detection results in variable industrial environments.

[0146] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for detecting defects in textile fabrics based on neural networks, characterized in that: Includes the following steps: Step S1: Obtain the fabric visual state data and fabric basic physical state data of the target detection area. The fabric basic physical state data includes micro vibration state parameters and surface temperature distribution parameters. Step S2: Input the fabric visual state data into a preset fabric defect detection neural network model for analysis, output the defect judgment confidence value, and judge the defect judgment confidence value by combining the preset judgment conditions and the preset defect judgment confidence threshold to generate an initial defect judgment result. Step S3: Compare the micro-vibration state parameters with preset micro-vibration values ​​to obtain the spectral deviation, and compare the spectral deviation with a preset first threshold to obtain a first comparison result; Step S4: Compare the surface temperature distribution parameters with the preset surface temperature values ​​to obtain abnormal temperature gradient values, and compare the abnormal temperature gradient values ​​with the preset second threshold to obtain a second comparison result; Step S5: Match the first comparison result and the second comparison result with the preset judgment rules to determine the fabric environment coupling state type; Step S6: Based on the fabric environment coupling state type, the defect judgment confidence threshold is corrected to generate a corrected defect judgment confidence threshold. The defect judgment confidence value is compared with the corrected defect judgment confidence threshold to obtain the corrected defect judgment result. Step S7: Obtain the final defect determination result based on the initial defect determination result and the corrected defect determination result.

2. The method for detecting defects in textile fabrics based on neural networks according to claim 1, characterized in that, Step S2 also includes the following steps: The visual state data of the fabric is preprocessed to form preprocessed image data; The target detection region and abnormal texture region are identified in the preprocessed image data to form preliminary visual feature information; The preliminary visual feature information is quantized to form a set of feature vectors; The set of feature vectors is input into the fabric defect detection neural network model for analysis, and the defect judgment confidence value is output.

3. The method for detecting defects in textile fabrics based on neural networks according to claim 1, characterized in that, The acquisition of the spectral deviation in step S3 includes the following steps: The microscopic vibration state parameters are preprocessed to obtain vibration time series data; The vibration time series data and the preset micro vibration values ​​are subjected to fast Fourier transform to obtain the actual vibration power spectral density curve and the reference vibration power spectral density curve. The actual vibration power spectral density curve and the reference vibration power spectral density curve are divided into several frequency bands according to a preset frequency range. The amplitude difference of each frequency band is calculated to obtain the vibration deviation value of each frequency band. The vibration deviation values ​​of each frequency band are weighted and summed to obtain the spectral deviation.

4. The method for detecting defects in textile fabrics based on neural networks according to claim 3, characterized in that, The weighted summation process includes the following steps: Based on the vibration frequency band feature database, the preset weights corresponding to the vibration deviation values ​​of each frequency band are obtained, and a particle swarm optimization algorithm model with the coupling sensitivity factor of the loom working condition as the optimization objective is constructed. The preset weights are input into the particle swarm optimization algorithm model, the output optimization weights are iteratively updated, and the vibration deviation values ​​of each frequency band are weighted and summed with the corresponding optimization weights to obtain the spectral deviation.

5. The method for detecting defects in textile fabrics based on neural networks according to claim 4, characterized in that, The fitness function of the particle swarm optimization algorithm model is: ; in, For the coupling sensitivity factor of loom operating conditions; The number of key vibration frequency bands; For the first Prior importance coefficients for each frequency band when distinguishing between environmental vibration and defect vibration; In the first The number of data points sampled within each frequency band; Let be the vibration power spectral density value of the fabric sample containing known welts at the j-th sampling point in the i-th frequency band; and These are the mean and standard deviation of the vibration power spectral density values ​​of a normal fabric under various stable operating conditions at the j-th sampling point in the i-th frequency band, respectively. The weighting coefficients for the sudden vibration components; In the first Peak frequency of sudden vibrations detected within a time window; For the corresponding number The fundamental vibration frequency within a time window.

6. The method for detecting defects in textile fabrics based on neural networks according to claim 5, characterized in that, It also includes material damping correction processing for the fitness function of the particle swarm optimization algorithm model: ; ; in, , All are balanced weights, and ; For material damping adaptation correction; The number of low-frequency resonance peaks used for evaluation; For the current batch of fabrics being tested, in the [number]th [year]... Measured damping ratio at each characteristic resonance peak; The calibration sample set used for model training is in the first... The average damping ratio at each characteristic resonance peak.

7. The method for detecting defects in textile fabrics based on neural networks according to claim 1, characterized in that, The acquisition of temperature gradient outliers in step S4 includes the following steps: The surface temperature distribution parameters are preprocessed to obtain temperature distribution data; The temperature distribution data is compared point by point with the preset surface temperature value to calculate the temperature deviation at each corresponding location, and a temperature gradient outlier matrix is ​​formed based on the spatial relationship. Statistical analysis is performed on the outliers in the temperature gradient outlier matrix to obtain the temperature gradient outliers.

8. The method for detecting defects in textile fabrics based on neural networks according to claim 1, characterized in that, Step S6, which involves correcting the confidence threshold for defect determination, includes the following steps: Based on the fabric environment coupling state type, a corresponding threshold correction rule is determined from a preset threshold correction rule set; The confidence threshold for defect determination is adjusted according to the threshold correction rule to generate a corrected confidence threshold for defect determination.

9. The method for detecting defects in textile fabrics based on neural networks according to claim 8, characterized in that: The fabric environment coupling state types include stable working conditions, vibration disturbance working conditions, temperature disturbance working conditions, and combined disturbance working conditions. The threshold correction rules include threshold direction adjustment and threshold magnitude adjustment.