Using multimodal imaging and machine learning to understand hand-coloured photographs

<First Published in ICON PhMG Blog, 2021, after Conservation Roundtable. .>

Artificial intelligence seems to be the exclusive preserve of those who already possess computer intelligence; or so I thought. Having used machine learning in my work for the last year, while having no particular skill with computers, I am excited to report that all it requires is some patience, a deft hand with a mouse or touchpad, and some free software.

An Example of Multimodal Imaging. Detail from photo, in (clockwise top left) visible, UV induced visible luminescence, UV false colour, and IR false colour. 

I spent last year immersed in Japanese hand-coloured albumen prints to investigate how they were coloured, and how this affected their stability. I had barely finished imaging them when the covid-19 lockdowns began. This is where machine learning comes in. 

But first, a note on imaging. 

Multimodal imaging is the easiest non-invasive way to investigate colour. An object is not only photographed in visible light, but also in other modes such as UV and IR reflectance; in these modes the camera captures just reflected UV and IR. In addition, I also captured induced luminescence in visible light as well as IR. Here UV radiation causes luminescence (fluorescence) in visible light; and visible light causes luminescence in IR. I also imaged the photographs in coaxial illumination, which is generally used to photograph Daguerrotype plates in the negative. 

The aim of all these imaging modalities was to gain an idea of the response of the colours across various spectra. Based on this, conjectures can be made about the composition of the colourant [1]. This is, of course, a precursor to actual technical analysis with XRF or SERS, etc. How does one cope with large sets of images in various modes? 

Enter trainable WEKA segmentation [2] in Image J. WEKA is an open source plugin for Image J, which is itself open source; it makes machine learning as easy as highlighting the area you are interested in and pressing “train classifier”. 


 The WEKA classifier interface 

Using WEKA allows one to select a feature, train the algorithm, and run as many photos as one wants through it. The algorithm does the heavy lifting and picks out the features you selected. By default it is set up to identify colours, but different variants exist in the segmentation tools of Image J. 

A combination of WEKA and multimodal imaging allowed me to rapidly identify patterns of colour distribution across multiple photographs; so that rather than facing the drudgery of mapping colours, I could study how they behaved. 


 

The image begs a question: why is the green colour so matte, in comparison to the rest of the areas? The algorithms are not limited to mapping colours in one photo. They can also be used to find patterns of colour distribution across multiple images. 

For example, here are the colour distributions for tinting dyes in the paper present over the multiple images.

 




Top: Images in IR False Colour to track Mineral pigments

Bottom: Areas with possible presence of tinting Dyes.


Of course, one need not be limited to just a small set of photographs. If the input images are calibrated with a white balance and a white level (having a colour reference in the frame helps), the algorithms will be able to process and segment the images. This is of particular use when dealing with large collections, such as those held by institutions, or with images scraped from the web. The only limit is your computer’s processing power, and the time at hand to train the algorithms.

Here are some brief instructions for using WEKA, from the appendices of my thesis Daubing Titipu: Colourants in Japanese Albumen Prints [3] 

To create the segmentation, the following process was used. 

● Open TIFF image in Image J and convert to RGB by image>colour>stack to RGB. (TIFF not necessary, just be consistent with format). 

● Open trainable WEKA segmentation by plugins>segmentation>trainable WEKA segmentation. 

● Select areas belonging to various classes by highlighting and adding to classes. Multiple classes can be created. 

● Train the algorithm and verify the result by checking the log files. The error should be below 1%. If more, retrain. 

● Create probability maps, and apply the model to other images by clicking apply Model 

 ● Save finished probability maps. The finished maps are grayscale TIFF multichannel images, with each channel belonging to a class. 

These should be separated by using image>stack>stack to images; and saved; and ideally thresholded by image>adjust>threshold 

[1] For a better treatment on this, refer to: Aldrovandi, Alfredo, Ezio Buzzegoli, Annette Keller, and Diane Kunzelman. “Investigation of Painted Surfaces with a Reflected UV False Color Technique.” 8th international conference on “Non-Destructive Investigations and Microanalysis for the Diagnostics and Conservation of the Cultural and Environmental Heritage”: Lecce (Italy), 15-19 May 2005, 2005, 1–19. 
[2] Arganda-Carreras, Ignacio, Verena Kaynig, Curtis Rueden, Kevin W Eliceiri, Johannes Schindelin, Albert Cardona, H Sebastian Seung, and Harvard John A Paulson. “Trainable Weka Segmentation: A Machine Learning Tool for Microscopy Pixel Classification.” Bioinformatics 33, no. 15 (2017): 2424–26. https://doi.org/10.1093/bioinformatics/btx180. 
[3] Sharma, Rahul. “Daubing Titipu: Colorants in Japanese Albumen Prints”. University of Amsterdam Conservation and Restoration 2020.

Comments