A portable method and system for identifying multi-component fiber components of textile fabrics
Through a portable system combined with infrared spectral data acquisition and neural network algorithm, the accuracy and scope of application of the quantitative model of multi-component fiber components of textile fabrics is solved, and fiber component recognition is achieved with high accuracy and low error.
Patent Information
- Application Number
- CN202510073702.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-17
AI Technical Summary
In the prior art, the prediction accuracy of the multi-component fiber component quantitative model of textile fabrics is not high enough, the fiber components applicable to each model are limited, and the error between the instruments is large, making it difficult to meet the needs of digital inspection of textiles.
Using a portable system, two infrared sensors collect spectral data in the S-band and L-band respectively, combine neural network algorithms and deep learning models, optimize spectral data processing and model training, establish a multi-component fiber component model, and realize mature identification model deployment through incremental learning and temperature calibration of the driving voltage.
It improves the accuracy and reliability of multi-component fiber components identification in textile fabrics, reduces inter-table differences, and achieves rapid lossless and high-accuracy identification of multi-component fiber components.
Smart Images

Figure CN119492712B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of fabric detection, and in particular to a portable textile fabric multi-component fiber composition identification method and system. Background Art
[0002] The textile industry is a traditional industry with high labor intensity. As an important pillar industry of my country's national economy, it is accelerating its development towards digitalization, networking and intelligence. As for textile testing technology, the traditional methods of using visual comparison, microscopic observation, combustion identification, chemical dissolution and other methods to detect the fiber composition of textile fabrics have problems such as low efficiency, poor repeatability, different results from person to person, and loss of samples, which makes it difficult to meet the demand for textile digitalization in domestic and foreign markets.
[0003] Breakthroughs in fabric component intelligent identification technology are the key to large-scale application of textile testing instruments and the goal of digital transformation in the textile industry. With the release and implementation of FZ / T01144-2018 "Near-infrared spectroscopy for quantitative analysis of textile fibers", the method of non-destructive testing of fabric fiber composition using near-infrared spectroscopy technology is developing rapidly.
[0004] However, in the quantification of multi-component fiber composition of textiles, since the near-infrared model is affected by factors such as instrument type, environment, fabric structure, dye, fiber content, and detection conditions, the quality of the calibration model established for different fiber components directly affects its prediction effect. At present, there are still problems such as the quantitative model's prediction accuracy is not high enough, the fiber components applicable to each model are limited (3 to 4 types of fibers), and the errors between instruments are large.
[0005] Therefore, in order to realize the large-scale promotion and application of near-infrared spectroscopy technology for fabric fiber component identification, it is necessary to systematically improve infrared spectroscopy data sampling, data processing, and model algorithms to overcome the possible impact of changes in fabric dyes, structures, and detection environments. Based on the problems in the prior art, the present invention provides a portable textile fabric multi-component fiber component identification method and system. Summary of the invention
[0006] The purpose of the present invention is to provide a portable method and system for identifying multi-component fiber components of textile fabrics, so as to solve the technical problems in the prior art that the prediction accuracy of quantitative models is not high enough, the fiber components applicable to each model are limited, and the errors between instruments are large.
[0007] The technical solution of the present invention is: a portable textile fabric multi-component fiber composition identification method, comprising: placing a fabric with known fiber composition in an infrared diffuse reflection light environment, and a signal acquisition unit repeatedly acquiring spectral data reflected from the front and back sides of the fabric to be tested; the signal acquisition unit comprises a pair of infrared spectrum sensors and a photoelectric signal detection module, the two infrared spectrum sensors respectively acquire spectral data of the S band and the L band, and the photoelectric signal detection module converts the optical signal acquired by the infrared spectrum sensor into an electrical signal and transmits it to a main controller; wherein the wavelength connection section of the S band spectrum data and the L band partially overlaps, the wavelength range of the S band is 1500-1900nm, and the wavelength range of the L band is 1700-2200nm; the step length of the spectrum data is 5nm, each spectrum data includes 142 eigenvalues, and the repeated wavelength range of 1700-1900nm is used to provide superimposed enhanced spectrum information; pre-processing the acquired spectrum data, and performing Perform cluster analysis to obtain a training data set; establish a model framework: select a neural network framework, establish a personalized deep learning model based on the neural network framework, train the constructed deep learning model through the training data set, set an adam optimizer in the deep learning model, introduce the MSE loss function and the EcaNet channel attention mechanism to optimize the network structure; perform convolution training on the constructed model framework through the training data set to construct a multi-component fiber composition model; migrate and deploy the constructed multi-component fiber composition model to the device end, retrain the multi-component fiber composition model through incremental learning to obtain a mature recognition model, and calibrate the signal acquisition unit; place a fabric with unknown fiber composition in a diffuse infrared light environment, and the signal acquisition unit collects and transmits infrared spectral data to the main controller; the main controller transmits the infrared spectral data that meets the preset threshold range to the embedded end, and the embedded end calls the recognition model deployed on the corresponding device end to recognize the pre-processed infrared spectral data.
[0008] Preferably, the infrared spectrum sensor performs voltage calibration on the infrared spectrum sensor through a temperature calibration drive during the process of collecting light signals of corresponding wavelength bands;
[0009] The temperature calibration drive is based on the temperature and infrared spectrum sensor driving voltage fitting curve, formula:
[0010]
[0011] In the formula, V represents the driving voltage of the infrared spectrum sensor, λ represents the peak wavelength of the spectrum, ΔT is the temperature difference between the real-time temperature of the infrared spectrum sensor and the normal temperature of 20°C, and the constant a is i , b i 、c i d i 、e iare the polynomial coefficients obtained by temperature calibration fitting of each sensor. i and N are integers with a value range of [1,5].
[0012] Preferably, a neural network framework is selected, a personalized deep learning model is established based on the neural network framework, the constructed deep learning model is trained by a training data set, and an adam optimizer is set in the deep learning model, and an MSE loss function and an EcaNet channel attention mechanism are introduced to optimize the network structure;
[0013] The content of the mature recognition model obtained on the device side is:
[0014] Calibrate the infrared spectrum sensor driving voltage curve of the device to be deployed with the recognition model, and migrate and deploy the optimized recognition model to the device;
[0015] Fabrics with various fiber compositions within the specific product application range are selected as transfer learning samples. Each device resamples the transfer learning samples and conducts targeted incremental model learning. The model after incremental learning on the device side is a mature recognition model, so that the inter-device difference in the prediction results of the fiber composition in the same sample on different device sides is less than 1%.
[0016] Preferably, cluster analysis is performed on the preprocessed spectral data to obtain a training data set by:
[0017] The symbiotic distance algorithm and cross-validation were used to perform cluster analysis on the spectral data set of blended textiles; the fiber content in the textile fabric was set as the dependent variable (t), and the corresponding spectral normalized intensity data was used as the independent variable (v). The Euclidean distance of the v variable was evaluated, and the calculation formula was as follows:
[0018]
[0019] Where J represents the number of band features in the spectral data;
[0020] v p (j) and v q (j) represents the normalized intensity value of diffuse reflection of samples p and q in the jth band,
[0021] N is the total number of spectral samples;
[0022] d v (p,q) represents the Euclidean distance between two samples in v space (spectral feature space);
[0023] The formula for calculating the Euclidean distance in t space (the characteristic space of fiber content) is as follows:
[0024]
[0025] Where tp and t q Represent the fiber content values of samples p and q respectively.
[0026] Preferably, the model is trained by training the data set to construct a multi-component fiber composition model:
[0027] The infrared spectrum data of the two bands are used as one-dimensional input respectively, and the irregular shape initialization convolution kernel P is defined S0 and P L0 , spliced into a one-dimensional variable kernel convolution Conv1d-AK (Arbitrary Kernel), the corresponding nth variable kernel P Sn With P Ln The convolution operation can be expressed as:
[0028] Conv1d(P Sn )=∑w S ×(P S0 +P Sn ),Conv1d(P Ln )=∑w L ×(P L0 +P Ln );
[0029] where w s and w L Represents the convolution parameters of the S and L bands, P S0 and P L0 are the initial values of the convolution kernel for the S and L bands, P Sn With P Ln are the variable convolution kernels for the S and L bands respectively.
[0030] Preferably, after the recognition model identifies the fiber components of the fabric, the main controller makes an abnormality determination on the fiber component data identified by spectral inversion, and the determination conditions include a single acquisition of spectral data exceeding a threshold range and a statistical variance threshold obtained by multiple sampling and quantitative inversion of fiber content;
[0031] If the recognition is abnormal, the system will prompt that the recognition error exceeds the threshold range;
[0032] If the recognition is normal, the data will be fed back to the display screen and uploaded to the cloud server. The display screen will display the fiber components in order of percentage content and give the corresponding fiber component ratio and confidence interval;
[0033] Among them, the threshold intervals of single-time spectral data collection are S and L bands.
[0034] Preferably, data preprocessing includes abnormal data removal, multivariate scatter correction and linear function normalization, and the normalization range is mapped to [0.01, 1.01].
[0035] A portable textile fabric multi-component fiber composition identification system, used to implement the fabric multi-component fiber composition identification method, the system includes a diffuse reflection cavity, an infrared light source, an infrared spectrum sensor group, a photoelectric signal detection module, a main controller, an embedded Linux module, and a display screen;
[0036] The infrared light emitted by the infrared light source passes through the diffuse reflection cavity, so that the infrared light is uniformly irradiated to the textile fabric, and the diffuse reflection light of the fabric fiber is incident on the infrared spectrum sensor group. The photoelectric signal detection module collects infrared spectrum signals to the main control MCU processor, and the main control MCU processor reads infrared spectrum signal data and transmits the data to the embedded Linux module. The embedded Linux module calls the deployed textile fabric multi-component fiber composition quantitative model, analyzes the infrared spectrum data, identifies the fiber components, and transmits the identification results to the main control MCU processor. The main control MCU processor performs identification abnormality judgment, prompts abnormal data samples that exceed the normal prediction range, and sorts the fiber component data within the prediction range and outputs them to the display screen.
[0037] Preferably, the infrared spectrum sensor group consists of two infrared spectrum sensors, which are divided into 1500-1900nm band and 1700-2200nm band, including FPI interference sensor, narrowband filter sensor, Fourier transform interference sensor, and micro grating spectrum detection array.
[0038] Compared with the prior art, the advantages of the present invention are:
[0039] (1) The present invention sets two infrared sensors to sample two bands respectively, so as to obtain a wider wavelength range and obtain more spectral information. The overlapping intervals of the bands can be superimposed and strengthened to obtain a complete and stable large-interval spectrum map, so as to predict and identify more types of fabric fiber components, and can effectively solve the current problems of inaccurate measurement of textile fabric composition and small application range of each model.
[0040] (2) The present invention provides a neural network algorithm including cluster analysis and convolution kernel algorithm, combined with band overlapping sampling data, and the model is optimized and then deployed to the device end to improve the model prediction accuracy.
[0041] (3) The present invention integrates the functions of infrared spectrum acquisition, data processing, local algorithm prediction, and abnormal result prompting. After the optimized prediction model is deployed on the device side, it is necessary to migrate incremental learning on the device side and calibrate the driving voltage of the infrared sensor group to achieve an inter-unit difference in component identification indicators of less than 1%. Different from the method in the technical field of deploying multiple models for identification on each device, the present invention can achieve rapid, non-destructive, and high-accuracy identification of multi-component fiber components of textile fabrics without frequent model switching. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0043] Figure 1 It is a schematic diagram of the partial physical structure of the multi-component fiber composition identification system of the present invention;
[0044] Figure 2 It is a structural block diagram of the multi-component fiber composition identification system of the present invention;
[0045] Figure 3 It is a flow chart of the multi-component fiber composition identification method of the present invention;
[0046] Figure 4 The sampling spectrum diagram and the spectrum diagram after data processing of the multi-component fiber fabric sample of the present invention;
[0047] Figure 5 A schematic diagram of a parameter relationship fitting curve for calibrating an infrared spectrum sensor based on the relationship between temperature and driving voltage provided by the present invention;
[0048] Figure 6 This is a schematic diagram showing the comparison of the change of the coefficient of determination and the loss function with epochs in the process of constructing the recognition model by using two bands overlapped and directly connected;
[0049] Wherein: 101, diffuse reflection cavity; 102, infrared light source; 103, infrared spectrum sensor group; 104, temperature calibration driver; 105, photoelectric signal detection module; 106, power module; 107, main control MCU processor; 108, embedded Linux module; 109, display screen. DETAILED DESCRIPTION
[0050] The present invention is further described in detail below in conjunction with specific embodiments:
[0051] For ease of understanding, the application scenario of this application is first explained. For fabrics with the same composition, the use of different dyes and environmental changes will affect the consistency of the collected infrared spectra. The reason why infrared spectroscopy technology has not been widely commercialized for textile fabric fiber prediction is largely due to the large inter-device differences. The inter-device difference reflects the degree of consistency between different devices. When academia or enterprises use a single device to predict fabric composition, a higher accuracy can be achieved for certain fibers. However, due to the large inter-device difference, the difference in predicted composition of mass-produced equipment exceeds the 3% specified in the national standard (FZ / T01144-2018 "Near-infrared spectroscopy for quantitative analysis of textile fibers"). This application uses two sets of infrared sensors and photoelectric detection modules to obtain spectral data, predicts fabric components on the device side where a neural network model is deployed, and calculates fabric composition based on a neural network algorithm.
[0052] like Figure 1 As shown, a method for identifying the components of multi-component fibers of a portable textile fabric is implemented by a multi-component fiber component identification system for a textile fabric, which includes a diffuse reflection cavity 101, an infrared light source 102, an infrared spectrum sensor group 103, a temperature calibration driver 104, a photoelectric signal detection module 105, a power module 106, a main control MCU processor 107, an embedded Linux module 108, and a display screen 109.
[0053] The base material of the diffuse reflection cavity 101 is aluminum, aluminum alloy, iron, copper, polymer, plastic or ceramic, and the surface is gold-plated, silver-plated or PTEF-coated.
[0054] The infrared light source 102 is one of an incandescent lamp, a tungsten lamp, a halogen lamp, and a nano-metal infrared lamp.
[0055] The infrared spectrum sensor group 103 is composed of two infrared spectrum sensors, and the wavelength ranges of the infrared light collected are S band (1500-1900nm) and L band (1700-2200nm), respectively. The two infrared spectrum sensors use one of the following: FPI interferometer sensor, narrowband filter sensor, Fourier transform interferometer sensor, and micro grating spectrum detection array.
[0056] In the following specific implementation manner, a part of the S band and the L band is intercepted to highlight the infrared spectrum prediction effect. The wavelength ranges of the two infrared spectrum sensors are 1550-1850nm and 1750-2150nm, respectively. For the convenience of description, in the specific implementation manner of the system principle and the identification method introduced below, the wavelength ranges of 1550-1850nm and 1750-2150nm collected by the two infrared spectrum sensors are still referred to as the S band and the L band.
[0057] The photoelectric signal detection module 105 includes a transimpedance amplifier, a filter circuit, and a high-precision analog-to-digital converter to reduce interference signals and realize optical-to-electrical signal conversion.
[0058] The power module 106 is a battery charging and discharging, automatic switching, step-up and step-down regulator. When the system performs sampling and identification work, it stops charging and automatically switches to power the built-in battery and provide low-noise power supply for the photoelectric signal detection module 105.
[0059] Refer to the attached Figure 2 As shown in the figure, the working principle of the multi-component fiber composition identification system for textile fabrics is:
[0060] The infrared light source 102 adopts a tungsten lamp, and the infrared light of 400-4000nm emitted by the tungsten lamp passes through the diffuse reflection cavity 101, so that the infrared light is evenly irradiated to the textile fabric. The diffuse reflection infrared light with multi-component fiber composition characteristics reflected by the fabric is incident on the infrared spectrum sensor group 103. The diffuse reflection cavity 101 and the infrared light source 102 provide a diffuse reflection infrared light environment for the fabric, so as to prevent the infrared light emitted by the infrared light source 102 from directly incident on the infrared spectrum sensor to cause invalid background signals.
[0061] The photoelectric signal detection module 105 converts the optical signal obtained by the infrared spectrum sensor group 103 into an electrical signal and transmits it to the main control MCU processor 107; the main control MCU processor 107 reads and obtains the spectral data of the two bands of 1550-1850nm and 1750-2150nm and transmits the data to the embedded Linux module 108, and the embedded Linux module 108 calls the deployed quantitative model of multi-component fiber composition of textile fabrics, analyzes and identifies the infrared spectrum signal, and completes the identification of the multi-component fiber composition of textile fabrics.
[0062] The fiber component identification result is transmitted to the main control MCU processor 107 , which performs identification abnormality determination, prompts abnormal data samples that exceed the normal prediction range, and sorts the normal fiber component data and outputs it to the display screen 109 .
[0063] Considering the resistance thermal effect, the temperature and voltage of the sensor of the relevant type are generally a linear function relationship. For the infrared spectrum sensor used in this embodiment, especially when the FPI interferometric sensor is used, since the infrared spectrum sensor has temperature drift (mainly wavelength drift under the same driving voltage), the temperature drift or the relationship between the sensor temperature and voltage is a nonlinear relationship.
[0064] Usually, when the accuracy requirement is low, high-order terms are ignored and the calculation is simplified by approximating linearity. This embodiment can achieve accurate prediction of fabric fiber composition. First, high-precision spectral data sampling is required. Then, the temperature needs to be obtained in real time to calculate the driving voltage, and the fitting curve of temperature and infrared spectral sensor driving voltage is obtained by polynomial fitting.
[0065] The formula of the fitting curve is expressed as:
[0066]
[0067] In the formula, V represents the driving voltage of the infrared spectrum sensor, λ represents the peak wavelength of the spectrum, ΔT represents the temperature difference between the real-time temperature of the infrared spectrum sensor and the normal temperature of 20°C (T-20°C), and the constant a is i , b i 、c i d i 、e i are polynomial coefficients obtained by temperature calibration fitting of each sensor. i and N are positive integers with a value range of [1,5].
[0068] Refer to the attached Figure 5 The temperature calibration legend on the left side provides a schematic diagram of the fitting curve of the infrared spectrum sensor driving voltage changing with wavelength under different temperature conditions.
[0069] The temperature calibration driver 104 feeds back the detected temperature of the infrared spectrum sensor group 103 to the main control MCU processor 107. The main control MCU processor 107 adjusts the driving voltage of the infrared spectrum sensor group 103 in real time through digital-to-analog DAC conversion based on the temperature and infrared spectrum sensor driving voltage fitting curve. The relationship between the digital-to-analog conversion value and the driving voltage is shown in the attached figure. Figure 5 Illustration of the circuit consistency calibration on the middle right.
[0070] On the one hand, when using the infrared spectrum sensor, there is a relationship between its operating temperature and voltage. On the other hand, when detecting fabrics and obtaining spectral data, the wavelength is stepped by 5nm. As the wavelength increases, the voltage continues to increase. When the infrared spectrum sensor is working, the drive voltage needs to be calibrated continuously. Therefore, calibrating the drive voltage of the infrared sensor based on the fitting curve can not only perform temperature-voltage compensation adjustment, but also determine the relationship between voltage and wavelength, so as to subsequently construct a complete infrared spectrum curve.
[0071] Based on the above fiber component identification system, the present application provides a method for identifying multi-component fiber components of a textile fabric, comprising the following steps:
[0072] The fabric with known fiber composition is placed in an infrared diffuse reflection light environment, and the infrared spectrum sensor group collects infrared spectrum data reflected from the front and back sides of the fabric to be tested for multiple times;
[0073] The main controller receives the infrared spectrum data and preprocesses the infrared spectrum data, performs cluster analysis on the preprocessed spectrum data, and obtains a training data set;
[0074] Establish a model framework, perform convolution training on the constructed model framework through training data sets, and construct a multi-component fiber composition model;
[0075] Migrate and deploy the constructed multi-component fiber composition model to the device end, retrain the multi-component fiber composition model through incremental learning to obtain a mature recognition model, and calibrate the signal acquisition unit;
[0076] Place fabrics with unknown fiber composition in a diffuse infrared light environment, collect and transmit infrared spectrum data to the main controller;
[0077] The main controller transmits the infrared spectral data that meets the preset threshold range to the embedded end. The embedded end calls the recognition model deployed on the corresponding device end to identify the preprocessed infrared spectral data, thereby completing the multi-component fiber composition recognition function of textile fabrics.
[0078] After the model identifies the fabric fiber components, the main control MCU makes an abnormal judgment on the fiber component data identified by spectral inversion. In the spectral data collection stage, a single data collection is first performed to determine whether the single data conforms to the normal fabric fiber spectrum data, so as to initially prevent abnormal data from being transferred into the model calculation. If it conforms to the normal fabric fiber spectrum data, multiple samplings are performed again, and the statistical variance of the final result is calculated to enter the threshold judgment to further eliminate non-fabric samples, and at the same time, a small number of fabric fibers whose predicted values exceed the wavelength range are prompted.
[0079] If the recognition is normal, the data will be fed back to the display screen and the cloud server. The fiber composition display on the display screen will be sorted from high to low according to the percentage of the identified multiple fiber components, and the corresponding fiber component ratio and confidence interval will be given.
[0080] For ease of understanding, an embodiment is provided below to illustrate the above method.
[0081] like Figure 3 As shown, the method for identifying the components of multi-component fibers of textile fabrics using the above method comprises the following steps:
[0082] Step 1
[0083] A fabric with a multi-component fiber composition known to contain cotton (C), wool (W), polyester (T), viscose fiber (V), spandex (PU) and nylon (N) is placed under the diffuse reflection cavity 101, the infrared light source 102 is turned on, and the temperature calibration driver 104 and the photoelectric signal detection module 105 are used to collect infrared spectrum data with wavelengths of 1550-1850nm and 1750-2150nm respectively through two groups of infrared spectrum sensors, with a step size of 5nm. Each spectrum data includes 142 eigenvalues, among which the repeated wavelength range of 1750-1850nm is used to provide superimposed enhanced spectrum information.
[0084] There are many types of fabric fibers, and fabric fiber characteristics can cover a large wavelength range. If only a single sensor or detector is used, a large wavelength range cannot be obtained, and the predicted fabric component types are relatively small. In this embodiment, the wavelength range covered by the fabric fiber characteristics is divided into two bands, and two infrared spectrum sensors are used to perform wavelength scanning respectively, so as to collect a wider wavelength range and obtain more spectral information.
[0085] Spectral data can be found in the attached Figure 4 , attached Figure 4 The left side in the middle is the sampling data of the infrared spectrum sensor, and the right side is the infrared spectrum diagram after data processing. The sampling data of the infrared spectrum sensor is specifically reflected in the variation curve of the infrared light diffuse reflection intensity and wavelength.
[0086] By the attached Figure 4 The curve of the sampling data of the mid-infrared spectrum sensor shows that there is a "fault line" between the L-band curve in the front section and the S-band curve in the back section. This is because within the same band range, due to the differences in spectral response curves and filters, the spectral data collected by infrared sensors with different wavelength parameters are different.
[0087] By setting the overlapping wavelength range (1750-1850nm), it is helpful to clarify the difference ratio between the two bands of information, so as to connect the spectral information of the two bands and obtain a complete spectrum. Figure 4 Infrared spectrum in the middle (right).
[0088] Step 2
[0089] Repeat step 1 to collect infrared spectrum data of a large number of multi-component fabric samples, and then export them to the computer through the main control MCU processor 107 to remove abnormal values. The infrared spectrum data transmission and export methods include serial port, Bluetooth, Wi-Fi, and Zigbee communication methods.
[0090] Specifically, the Monte Carlo cross-validation method is used to identify and eliminate abnormal samples. At the same time, the mean value μ and the standard deviation σ are calculated through statistical methods. When the value of a data point is less than μ-3σ or greater than μ+3σ, it is eliminated as an outlier.
[0091] Step 3
[0092] After removing outliers, the infrared spectral data were preprocessed, and the data in the S and L bands were corrected for multivariate scattering and normalized by linear functions, respectively. The normalized range was mapped to [0.01, 1.01] so that the data weights and bias values of the model established later would be in an appropriate range.
[0093] Step 4
[0094] Dataset divisionThe spectral dataset of blended textiles was clustered using the co-occurrence distance algorithm and cross validation. The cluster analysis reflects the distribution characteristics of the samples and divides the dataset for training the model.
[0095] Specifically, the fiber content in the textile fabric is set as the dependent variable (t), and the corresponding spectral data is normalized and used as the independent variable (v). The Euclidean distance of the v variable is evaluated, and the calculation formula is as follows:
[0096]
[0097] Where J represents the number of band features in the spectral data, v p (j) and v q (j) represents the normalized intensity value of diffuse reflection of samples p and q in the jth band, respectively, and N is the total number of spectral samples. v (p,q) represents the Euclidean distance between two samples in v space (spectral feature space).
[0098] Then, the formula for calculating the Euclidean distance in t space (the characteristic space of fiber content) is as follows:
[0099]
[0100] Where t p and t q Represent the fiber content values of samples p and q respectively.
[0101] Step 5
[0102] The spectra of the S and L bands after preprocessing, each set of data is used as a one-dimensional input, and the irregular shape initialization convolution kernel P is defined S0 and P L0, concatenated into a one-dimensional variable kernel convolution Conv1d-AK (Arbitrary Kernel), the corresponding convolution operation of the nth variable kernel PSn and PLn can be expressed as:
[0103] Conv1d(P Sn )=∑w S ×(P S0 +P Sn ),Conv1d(P Ln )=∑w L ×(P L0 +P Ln );
[0104] where w S and w L Represents the convolution parameters of the S and L bands, P S0 and P L0 are the initial values of the convolution kernel for the S and L bands, P Sn With P Ln are the variable convolution kernels for the S and L bands respectively.
[0105] Step 6
[0106] Based on Tensorflow2 and Keras framework, a personalized deep learning model is established, and the determined convolution kernel is used as the weight parameter of the constructed personalized deep learning model, which is used for the calculation of each layer of the neural network, and the parameters are updated by the back propagation algorithm. In the specific implementation process, the framework is used as a means of model establishment and calculation, and is not limited to the TF and Keras frameworks in this embodiment. Other frameworks can also have the same function. For example, frameworks such as pytorch and paddle can also achieve similar effects.
[0107] A personalized deep learning model is established by training a large amount of processed fabric infrared spectral data. The adam optimizer is set in the model, the MSE loss function and the EcaNet channel attention mechanism are introduced to optimize the network structure. This can avoid dimensionality reduction and maintain computational efficiency, improve the ability to extract spectral features of textiles, and thus improve the expressiveness and generalization capabilities of the model.
[0108] Refer to the attached Figure 6 , which provides the coefficient of determination (R 2 ) and the loss function (Loss) curve diagram with epoch, determination coefficient (R 2 ) and the change of loss function (Loss) with epoch usually reflects the performance change during the model training process.
[0109] In the context of machine learning and deep learning, epoch refers to the number of times the entire data set is processed by the model, while the loss function (Loss) and the coefficient of determination (R 2 ) are two important indicators used to measure model performance. The loss function is used to quantify the difference between the model prediction and the true value, and the coefficient of determination R 2 Also known as the coefficient of determination, it is a statistical measure that quantifies how well a model fits the data.
[0110] By the attached Figure 6 As can be seen from the curve graph, in the early stage of model training, R 2 Gradually increase, R 2 The closer the value is to 1, the stronger the prediction ability of the model is and the better the fitting effect of the model is. In the early stage of training, the loss function value decreases rapidly, but as the model gradually converges, the rate of decrease of the loss function value slows down and eventually stabilizes.
[0111] After comparing the actual model establishment, it was found that the model obtained by overlapping wavelengths has a determination coefficient R 2 The highest, the loss Loss is smaller. Therefore, the prediction accuracy of the prediction model with overlapping wavelengths is better than the prediction model with direct connection of bands (the two combinations of 1550-1750nm+1750-2150nm or 1550-1850nm+1850-2150nm), which can achieve the effect of "1+1>2".
[0112] Step 7
[0113] Each device has certain differences in its PCB board circuit trace resistance, chip resistors, capacitors, op amps, DAC, ADC and other components (such as the resistance value and temperature drift of 1% precision resistors). In order to narrow the differences, the infrared spectrum sensor driving voltage curve is calibrated separately for the device to be deployed with the model, and the parameters are saved independently. At the same time, the optimized trained model is migrated and deployed to the device. Therefore, there are differences between the learning models actually deployed on each device, so as to adjust the differences between different devices to be as small as possible.
[0114] Fabrics with multiple fiber components including cotton (C), wool (W), polyester (T), viscose (V), spandex (PU) and nylon (N) were selected as transfer learning samples. Each device resampled the transfer learning samples and performed targeted incremental model learning. The model after incremental learning was deployed to the device again, so that the inter-device difference index of fiber composition prediction was less than 1%.
[0115] Step 8
[0116] The front and back sides of fabrics that may contain six types of fibers, namely cotton (C), wool (W), polyester (T), viscose (V), spandex (PU) and nylon (N), are placed under the diffuse reflection cavity in turn, and multiple infrared spectra are collected. The main control MCU processor 107 determines the abnormal value according to the set threshold range. If it is abnormal, it will be interrupted and prompted, otherwise the data will be transmitted to the embedded Linux module 108.
[0117] After preprocessing, the incrementally learned model deployed by the corresponding device is called to identify multiple groups of results for statistical variance threshold determination. The final mean data of the positive and negative sides are sorted and fed back to the display screen 109, and the data is transmitted to the host computer (cloud server) via Bluetooth to complete the multi-component fiber composition identification function of the textile fabric. The data upload methods include serial port, Bluetooth, Wi-Fi, Zigbee, and the terminals include host computer, cloud platform, computer terminal, and mobile phone terminal.
[0118] Among them, the embedded Linux module can replace the main control MCU to determine abnormal data and display and upload the fiber composition identification results.
[0119] In this embodiment, 25 fabrics with multi-component fiber components are selected according to the diversified types, and the comparison between the prediction results obtained by the method identification and the actual fiber component design values is shown in Table 1:
[0120] Table 1
[0121]
[0122]
[0123] It can be seen that the system and method provided in this embodiment can accurately identify a fabric having six multi-component fiber components using a single model without switching between multiple models.
[0124] As attached Figure 4 As shown, the original sampling spectra of the 25 selected multi-component fiber fabric samples and the spectra after preprocessing in step 3 are shown. It can be seen from the figure that the samples with different fiber components have relatively stable characteristics after preprocessing. The deep learning model is established by the method in steps 4-7, which can realize accurate prediction of the multi-component fiber composition.
[0125] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with this technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the scope of protection of the present invention. For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is limited by the attached claims rather than the above description, and it is intended to include all changes within the meaning and scope of the equivalent elements of the claims in the present invention.
Claims
1. A portable method for identifying multi-component fiber components of textile fabrics, characterized in that: include: The fabric with known fiber composition is placed in an infrared diffuse reflection light environment, and the signal acquisition unit obtains the spectral data of the reflection from the front and back sides of the fabric to be tested multiple times; The signal acquisition unit includes a pair of infrared spectrum sensors and a photoelectric signal detection module. The two infrared spectrum sensors collect spectrum data of the S band and the L band respectively. The photoelectric signal detection module converts the optical signal acquired by the infrared spectrum sensor into an electrical signal and transmits it to the main controller. The wavelength connection section of the S-band spectrum data and the L-band partially overlaps, the wavelength range of the S-band is 1500-1900nm, and the wavelength range of the L-band is 1700-2200nm; the step size of the spectrum data is 5nm, each spectrum data includes 142 eigenvalues, and the repeated wavelength range of 1700-1900nm is used to provide superimposed enhanced spectrum information; Preprocessing the collected spectral data, performing cluster analysis on the preprocessed spectral data, and obtaining a training data set; Establish a model framework: select a neural network framework, establish a personalized deep learning model based on the neural network framework, train the constructed deep learning model through the training data set, set the adam optimizer in the deep learning model, introduce the MSE loss function and the EcaNet channel attention mechanism to optimize the network structure; perform convolution training on the constructed model framework through the training data set to construct a multi-component fiber composition model; Migrate and deploy the constructed multi-component fiber composition model to the device end, retrain the multi-component fiber composition model through incremental learning to obtain a mature recognition model, and calibrate the signal acquisition unit; The fabric with unknown fiber composition is placed in a diffuse reflection infrared light environment, and the signal acquisition unit collects and transmits infrared spectrum data to the main controller; The main controller transmits the infrared spectrum data that meets the preset threshold range to the embedded end, and the embedded end calls the recognition model deployed on the corresponding device end to recognize the pre-processed infrared spectrum data.
2. The portable textile fabric multi-component fiber composition identification method according to claim 1 is characterized in that: The infrared spectrum sensor performs voltage calibration on the infrared spectrum sensor through temperature calibration driving during the process of collecting light signals of corresponding bands; The temperature calibration drive is based on the temperature and infrared spectrum sensor driving voltage fitting curve, formula: In the formula, V represents the driving voltage of the infrared spectrum sensor, λ represents the peak wavelength of the spectrum, ΔT is the temperature difference between the real-time temperature of the infrared spectrum sensor and the normal temperature of 20°C, and the constant a is i 、b i 、c i ,d i 、e i are the polynomial coefficients obtained by temperature calibration fitting of each sensor. i and N are integers with a value range of [1,5].
3. The portable textile fabric multi-component fiber composition identification method according to claim 1 is characterized in that: The content of the mature recognition model obtained on the device side is: Calibrate the infrared spectrum sensor driving voltage curve of the device to be deployed with the recognition model, and migrate and deploy the optimized recognition model to the device; Fabrics with various fiber compositions within the specific product application range are selected as transfer learning samples. Each device resamples the transfer learning samples and conducts targeted incremental model learning. The model after incremental learning on the device side is a mature recognition model, so that the inter-device difference in the prediction results of the fiber composition in the same sample on different device sides is less than 1%.
4. The portable textile fabric multi-component fiber composition identification method according to claim 3 is characterized in that: The method of clustering the preprocessed spectral data to obtain the training data set is as follows: The symbiotic distance algorithm and cross-validation were used to perform cluster analysis on the spectral data set of blended textiles; the fiber content in the textile fabric was set as the dependent variable (t), and the corresponding spectral normalized intensity data was used as the independent variable (v). The Euclidean distance of the v variable was evaluated, and the calculation formula was as follows: Where J represents the number of band features in the spectral data; v p (j) and v q (j) represents the normalized intensity value of diffuse reflection of samples p and q in the jth band, N is the total number of spectral samples; d v (p,q) represents the Euclidean distance between two samples in v space (spectral feature space); The formula for calculating the Euclidean distance in t space (the characteristic space of fiber content) is as follows: Where t p and t q Represent the fiber content values of samples p and q respectively.
5. The portable textile fabric multi-component fiber composition identification method according to claim 4 is characterized in that: The model is trained through the training data set to build a multi-component fiber composition model: The infrared spectrum data of the two bands are used as one-dimensional input respectively, and the irregular shape initialization convolution kernel P is defined S0 and P L0 , spliced into a one-dimensional variable kernel convolution Conv1 d-AK (Arbitrary Kernel), the corresponding nth variable kernel P Sn With P Ln The convolution operation can be expressed as: Conv1d(P Sn )=∑w S ×(P S0 +P Sn ),Conv1d(P Ln )=∑w L ×(P L0 +P Ln ); where w S and w L Represents the convolution parameters of the S and L bands, P S0 and P L0 are the initial values of the convolution kernel for the S and L bands, P Sn With P Ln They are the variable convolution kernels for the S and L bands respectively.
6. The portable textile fabric multi-component fiber composition identification method according to claim 1 is characterized in that: After the recognition model identifies the fabric fiber components, the main controller makes an abnormal judgment on the fiber component data identified by spectral inversion. The judgment conditions include the single acquisition of spectral data exceeding the threshold range and the statistical variance threshold obtained by multiple sampling quantitative inversion of fiber content; If the recognition is abnormal, the system will prompt that the recognition error exceeds the threshold range; If the recognition is normal, the data will be fed back to the display screen and uploaded to the cloud server. The display screen will display the fiber components in order of percentage content and give the corresponding fiber component ratio and confidence interval; Among them, the threshold interval for single-time spectral data collection is the S and L bands.
7. The portable textile fabric multi-component fiber composition identification method according to claim 1 is characterized in that: Data preprocessing includes abnormal data removal, multivariate scatter correction and linear function normalization, and the normalized range is mapped to [0.01, 1.01].
8. A portable textile fabric multi-component fiber composition identification system, used to implement the portable textile fabric multi-component fiber composition identification method according to any one of claims 1 to 7, characterized in that: The system includes a diffuse reflection cavity, an infrared light source, an infrared spectrum sensor group, a photoelectric signal detection module, a main controller, an embedded Linux module, and a display screen; The infrared light emitted by the infrared light source passes through the diffuse reflection cavity, so that the infrared light is uniformly irradiated to the textile fabric, and the diffuse reflection light of the fabric fiber is incident on the infrared spectrum sensor group. The photoelectric signal detection module collects infrared spectrum signals to the main control MCU processor, and the main control MCU processor reads infrared spectrum signal data and transmits the data to the embedded Linux module. The embedded Linux module calls the deployed textile fabric multi-component fiber composition quantitative model, analyzes the infrared spectrum data, identifies the fiber components, and transmits the identification results to the main control MCU processor. The main control MCU processor performs identification abnormality judgment, prompts abnormal data samples that exceed the normal prediction range, and sorts the fiber component data within the prediction range and outputs them to the display screen.
9. The portable textile fabric multi-component fiber composition identification system according to claim 8 is characterized in that: The infrared spectrum sensor group consists of two infrared spectrum sensors, which are divided into 1500-1900nm band and 1700-2200nm band. The infrared spectrum sensor adopts one of the following: FPI interferometer sensor, narrow-band filter sensor, Fourier transform interferometer sensor, and micro grating spectrum detection array.
Citation Information
Patent Citations
Hyperspectral image semi-supervised classification method and device based on improved active deep learning
CN113723492A
Student participation degree analysis method in talent social practice teaching based on VR
CN118674168A