AI-Driven Clothing Verification: Smartphone-Powered Infrared Spectroscopy

Researchers at Fraunhofer have developed an ultra-compact near-infrared spectrometer suitable for recognizing and analyzing textiles. Mixed fabrics can also be reliably identified through the combination of imaging, special AI (artificial intelligence) algorithms and spectroscopy. The technology could be used to optimize recycling old clothing, so old apparel could be sorted according to type. A highly miniaturized version of the system can even fit into a smartphone. This could lead to a host of new applications for end-users in everyday life — from checking clothes when out shopping to detecting counterfeits.

© Fraunhofer IPMS
If the label with cleaning instructions is no longer legible: A quick check with a smartphone, and the integrated spectrum analyzer recognizes the fabric the garment is made from. This allows you to set the correct wash cycle.

Infrared spectrometers are powerful measuring instruments when it comes to non-destructive analysis of organic materials. The Fraunhofer Institute for Photonic Microsystems IPMS in Dresden has recently developed a spectral analyzer system that recognizes and analyzes textile fabrics. The system can also reliably recognize mixed fabrics. Possible applications range from checking fabrics when out shopping to cleaning garments correctly, and even sustainable, sorted recycling. The spectrometer is so tiny, it can be integrated into a smartphone.

Researchers at Fraunhofer rely on near-infrared (NIR) spectroscopy to achieve the required reliability and accuracy when identifying textiles. The system works for wavelengths between 950 and 1900 nanometers, which is close to the visible spectrum. Advantages of near-infrared technology include being easy to use and having a wide range of applications. “We combine NIR spectroscopy with imaging and AI to achieve higher accuracy when recognizing and analyzing objects,” explains Dr. Heinrich Grüger, research scientist in the Sensoric Micromodules department at Fraunhofer IPMS.

How textile analysis works  

Firstly, a conventional camera module captures an image of the garment. The AI selects a specific point from the fabric’s image data to be examined by the spectral analyzer module. Light reflected from the fabric is captured by the spectrometer module. There, it passes through an entrance slit, is transformed into parallel light beams using a collimating mirror and projected onto a grating using a scanning mirror. Depending on the angle of incidence and exit, the grating splits the light beams into different wavelengths. Light reflected from the grating is directed by the scanner mirror to a detector which captures the light as an electrical signal. An A/D converter then digitizes these signals, which are subsequently analyzed in the signal processor. The resulting spectrometric profile for the textile fabric reveals which fibers it is made from by comparing to a reference database.“ The optical resolution is 10 nanometers. This high resolution means the NIR spectrometer can also use AI to identify mixed fabrics such as items of clothing made from polyester and cotton,” says Grüger. Measuring just 10 mm × 10 mm and being 6.5 mm thick, the system is so compact it could easily be integrated into a standard smartphone.

Recycling old clothing

Grüger sees an important application for the AI-controlled spectrometer when it comes to recycling. According to the Federal Statistical Office of Germany, approximately 176,200 tons of textile and clothing waste was collected from private homes in Germany in 2021. NIR spectroscopy could improve recycling efficiency and reduce the mountain of old clothing. This would enable companies that recycle old clothing to sort it more efficiently and faster. Textiles that are still in one piece, for instance, go to the second-hand trade. Damaged textiles are sorted for recycling, and the fibers they are made from, such as linen, silk, cotton or lyocell, can be reused. Severely soiled textiles would be incinerated or processed into insulation mats, for example. Spectroscopic identifies and sorts textiles more accurately and much faster than a human can.

If NIR spectroscopy was to be integrated into a smartphone, end-users might also benefit from the Fraunhofer institute’s technology. When buying clothes, a quick check with a smartphone reveals whether that expensive silk scarf is genuinely made from silk, or whether that exclusive dress from the fashion label is not instead a counterfeit, exposed through an alternative mix of fabrics. And should the label with the cleaning instructions no longer be legible, the smartphone has a textile scanner to identify the fabric and so determine the appropriate wash cycle.

Food check and dermatology  

Researchers at Fraunhofer IPMS can even envisage applications beyond the textile industry. Smartphones fitted with spectrometers might be used to provide information about the quality of groceries such as fruit and vegetables when out shopping. The technology might conceivably also be used to examine skin. A quick scan with the cell phone spectrometer could identify particularly dry or greasy patches. Perhaps applications in medical diagnostics might even be conceivable — examining patches of skin where a melanoma is suspected, for example — but this would need professional involvement too.

In the developmental phase, the Fraunhofer team benefited from decades of experience building NIR spectrometers using MEMS technology (microelectromechanical systems). “Over the years, we have succeeded in miniaturizing large laboratory spectroscopy instruments using MEMS technology to make it suitable for mobile use too,” says Grüger. In 2000, together with current institute director, Prof. Harald Schenk, he invented the scanning grating spectrometer, which is still regarded as the entry point into MEMS spectroscopy.