Skip to main content

Ancient Dyes and Artificial Intelligence: A Multifaceted Approach to Exploring Egyptian Textiles

Microfade testing (MFT) is performed on ancient Egyptian textiles to evaluate dye lightfastness.Microfade testing (MFT) is performed on ancient Egyptian textiles to evaluate dye lightfastness.
Post-doctoral scholars with Art Institute of Chicago conservation scientist Giovanni Verri.Post-doctoral scholars with Art Institute of Chicago conservation scientist Giovanni Verri.
Verri and de La Codre examine ancient textiles with hyperspectral imaging (HSI).Verri and de La Codre examine ancient textiles with hyperspectral imaging (HSI).

Textiles made by early Egyptian Christians are remarkable for their vibrant colors that have survived the test of time. Preserved naturally by Egypt’s dry climate, these textiles span centuries of production. Some date from as early as 300 BC, while others can be traced to medieval Coptic practices. Woven into them are the changing histories of the peoples who made them: their faiths, artistic visions, and the materials they used. These textiles vary in shape and size, with patterns ranging from Islamic inscriptions to flourishing vegetation to gods of various faiths.

In a collaboration with the Art Institute of Chicago, the Center for Scientific Studies in the Arts conducted technical analysis of 42 Coptic textiles from the museum’s collection in order to accurately date them and better understand ancient dyeing techniques. The goal is to refine methods of noninvasive, contactless analysis, while also developing the most efficient and effective ways to sort through the data collected—by synthesizing computer and material sciences.


Seeing textiles in a new way

Northwestern postdoctoral scholar Hortense de La Codre is fascinated by this longevity and what it means for human creativity. “I like to see the evolution of techniques, and also the fact that we are still dyeing [fabrics] today—just in different ways,” she says.

Textiles are not only artworks: they are part of everyday life. We wear them on our bodies and decorate our living spaces with them. In earlier times, they were an important part of burial practices. The materials and techniques of these textiles are threads that connect us to the past.

De La Codre’s work on textiles began with her doctoral research at the Archaeosciences Bordeaux Lab in France, where she worked with noninvasive techniques for identifying chemical components of dyes in 18th-century French fabrics. With her interest in how textile dyes degrade under exposure to light, she noted that some of those tapestries have faded more over the last couple centuries than Egyptian fabrics from far earlier.

Scientists need to use careful, contactless methods of analysis when working with any ancient textiles, which are fragile and often bear traces of stains, dirt, and other material traces. To study each textile’s dyes and components, de La Codre combined the non-invasive techniques of hyperspectral imaging (HSI) and X-ray fluorescence (XRF).

X-ray fluorescence (XRF) spectroscopy provides elemental mapping of the textiles, allowing for insight into dyeing techniques.

HSI involves moving a small camera across strips of textiles mounted with netting on a vertical board. The scan separates the image of each textile into millions of pixels, each of which has its own reflectance spectra—curving lines that indicate which wavelengths of light are absorbed by particular dyes, thus giving them their colors. Even for textiles smaller than a half sheet of paper, the scans produce millions of pixels. This mountain of data is later compiled into what are called “data cubes,” which allow researchers to click on any point within a cube and reveal that pixel’s wavelength information. These reflectance spectra allow de La Codre to investigate the dyes and other components of the textiles.

The use of XRF supplements HSI by scanning the entire object to create a map of all the chemical elements contained wit

hin the textile. De La Codre is looking for elements that indicate metallic salts, evidence of the mordants used to help dyes to cling or “bite” onto the fibers that they stain.

It can quickly become arduous to process data at this scale by conventional means. Center researchers worked with Northwestern’s Image and Video Processing Lab to develop a novel algorithm to help sort and synthesize the data.


Algorithms help refine the process

Postdoctoral researcher Henry Chopp has a long history in Northwestern’s computer science department. He started working in the Image and Video Processing Lab as a graduate student in 2017 and continued his post-graduate work there. Although he had never anticipated working in cultural heritage, he became interested in novel applications of computer science to the field.

For this project, Chopp’s job was to eliminate as much of the time spent on processing data as possible. Previous data analysis algorithms had various limitations. Some weren’t spatially aware enough, while others generated too many information clusters to work with.

X-ray fluorescence (XRF) mapping revealed the presence of mordants and other elements related to specific dyes.

What scientists needed was a program specific to the material qualities of textiles: an algorithm capable of clustering all similar-enough pixels together, while maximizing the distance between pixels that weren’t similar enough. Spectra indicating brown dyes would go with spectra indicating brown dyes, while spectra for deep purples would align with spectra for deep purples.

Moreover, de La Codre needed an algorithm that was spatially aware. It needed to be able to detect when a dye was used all over a textile, rather than only in points adjacent to one another.

Chopp first tested the algorithm on various swatches of color separated by a background. When a random pixel is selected from a swatch, the algorithm traces a path that connects all the similar pixels touching it. This tracing function ensures that each swatch is successfully classified as its own cluster—rather than identifying all the swatches as one huge group.

When used on actual textiles, this process initially results in what looks like a patchwork of many highlighter-bright colors, each hue indicating a potential cluster for separate analysis. In one test, for example, the algorithm identified the residual stains on textiles and the netting used to mount them as separate groups.

Therefore, the analysis proceeds by stages. After the first stage of mapping, the algorithm then begins merging some patches into bigger clusters. Researchers can choose the thresholds with which to merge these groups: a lower threshold forms more clusters, while a higher one allows for a much broader range. “These results show how powerful and efficient the algorithm is,” says de La Codre.

This approach is an automated—and much faster—method of sieving through several data cubes and spectra at once. While the idea of going from smaller to larger isn’t new, this Center project is the first application of the method to this specific area of textile-work in cultural heritage.


Future directions

There are still some loose ends to continue pursuing in the research. Following the clustering algorithm, researchers determined representative reflectance spectra for each cluster. A light red shade showed two absorption bands on the spectrum; comparative research on other Coptic textiles suggested the use of madder to dye this shade.

While some reflectance spectra show clear levels of absorption, others are less distinct. Sometimes, an anomaly might show up in the data, or a dye’s identification could be ambiguous. For example, a second cluster showed an absorption maximum that suggested the use of a blue dye like indigo or woad, but there were anomalies in the broad absorption that indicated a mixture or a different dye. The use of XRF as a complementary technique helped provide more information, indicating the presence of bromine, which could indicate the use of Tyrian purple that has previously been identified in Copic textiles.

These anomalies merit further study into dye degradation processes. When dyes deteriorate, they leave behind specific byproducts—similar to how a cup of milk spoils differently compared to molding fruit. Based on the particular molecules left behind by degradation processes, scientists can work backwards to infer what the dye’s original state would have been.

Microfade testing (MFT) is used to evaluate dye lightfastness.

But doing this work to identify dyes isn’t easy when only using contactless analysis. To fully investigate such questions, Center researchers conduct micro-invasive analysis using a tiny sample taken from the textile. Using chromatography coupled with mass-spectrometry allows scientists to separate materials into their basic components and analyze them. De La Codre can then detect and identify the molecules present in textiles, including any potential degradation products.

Researchers will continue to refine the algorithm, reducing any residual randomness and ensuring that each iteration of the algorithm always yields the same results.

The value of this analysis lies in the shared exploration between computer and cultural heritage scientists. “The fact that we were collaborating, I think, is what makes this algorithm great. I could tell him everything I needed, and he was able to actually convert it into the algorithm,” says de La Codre on working with Chopp.

When we think of artificial intelligence, we typically imagine chatbots or robots or perhaps generative AI programs—along with all the baggage and concerns that accompany them. But AI also encompasses programs that allow scientists to read ancient scrolls with minimal contact, algorithms that inform scientists the most ideal spots in a painting to scan, and of course this algorithm for textile analysis. With this algorithm, researchers can quickly collate vast amounts of data to identify dyes and other components, helping textile scholars deepen their understanding of the centuries-old history of dyeing and textile-making.

This, Chopp says, is what his lab is all about. “It’s doing it for some kind of greater purpose,” he says. “AI plus cultural heritage, plus medicine, plus what have you. If anything—just given today's climate with AI and all the politics behind that and whatnot—there is good being done with AI as well. It's not all deepfakes and all that stuff.”

Back to top