AI Model for Textile Materials Identification Using Hyperspectral Data
Abstract
1. Introduction
- Carbon-black dyes obscuring underlying spectral signatures [10,11]: This problem is well-known in plastic recycling, where some plastic recycling industries are moving towards more expensive mid-infrared spectrum devices [7,12] for improved detection, as longer wavelengths are more successful in detecting carbon.
- Elastane in blends [7]: Even small elastane fractions can determine whether a textile is suitable for mechanical or chemical recycling; accurate identification of elastane (including low-percentage content) is critical for ensuring that materials are routed to the appropriate recycling pathways [1].
- The need for spatially resolved decisions across heterogeneous garments rather than single-point measurements.
- Construction of a spectral database via semi-automatic sampling using lab-verified textiles;
- Introduction of a process of spatial clustering prior to region classification, allowing accurate identification of regions characterised by different spectra, including regions containing carbon-black dye;
- Identification and exclusion of carbon-black-dye-affected clusters so that composition estimation is restricted to unmasked regions.
2. Related Work
2.1. Hyperspectral/NIR Sensing for Textile Identification
2.2. Machine Learning and Neural Networks for Spectral Textile Classification
- Constructs a lab-verified spectral database via semi-automatic sampling;
- Conducts spatial clustering prior to detection to produce region-wise composition estimates;
- Explicitly identifies carbon-black-affected clusters so that composition estimation is restricted to unmasked regions.
3. Materials and Methods
3.1. Textile Test Samples
3.2. Hyperspectral System Setup and Data Acquisition
- Place test textile samples individually on the linear stage;
- Move the linear stage under software control over a pre-specified length;
- Scan the moving sample with the hyperspectral camera;
- At the end of the scan, save the acquired data for later analysis.
3.3. Data Pre-Processing: Region Extraction, Sampling, and Clustering
3.3.1. Region Extraction
3.3.2. Patch-Based Spectral Sampling
3.3.3. Handling Textiles with Multiple Spectral Signatures
3.4. Neural Network Model Architecture
- Fibre composition (cotton, polyester, and elastane; continuous outputs), with 3 output neurons;
- The presence of carbon-black dye (binary output), with 1 output neuron.
- Regression head: for cotton, polyester, and elastane, interpreted as fractional fibre contributions.
- Classification head: indicating the probability that the input spectral signature is affected by carbon-black dye.
- Batch size: 16;
- Number of filters in convolution layer: 3;
- Convolution layer kernel size: 3;
- Hidden layer size: 36;
- Initial learning rate: 0.001.
3.5. Neural Network Training and Validation Procedures
Training–Validation Split
3.6. Performance Metrics
3.6.1. Fibre Identification—Mean Absolute Error
3.6.2. Carbon-Black Dye Detection—Binary Accuracy
3.6.3. Elastane Contribution—Categorical Accuracy
- No elastane;
- 1–3% elastane;
- >3% elastane.
4. Results
4.1. Independent Test Set Evaluation on Additional Textile Samples
4.2. Fibre Composition Detection Precision (Absolute Errors)
4.3. Carbon-Black Dye Classification Accuracy
4.4. Elastane Content Evaluation (Absolute and Relative Performance)
5. Detection Workflow in Model Execution (Inference)
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- ACT UK Consortium. Automatic-Sorting for Circularity in Textiles: ACT UK Final Report; UKFT: London, UK, 2025; Available online: https://ukft.org/innovation/act-uk/ (accessed on 22 March 2026).
- Mehrubeoglu, M.; Van Sickle, A.; Turner, J. Detection and identification of plastics using SWIR hyperspectral imaging. Imaging Spectrom. XXIV Appl. Sens. Process. 2020, 11504, 85–95. [Google Scholar] [CrossRef]
- Singh, M.K.; Hait, S.; Thakur, A. Hyperspectral imaging-based classification of post-consumer thermoplastics for plastics recycling using artificial neural network. Process Saf. Environ. Prot. 2023, 179, 593–602. [Google Scholar] [CrossRef]
- Moroni, M.; Mei, A. Characterization and separation of traditional and bio-plastics by hyperspectral devices. Appl. Sci. 2020, 10, 2800. [Google Scholar] [CrossRef]
- Tamin, O.; Moung, E.G.; Dargham, J.A.; Yahya, F.; Omatu, S. A review of hyperspectral imaging-based plastic waste detection state-of-the-arts. Int. J. Electr. Comput. Eng. 2023, 13, 3407–3419. [Google Scholar] [CrossRef]
- Liu, Y.; Tao, F.; Yao, H.; Kincaid, R. Feasibility study of assessing cotton fiber maturity from near infrared hyperspectral imaging technique. J. Cotton Res. 2023, 6, 21. [Google Scholar] [CrossRef]
- Cura, K.; Rintala, N.; Kamppuri, T.; Saarimäki, E.; Heikkilä, P. Textile recognition and sorting for recycling at an automated line using near infrared spectroscopy. Recycling 2022, 6, 11. [Google Scholar] [CrossRef]
- Riba, J.-R.; Cantero, R.; Riba-Mosoll, P.; Puig, R. Post-consumer textile waste classification through near-infrared spectroscopy, using an advanced deep learning approach. Polymers 2022, 14, 2475. [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]
- Cosentino, A. Identification of pigments by multispectral imaging; a flowchart method. Herit. Sci. 2014, 2, 1–12. [Google Scholar] [CrossRef]
- Oka, R.; Iwasaki, S.; Masui, T. Improvement of near-infrared (NIR) reflectivity and black color tone by doping Zn2+ into the Ca 2 Mn 0.85 Ti 0.15 O 4 structure. RSC Adv. 2019, 9, 38822–38827. [Google Scholar] [CrossRef] [PubMed]
- Rintala, N. NIRS Identification of Black Textiles: Improvements for Waste Textiles Sorting. Bachelor’s Thesis, Lahti University of Applied Sciences, Lahti, Finland, 2019. Available online: https://urn.fi/URN:NBN:fi:amk-2019062017408 (accessed on 26 March 2026).
- Du, W.; Zheng, J.; Li, W.; Liu, Z.; Wang, H.; Han, X. Efficient recognition and automatic sorting technology of waste textiles based on online near infrared spectroscopy and convolutional neural network. Resour. Conserv. Recycl. 2022, 180, 106157. [Google Scholar] [CrossRef]
- Clothing Labels: Accurate or Not? Available online: https://www.circle-economy.com/resources/clothing-labels-accurate-or-not (accessed on 19 March 2026).
- Eghtedari, F.; Pecyna, L.; Evans, R.; Pastell, A.; McLeod, S.; Dulanty, S. Identification of Textile Fibres Using a Near Infra-Red (NIR) Camera. J. Imaging 2025, 11, 96. [Google Scholar] [CrossRef] [PubMed]
- Chen, Y.; Lin, Z.; Zhao, X.; Wang, G.; Gu, Y. Deep learning-based classification of hyperspectral data. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2014, 7, 2094–2107. [Google Scholar] [CrossRef]
- Fei, Y.; Li, Z.; Wang, D.; Ni, C. The rapid detection of foreign fibers in seed cotton based on hyperspectral band selection and a lightweight neural network. Agriculture 2025, 15, 1088. [Google Scholar] [CrossRef]
- Global Fiber Production Hits 132 Million Tons, Polyester Leads the Charge. Available online: https://www.modaes.com/global/companies/world-fiber-production-132-million-tons-and-more-polyester (accessed on 26 March 2026).
- Global Polyester Production Climbs While Cotton Declines and Viscose Holds Steady, Fashion Network. Available online: https://uk.fashionnetwork.com/news/Global-polyester-production-climbs-while-cotton-declines-and-viscose-holds-steady,1766448.html (accessed on 26 March 2026).
- TensorFlow: An End-to-End Platform for Machine Learning. Available online: https://www.tensorflow.org/ (accessed on 22 March 2026).
- TensorFlow, tf.keras.optimizers.Adam. Available online: https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/Adam (accessed on 26 March 2026).
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]











| Job No. | Fabric Description | Sample | Claimed Composition | Laboratory Test Results | % Error |
|---|---|---|---|---|---|
| 290566 | Pink Pattern Knit Fabric | 1 | 95% Polyester; 5% Elastane | 90.4% Polyester; 9.6% Elastane | 4.6 |
| 290567 | Pink Knitted Fabric | 2 | 95% Polyester; 5% Elastane | 97.6% Polyester; 2.4% Elastane | 2.6 |
| 290568 | Multi-Stripe Knitted Fabric | 3 | 95% Polyester; 5% Elastane | 95.7% Polyester; 4.3% Elastane | 0.7 |
| 290569 | Navy Knitted Fabric | 4 | 95% Polyester; 5% Elastane | 95.8% Polyester; 4.2% Elastane | 0.8 |
| 290571 | Nude Mesh Fabric | 5 | 95% Polyester; 5% Elastane | 94.7% Polyester; 5.3% Elastane | 0.3 |
| 290572 | Red Knitted Fabric | 6 | 95% Polyester; 5% Elastane | 95.8% Polyester; 4.2% Elastane | 0.8 |
| 290573 | Blue/Black Tartan Woven Fabric | 7 | 95% Polyester; 5% Elastane | 95.7% Polyester; 4.3% Elastane | 0.7 |
| 290574 | Turquoise Satin Woven Fabric | 8 | 95% Polyester; 5% Elastane | 96.3% Polyester; 3.7% Elastane | 1.3 |
| 290575 | Pink Faux Suede Knitted Fabric | 9 | 95% Polyester; 5% Elastane | 92.8% Polyester; 7.2% Elastane | 2.2 |
| 290642 | Black Floral Woven Fabric | 10 | 95% Polyester; 5% Elastane | 92.9% Polyester; 7.1% Elastane | 2.1 |
| 290576 | Tan Woven Fabric | 11 | 95% Cotton; 5% Elastane | 97.0% Cotton; 3.0% Elastane | 2 |
| 290577 | White/Multi-Print Woven Fabric | 12 | 95% Cotton; 5% Elastane | 96.8% Cotton; 3.2% Elastane | 1.8 |
| 290578 | Stone Woven Fabric | 13 | 95% Cotton; 5% Elastane | 98.0% Cotton; 2.0% Elastane | 3 |
| 290579 | Red Floral Woven Fabric | 14 | 95% Cotton; 5% Elastane | 96.7% Cotton; 3.3% Elastane | 1.7 |
| 290580 | Mustard Woven Fabric | 15 | 95% Cotton; 5% Elastane | 98.0% Cotton; 2.0% Elastane | 3 |
| 290581 | Deer Print Knitted Fabric | 16 | 95% Cotton; 5% Elastane | 94.2% Cotton; 5.8% Elastane | 0.8 |
| 290582 | Pink Love Print Knitted Fabric | 17 | 95% Cotton; 5% Elastane | 93.4% Cotton; 6.6% Elastane | 1.6 |
| 290583 | Navy Tractor Print Knitted Fabric | 18 | 95% Cotton; 5% Elastane | 94.1% Cotton; 5.9% Elastane | 0.9 |
| 290584 | Navy Floral Knitted Fabric | 19 | 95% Cotton; 5% Elastane | 92.9% Cotton; 7.1% Elastane | 2.1 |
| 290643 | Mustard Knitted Fabric | 20 | 95% Cotton; 5% Elastane | 96.0% Cotton; 4.0% Elastane | 1 |
| 290585 | Lilac with White Spot Woven Fabric | 21 | 65% Polyester; 35% Cotton | 64.0% Polyester; 36.0% Cotton | 1 |
| 290586 | Pink with White Spot Woven Fabric | 22 | 65% Polyester; 35% Cotton | 64.4% Polyester; 35.6% Cotton | 0.6 |
| 290587 | Peach Floral Woven Fabric | 23 | 65% Polyester; 35% Cotton | 63.6% Polyester; 36.4% Cotton | 1.4 |
| 290588 | Black/Multi-Print Woven Fabric | 24 | 65% Polyester; 35% Cotton | 66.7% Polyester; 33.3% Cotton | 1.7 |
| 290589 | Green Christmas Party Woven Fabric | 25 | 65% Polyester; 35% Cotton | 63.7% Polyester; 36.3% Cotton | 1.3 |
| 290590 | Blue/White Zig Zag Woven Fabric | 26 | 65% Polyester; 35% Cotton | 65.5% Polyester; 34.5% Cotton | 0.5 |
| 290591 | Emerald Green Woven Fabric | 27 | 65% Polyester; 35% Cotton | 65.2% Polyester; 34.8% Cotton | 0.2 |
| 290644 | Cat Print Woven Fabric | 28 | 65% Polyester; 35% Cotton | 65.6% Polyester; 34.4% Cotton | 0.6 |
| 290645 | Black Bow Print Woven Fabric | 29 | 65% Polyester; 35% Cotton | 64.7% Polyester; 35.3% Cotton | 0.3 |
| 290646 | Blue with Pink Floral Print Woven Fabric | 30 | 65% Polyester; 35% Cotton | 67.3% Polyester; 32.7% Cotton | 2.3 |
| 290592 | Brown/White Check Woven Fabric | 31 | 65% Cotton; 35% Polyester | 52.5% Polyester; 47.5% Cotton | 12.5 |
| 290593 | Green/Blue Tartan Woven Fabric | 32 | 65% Cotton; 35% Polyester | 80.0% Polyester; 20.0% Cotton | 15 |
| 290594 | Brown/Black Tiger Print Woven Fabric | 33 | 65% Cotton; 35% Polyester | 67.2% Polyester; 32.8% Cotton | 2.2 |
| 290595 | Snow Leopard Woven Fabric | 34 | 65% Cotton; 35% Polyester | 68.3% Polyester; 31.7% Cotton | 3.2 |
| 290596 | Black/White Zebra Woven Fabric | 35 | 65% Cotton; 35% Polyester | 77.5% Polyester; 22.5% Cotton | 12.5 |
| 290597 | Camouflage Multi-Woven Fabric | 36 | 65% Cotton; 35% Polyester | 81.1% Polyester; 18.9% Cotton | 16.1 |
| 290598 | Wild Cat Printed Woven Fabric | 37 | 65% Cotton; 35% Polyester | 80.5% Polyester; 19.5% Cotton | 15.5 |
| 290599 | Red Tartan Woven Fabric | 38 | 65% Cotton; 35% Polyester | 78.6% Polyester; 21.4% Cotton | 13.6 |
| 290647 | Cow Print Woven Fabric | 39 | 65% Cotton; 35% Polyester | 79.2% Polyester; 20.8% Cotton | 14.2 |
| 290648 | Patchwork Print Woven Fabric | 40 | 65% Cotton; 35% Polyester | 67.5% Polyester; 32.5% Cotton | 2.5 |
| 291042 | Coral Woven Fabric | 41 | 80% Polyester; 20% Cotton | 82.8% Polyester; 17.2% Cotton | 2.8 |
| 291045 | Mint Woven Fabric | 42 | 80% Polyester; 20% Cotton | 97.2% Polyester; 2.8% Cotton | 17.2 |
| 291046 | Dinosaur Print Woven Fabric | 43 | 80% Polyester; 20% Cotton | 80.7% Polyester; 19.3% Cotton | 0.7 |
| 291047 | Ghost Print Woven Fabric | 44 | 80% Polyester; 20% Cotton | 82.0% Polyester; 18.0% Cotton | 2 |
| 291284 | Fox Print Woven Fabric | 45 | 80% Polyester; 20% Cotton | 90.4% Polyester; 9.6% Cotton | 10.4 |
| 291529 | Pink Floral Woven Fabric | 46 | 80% Polyester; 20% Cotton | 79.4% Polyester; 20.6% Cotton | 0.6 |
| Error Range | Percentage of Population |
|---|---|
| <1% | 30.4 |
| ≥1% | 69.6 |
| ≥2% | 50.0 |
| ≥3% | 31.4 |
| ≥4% | 23.9 |
| ≥5% | 21.7 |
| >10% | 19.6 |
| Job No. | Fabric Description | Sample | Claimed Composition | Laboratory Test Results |
|---|---|---|---|---|
| 901-0576 | Ribbed Hat (Red) | TA01 | 60% Polyester, 26% Acrylic, 12% Nylon, and 2% Elastane | 60.5% Polyester, 25.9% Acrylic, 12% Nylon, and 1.6% Elastane |
| 129-5184 | Pom Pom Hat (Grey) | TA02 | 56% Polyester; 44% Acrylic | 55% Polyester; 45% Acrylic |
| 661-7367 | Quarter Zip Jumper (Black) | TA03 | 46% Polyester, 32% Viscose, and 22% Polyamide | 46.1% Polyester, 32.2% Viscose, and 21.7% Polyamide |
| 903-0298 | Zip Hoody (Grey) | TA04 | 64% Cotton; 36% Polyester | 64.4% Cotton; 35.6% Polyester |
| 901-1373 | Scarface Print T-shirt (Grey/Print) | TA05 | 99% Cotton; 1% Viscose | 98.9% Cotton; 1.1% Viscose |
| 450-9038 | Long Sleeve T-shirt (Grey) | TA06 | 90% Cotton, 5% Elastane, and 5% Viscose | 88.1% Cotton, 6.9% Elastane, and 5% Viscose |
| 902-1905 | Vertical Stripe Dress (Pink/White) | TA07 | 55% Linen; 45% Viscose | 53.5% Linen; 46.5% Viscose |
| 905-1894 | Puff Sleeve Top (Blue) | TA08 | 98% Polyester; 2% Elastane | 99% Polyester; 1% Elastane |
| 902-2966 | Stripe Dress (Green/White) | TA09 | 100% Cotton | 100% Cotton |
| 903-0461 | Utility Trousers (Blue) | TA10 | 100% Lyocell | 100% Lyocell |
| 901-0205 | Midi Skirt (Blue/Black) | TA11 | 95% Polyester; 5% Elastane | 92.5% Polyester; 7.5% Elastane |
| 123-1271 | Stripe Mesh Slip (Cream) | TA12 | Main 84% Nylon; 16% Elastane | 83.6% Nylon; 16.4% Elastane |
| 196-1666 | Soft Touch Leggings (Black) | TA13 | 95% Viscose; 5% Elastane | 95% Viscose; 5% Elastane |
| 902-7032 | Compression Shorts (Grey) | TA14 | 89% Nylon, 10% Elastane, and 1% Cotton | 89% Nylon, 10% Elastane, and 1% Cotton |
| 616-9546 | Children’s Leggings (Blue) | TA15 | 95% Cotton; 5% Elastane | 95% Cotton; 5% Elastane |
| 616-9546 | Children’s Leggings (Grey) | TA16 | 93% Cotton, 5% Elastane, and 2% Polyester | 93% Cotton, 4.6% Elastane, and 1.9% Polyester |
| 904-5074 | Children’s Chinos (Brown) | TA17 | 98% Cotton; 2% Elastane | 97.3% Cotton; 2.7% Elastane |
| 100-5845 | Quarter Button Jumper (Grey) | TA18 | 83% Cotton; 17% Nylon | 81.9% Cotton; 18.1% Nylon |
| 616-9546 | Children’s Leggings (Multi) | TA19 | 95% Cotton; 5% Elastane | 95% Cotton; 5% Elastane |
| Sample | Ground Truth | Detection | ||||||
|---|---|---|---|---|---|---|---|---|
| Cotton | Polyester | Elastane | Black Dye | Cotton | Polyester | Elastane | Black Dye | |
| TA04 | 0.64 | 0.36 | 0.00 | 0.00 | 0.70 | 0.26 | 0.01 | 0.00 |
| TA08 | 0.00 | 0.99 | 0.01 | 0.00 | 0.02 | 0.97 | 0.03 | 0.00 |
| TA09 | 1.00 | 0.00 | 0.00 | 0.00 | 0.96 | 0.03 | 0.04 | 0.00 |
| TA11 | 0.00 | 0.93 | 0.07 | 0.00 | 0.04 | 0.95 | 0.04 | 0.00 |
| TA15 | 0.95 | 0.00 | 0.05 | 0.00 | 0.96 | 0.02 | 0.05 | 0.00 |
| TA16 | 0.93 | 0.02 | 0.05 | 0.00 | 0.95 | 0.03 | 0.03 | 0.00 |
| TA17 | 0.97 | 0.00 | 0.03 | 0.00 | 0.96 | 0.02 | 0.05 | 0.00 |
| TA19 | 0.95 | 0.00 | 0.05 | 0.00 | 0.96 | 0.02 | 0.05 | 0.00 |
| TA19B | 0.95 | 0.00 | 0.05 | 1.00 | 0.21 | 0.79 | 0.00 | 1.00 |
| Cotton | Polyester | Elastane | Average | |
|---|---|---|---|---|
| Mean error | 3.8 (3.7)% | 3.7 (3.6)% | 0.9 (1.2)% | 2.8 (3.3)% |
| Mean error (not-black region) | 2.1 (1.6)% | 2.0 (1.4)% | 1.2 (1.0)% | 1.8 (1.4)% |
| Mean error (carbon-black region) | 7.1 (4.4)% | 7.1 (4.0)% | 0.4 (1.3)% | 4.9 (4.7)% |
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
Eghtedari, F.; Pecyna, L.; Evans, R. AI Model for Textile Materials Identification Using Hyperspectral Data. J. Imaging 2026, 12, 226. https://doi.org/10.3390/jimaging12060226
Eghtedari F, Pecyna L, Evans R. AI Model for Textile Materials Identification Using Hyperspectral Data. Journal of Imaging. 2026; 12(6):226. https://doi.org/10.3390/jimaging12060226
Chicago/Turabian StyleEghtedari, Fariborz, Leszek Pecyna, and Rhys Evans. 2026. "AI Model for Textile Materials Identification Using Hyperspectral Data" Journal of Imaging 12, no. 6: 226. https://doi.org/10.3390/jimaging12060226
APA StyleEghtedari, F., Pecyna, L., & Evans, R. (2026). AI Model for Textile Materials Identification Using Hyperspectral Data. Journal of Imaging, 12(6), 226. https://doi.org/10.3390/jimaging12060226

