Hyperspectral Detection and Classification of Stain-Contaminated Waste Textiles
Highlights
- Carbon black, protein, and oil stains induce nonlinear spectral distortion on textile substrates.
- FD-SVM achieves 100% accuracy but relies heavily on manual preprocessing selection.
- RAW-CNN attains 100% accuracy directly from raw spectra without any preprocessing.
- HSI enables simultaneous stain detection and fiber identification on waste textiles.
- RAW-CNN simplifies real-time prediction for high-throughput waste textile sorting.
- The framework offers a practical route for automated recycling-oriented textile inspection.
Abstract
1. Introduction
2. Materials and Methods
2.1. Experimental Materials and Instrumentation
2.1.1. Experimental Materials
2.1.2. Hyperspectral Imaging System Parameters
2.2. Stain Specimen Preparation
2.2.1. Preparation of Simulated Stain Solutions
- (1)
- Carbon black stain solution: The dispersant Peregal O (fatty alcohol polyoxyethylene ether) was completely dissolved in an ethanol–water mixed solvent, after which carbon black powder at a mass fraction of 0.5% was added. A stable carbon black suspension was obtained following magnetic stirring and dispersion.
- (2)
- Protein stain solution: Protein powder was placed in a beaker, and deionized water was gradually added in batches under thermostatic magnetic stirring until the solution reached a supersaturated state. After standing and filtration to remove undissolved precipitates, a highly viscous protein solution was obtained.
- (3)
- Oil stain solution: Span-80 and Tween-80 were used as a compound emulsifier at a mass ratio of 65:35, with the oil-to-water mass ratio controlled at 3:1. The mixed system was maintained in a constant-temperature water bath at 50 °C, and the aqueous phase was slowly added dropwise into the oil phase under high-speed magnetic stirring until a stable milky emulsion was formed.
2.2.2. Stain Specimen Fabrication
- (1)
- Carbon black stained specimens: A 2 mL aliquot of carbon black suspension was drawn using a disposable quantitative dropper and vertically dropped onto the center of a clean, flat substrate. A glass rod was used to guide the liquid into an approximately circular stain, which was then left to dry naturally.
- (2)
- Protein stain specimens: The protein solution was preheated to 40 °C to reduce its viscosity, and 2 mL was applied to the substrate surface using a disposable quantitative dropper. The samples were then placed in a forced-air drying oven at 60 °C for thermal aging for 2 h.
- (3)
- Oil stain specimens: After heating the emulsion to 50 °C, 2 mL was dropped onto the center of the substrate using a disposable quantitative dropper. The sample was then left standing to allow full wetting and penetration, followed by accelerated aging at 60 °C for 4 h.
2.3. Hyperspectral Data Acquisition and Calibration
2.3.1. Image Data Acquisition
2.3.2. Reflectance Calibration
2.3.3. Region of Interest (ROI) Extraction and Dataset Construction
2.4. Model Development
2.4.1. Spectral Data Preprocessing
- (1)
- FD: To resolve the problem that substrate characteristic peaks in contaminated samples may be obscured or overlapped, the FD algorithm was applied to the spectral data. By calculating the rate of change in spectral reflectance with respect to wavelength, this method can effectively remove wavelength-independent additive baseline drift and sharpen broad overlapping peaks into separable characteristic signals. The calculation is shown in Equation (2):
- (2)
- SNV: This transformation was used to reduce the effects of surface scattering noise and optical path-length variation in diffuse reflectance spectra of solid samples. Unlike correction methods that depend on population-level statistics, SNV adopts an independent standardization strategy for each individual spectrum. Specifically, each spectrum is centered and variance-normalized according to Equation (3):
- (3)
- MSC: This method is likewise employed to eliminate spectral deviations arising from non-uniform particle distribution and differences in surface scattering levels, but it operates on the assumption of a mean reference spectrum. The algorithm first computes the mean spectrum across all samples as a reference baseline, and then performs a univariate linear regression between each measured spectrum and the reference spectrum. The calculation is shown in Equations (4) and (5):
2.4.2. Establishment of Classification Models
- (1)
- SVM: The SVM model is a classical supervised learning algorithm that achieves class separation by identifying an optimal hyperplane in a high-dimensional feature space and is particularly advantageous for small-sample, high-dimensional classification tasks. Considering the high-dimensional and nonlinear nature of spectral data, the radial basis function (RBF) was selected as the kernel function to map the input vectors into a higher-dimensional space and address linear inseparability. Its mathematical expression is given in Equation (6):
- (2)
- 1D-CNN: The 1D-CNN model is a deep feedforward neural network that performs sliding-window operations along spectral sequences using convolutional kernels. Through local receptive fields and weight-sharing mechanisms, it can automatically extract hierarchical features with translation invariance from high-dimensional spectral data. The core convolution operation can be expressed as Equation (7):
3. Results and Discussion
3.1. Spectral Feature Analysis of Stained Specimens
3.1.1. Spectral Feature Analysis of Fiber Substrates
- (1)
- Cotton: Dominated by the abundant hydrophilic hydroxyl groups (–OH) in cellulose molecules, the cotton spectrum displays broad and deep characteristic absorption valleys near 1480 nm and 1940 nm, corresponding to the first overtone and combination-band stretching vibrations of O–H bonds, respectively. Additionally, a characteristic combination-band peak near 2100 nm arises from the coupling of internal O–H bending and C–O stretching vibrations within the cellulose structure.
- (2)
- Polyester: As a hydrophobic synthetic fiber, polyester exhibits extremely weak water absorption at 1940 nm. Instead, owing to the presence of aromatic rings and methylene groups in its molecular chain, polyester displays sharp and distinctive dual-valley structural peak profiles at 1660 nm (C–H first overtone) and 2130 nm (C–H combination band), forming a pronounced contrast with cotton.
- (3)
- Poly-cotton blend: The spectral curve of the blended fabric exhibits a characteristic additive effect, with the overall waveform lying intermediate between those of pure cotton and pure polyester. It retains the broad hydrophilic valley of cotton at 1940 nm while also displaying the characteristic sharp peak of polyester at 1660 nm, reflecting the spectral superposition behavior of the mixed components.
3.1.2. Analysis of Stain-Induced Interference Effects
- (1)
- Carbon black: Regardless of the fiber substrate, the spectral reflectance after carbon black loading decreased abruptly across the entire wavelength range and exhibited pronounced flattening. This is attributable to the amorphous carbon and microcrystalline graphite structures in carbon black, which give rise to electronic energy-level transitions that produce strong, non-selective absorption from the visible to the near-infrared region. Following this near-infrared light absorption, the amorphous carbon typically undergoes rapid non-radiative relaxation, converting the absorbed photon energy into local heat [18]. This broadband absorption almost completely shields the interaction between incident light and the underlying fiber, thereby severely masking the substrate fingerprint features.
- (2)
- Oil stain: The principal constituent of oil stains is triglyceride, which is rich in methylene groups (–CH2–) from long-chain fatty acids. At the physical-optical level, the oil film fills the interstitial spaces between fibers, alters the effective surface refractive index, and causes an overall downward shift in the spectral baseline. At the molecular–structural level, the dense C–H bonds in the oil generate specific absorption near 1720 nm (first overtone) and 2300 nm (combination band). Because the polyester substrate also contains abundant C–H bonds, the characteristic absorption positions of the two sources overlap substantially, causing the oil-stain spectrum to manifest as a complex superposition onto the substrate spectrum. This renders the direct waveform-based differentiation between oil-contaminated polyester and clean polyester particularly challenging.
- (3)
- Protein stain: Compared with oil and carbon black stains, the spectral interference of protein stains is more complex owing to the presence of specific functional groups within the protein macromolecular backbone. The backbone contains abundant peptide bonds (–CO–NH–), and the characteristic N–H and C=O bonds exhibit strong absorption near 2060 nm (Amide II band) and 2180 nm (Amide I/III combination band). As observed in Figure 3, these exogenous characteristic peaks are situated precisely between the C–H feature peak of cotton (2100 nm) and the C–H peak of polyester (2130 nm), producing a pronounced cross-overlapping effect. The introduction of these chemical groups causes the characteristic peaks in the composite spectrum to broaden, split, or even undergo peak-position shifts, which can readily trigger the misidentification phenomenon of “different spectra for the same material.”
3.2. Comparative Analysis of Preprocessing Methods
3.3. Analysis of SVM Model
3.4. Analysis of 1D-CNN Model
3.5. Comprehensive Evaluation of Support Vector Machine and Convolutional Neural Network Models
4. Conclusions
- (1)
- Different types of stains introduce complex interference effects on the near-infrared spectra of textiles, significantly altering their intrinsic spectral characteristics. Carbon black causes strong broadband absorption and physical shielding, while oil and protein stains introduce characteristic absorption features that overlap with substrate signals, leading to spectral distortion and reduced separability. These results demonstrate that stain contamination can substantially degrade the reliability of conventional spectral discrimination methods, highlighting the necessity of robust feature extraction strategies under interference conditions.
- (2)
- Preprocessing methods exhibit distinct roles in balancing noise suppression and feature enhancement in mixed spectral systems. Among the evaluated methods, FD preprocessing showed strong capability in enhancing subtle spectral features and improving class separability, particularly under severe interference conditions. However, its effectiveness is closely dependent on the classifier architecture, and the resulting FD-SVM model achieved near-perfect classification performance under the specific experimental conditions of this study. This finding indicates that preprocessing strategies should be carefully matched with downstream models rather than universally applied.
- (3)
- The 1D-CNN model demonstrated strong capability for handling stain-contaminated textile spectra through automatic extraction of discriminative features from raw data without manual preprocessing. Compared with conventional SVM-based approaches, it provides a simplified processing pipeline and improved robustness to spectral variability. This end-to-end learning framework highlights the potential of deep learning methods to enable efficient and stable identification of contaminated textiles in automated detection scenarios.
- (4)
- It should be noted that this study is based on a controlled laboratory-prepared dataset, which introduces certain limitations in representing real-world conditions. Specifically, the carbon black particle size was fixed at 5 μm, the stain volume was standardized at 2 mL, and each stain type was applied at a single concentration. In addition, the stain regions were uniformly distributed in localized circular patterns. While such controlled conditions ensure reproducibility and facilitate systematic analysis, they do not fully capture the complexity of real waste textiles, which may involve unknown stain types, heterogeneous spatial distribution, variable contamination levels, and mixed stains (e.g., coexistence of oil and protein).
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Shen, Y.; Chen, T.; Zhang, L.J. Research progress in recycling and reuse of waste textiles and clothing. J. Text. Res. 2023, 44, 232–239. [Google Scholar] [CrossRef]
- European Topic Centre on Circular Economy and Resource Use (ETC CE). Textile Waste Management in Europe’s Circular Economy (ETC CE Report 2024/5). 2024. Available online: https://www.eionet.europa.eu/etcs/etc-ce/products/etc-ce-report-2024-5-textile-waste-management-in-europes-circular-economy (accessed on 30 April 2026).
- Zhang, Y.; Luo, Y.X.; Xing, T.H.; He, A.N.; Wang, M.Q.; Huang, Z.Y.; Liang, Z.H.; Mei, F.; Chen, F.X. Progress in research of resource recycling and reusing of waste polyester textiles under dual carbon target. Polym. Mater. Sci. Eng. 2023, 39, 182–190. [Google Scholar] [CrossRef]
- Seifali Abbas-Abadi, M.; Tomme, B.; Goshayeshi, B.; Mynko, O.; Wang, Y.; Roy, S.; Kumar, R.; Baruah, B.; De Clerck, K.; De Meester, S.; et al. Advancing textile waste recycling: Challenges and opportunities across polymer and non-polymer fiber types. Polymers 2025, 17, 628. [Google Scholar] [CrossRef] [PubMed]
- National Development and Reform Commission (NDRC) of China. Implementation Opinions on Accelerating the Circular Utilization of Waste Textiles; Document No. Fagai Huanzi 526; NDRC: Beijing, China, 2022. Available online: https://www.gov.cn/zhengce/zhengceku/2022-04/12/content_5684664.htm (accessed on 30 April 2026).
- Ghosh, J.; Repon, M.R.; Rupanty, N.S.; Asif, T.R.; Tamjid, M.I.; Reukov, V. Chemical valorization of textile waste: Advancing sustainable recycling for a circular economy. ACS Omega 2025, 10, 11697–11722. [Google Scholar] [CrossRef] [PubMed]
- Standring, Z.; Macintyre, L.; Jiang, G.; Bucknall, D.; Arrighi, V. Impact of chemicals and processing treatments on thermo-mechanical recycling of polyester textiles. Molecules 2025, 30, 2758. [Google Scholar] [CrossRef] [PubMed]
- Johns, M.A.; Zhao, H.; Gattrell, M.; Lockhart, J.; Cranston, E.D. Identification of common textile microplastics via autofluorescence spectroscopy coupled with K-means cluster analysis. Analyst 2024, 149, 4747–4756. [Google Scholar] [CrossRef] [PubMed]
- Bonifazi, G.; Gasbarrone, R.; Palmieri, R.; Serranti, S. A characterization approach for end-of-life textile recovery based on short-wave infrared spectroscopy. Waste Biomass Valorization 2024, 15, 1725–1738. [Google Scholar] [CrossRef]
- Furferi, R.; Servi, M. A machine vision-based algorithm for color classification of recycled wool fabrics. Appl. Sci. 2023, 13, 2464. [Google Scholar] [CrossRef]
- Tian, R.; Lv, Z.Q.; Fan, Y.H.; Wang, T.Y.; Sun, M.J.; Xu, Z.Q. Qualitative classification of waste garments for textile recycling based on machine vision and attention mechanisms. Waste Manag. 2024, 183, 74–86. [Google Scholar] [CrossRef] [PubMed]
- Faghih, E.; Saki, Z.; Moore, M. A Systematic literature review—AI-enabled textile waste sorting. Sustainability 2025, 17, 4264. [Google Scholar] [CrossRef]
- Bonifazi, G.; Gasbarrone, R.; Palmieri, R.; Serranti, S. End-of-life textile recognition in a circular economy perspective: A methodological approach based on near infrared spectroscopy. Sustainability 2022, 14, 10249. [Google Scholar] [CrossRef]
- Li, B.; Beveridge, P.; O’Hare, W.T.; Islam, M. The application of visible wavelength reflectance hyperspectral imaging for the detection and identification of blood stains. Sci. Justice 2014, 54, 432–438. [Google Scholar] [CrossRef] [PubMed]
- Kampik, L.; Gruber, S.H.; Weisleitner, K.; Bauer, G.; Steiner, H.; Tous, L.; Hubert Unterberger, S.; Dominikus Pallua, J. Hyperspectral imaging for non-destructive detection of chemical residues on textiles. Textiles 2025, 5, 42. [Google Scholar] [CrossRef]
- Jiang, R.C.; Qu, D.D.; Wang, K.; Liu, G.J.; Dou, X.; Lu, S.R.; Xie, S.J.; Wen, W.Z.; Xu, A.C.; Liang, B. Rapid detection of multiple chemical residues in pure cotton fabric using hyperspectral imaging and deep learning. IEEE Access 2025, 13, 204196–204209. [Google Scholar] [CrossRef]
- GB/T 13174-2021; Determination of Detergency and Cyclic Washing Performance of Laundry Detergents. Standardization Administration of China: Beijing, China, 2021.
- Margraf, J.T.; Strauss, V.; Guldi, D.M.; Clark, T. The electronic structure of amorphous carbon nanodots. J. Phys. Chem. B 2015, 119, 7258–7265. [Google Scholar] [CrossRef] [PubMed]






| Name | Specification/Purity | Manufacturer/Source |
|---|---|---|
| Cotton | Plain woven fabric, 100% cotton; Areal mass: 200 g/m2; Warp density: 110 ends/inch; Weft density: 90 picks/inch; Thickness: 0.32 mm | Hongda Weaving Factory, Shijiazhuang, China |
| Polyester | Plain woven fabric, 100% polyester; Areal mass: 150 g/m2; Warp density: 170 ends/inch; Weft density: 170 picks/inch; Thickness: 0.18 mm | Hongda Weaving Factory, Shijiazhuang, China |
| Poly-cotton blend | Plain woven fabric, 65/35 polyester/cotton blend; Areal mass: 180 g/m2; Warp density: 150 ends/inch; Weft density: 120 picks/inch; Thickness: 0.27 mm | Hongda Weaving Factory, Shijiazhuang, China |
| Carbon black | Particle size: 5 μm | Shanghai Aladdin Biochemical Technology Co., Ltd., Shanghai, China |
| Span-80 | Chemically pure (CP) | Shanghai Aladdin Biochemical Technology Co., Ltd., Shanghai, China |
| Tween-80 | Chemically pure (CP) | Shanghai Aladdin Biochemical Technology Co., Ltd., Shanghai, China |
| Peregal O | Industrial grade | Nantong Hantai Chemical Co., Ltd., Nantong, China |
| Anhydrous ethanol | Analytical reagent (AR) | Zhejiang Tengyu New Materials Technology Co., Ltd., Huzhou, China |
| Protein powder | Food grade | Xindongkang Nutrition Technology Co., Ltd., Changsha, China |
| Soybean oil | Food grade | Yihai Kerry Arawana Holdings Co., Ltd., Shanghai, China |
| Layer/Operation | Filters/Units | Kernel Size | Stride | Padding | Activation | Output Shape |
|---|---|---|---|---|---|---|
| Input | - | - | - | - | - | N, 1 |
| Conv1D 1 + BN | 16 | 21 | 1 | Valid (None) | ReLU | N-20, 16 |
| Max Pooling 1 | - | 2 | 2 | - | - | (N-20)/2, 16 |
| Dropout 1 | Rate = 0.5 | - | - | - | - | (N-20)/2, 16 |
| Conv1D 2 + BN | 32 | 5 | 1 | Valid (None) | ReLU | (N-24)/2, 32 |
| Max Pooling 2 | - | 2 | 2 | - | - | (N-24)/4, 32 |
| Dropout 2 | Rate = 0.5 | - | - | - | - | (N-24)/4, 32 |
| Conv1D 3 + BN | 64 | 3 | 1 | Valid (None) | ReLU | (N-32)/4, 64 |
| Max Pooling 3 | - | 2 | 2 | - | - | (N-32)/8, 64 |
| Dropout 3 | Rate = 0.5 | - | - | - | - | (N-32)/8, 64 |
| Flatten | - | - | - | - | - | 1D Vector |
| Dense (Output) | 12 | - | - | - | Softmax | 12 |
| Preprocessing Method | Fisher Discriminant Ratio | Silhouette Coefficient |
|---|---|---|
| RAW | 395.05 | 0.5164 |
| FD | 1031.36 | 0.8788 |
| SNV | 536.21 | 0.5561 |
| MSC | 557.06 | 0.6568 |
| Model | Test Set Accuracy (%) | Standard Deviation (%) | Average Number of Support Vectors (SVs) | Average Training Time (s) |
|---|---|---|---|---|
| RAW-SVM | 85.17 | 3.14 | 605.4 | 16.02 |
| FD-SVM | 98.17 | 1.33 | 125.7 | 24.68 |
| SNV-SVM | 93.67 | 1.07 | 461.4 | 13.72 |
| MSC-SVM | 94.83 | 2.52 | 367.0 | 11.25 |
| Model | Test Set Accuracy (%) | Standard Deviation (%) | Convergence Epochs |
|---|---|---|---|
| RAW-CNN | 99.58 | 0.56 | 93.0 |
| FD-CNN | 98.75 | 1.41 | 162.8 |
| SNV-CNN | 98.08 | 2.61 | 116.7 |
| MSC-CNN | 98.33 | 1.79 | 108.2 |
| Evaluation Dimension | FD-SVM | RAW-CNN |
|---|---|---|
| Test set accuracy | 98.17% ± 1.33% | 99.58% ± 0.56% |
| Model training cost | 24.68 s (CPU i7-13620H only) | 93.0 Epochs (≈63 s, CPU i7-13620H only) |
| Preprocessing dependency | Strong (FD preprocessing required; raw data accuracy only 85.17%) | None (Bypasses manual mathematical feature engineering) |
| Workflow per single detection | Mathematical preprocessing first, classification prediction later | Direct classification from radiometrically calibrated spectra |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Zou, J.; He, H.; Tian, W.; Zhu, C.; Ye, F.; Jin, X. Hyperspectral Detection and Classification of Stain-Contaminated Waste Textiles. Coatings 2026, 16, 629. https://doi.org/10.3390/coatings16060629
Zou J, He H, Tian W, Zhu C, Ye F, Jin X. Hyperspectral Detection and Classification of Stain-Contaminated Waste Textiles. Coatings. 2026; 16(6):629. https://doi.org/10.3390/coatings16060629
Chicago/Turabian StyleZou, Jiacheng, Haonan He, Wei Tian, Chengyan Zhu, Fei Ye, and Xiaoke Jin. 2026. "Hyperspectral Detection and Classification of Stain-Contaminated Waste Textiles" Coatings 16, no. 6: 629. https://doi.org/10.3390/coatings16060629
APA StyleZou, J., He, H., Tian, W., Zhu, C., Ye, F., & Jin, X. (2026). Hyperspectral Detection and Classification of Stain-Contaminated Waste Textiles. Coatings, 16(6), 629. https://doi.org/10.3390/coatings16060629
