AI-ding History

Artificial Intelligence, AI, has a history. The term was first introduced in 1956. A clunky definition would be “The theory and development of computer systems to perform tasks normally requiring human intelligence, e.g. speech recognition, visual perception or translation between languages." 

AI is how we make machines intelligent, while machine learning is the implementation of the computer methods that support it. Ian Ross looks at how we can use these 21st century techniques to improve our appreciation and understanding of historical artefacts. The last section on visual perception applies face verification to identify unknown faces in the Belton archives.

Identifying a face in an image

Machine learning identifies facial landmarks. These are a set of easy-to-find points on a face, such as the pupils or the tip of the nose. By default, there are 27 predefined landmark points (left). Once the face is identified it is subject to various AI techniques as outlined below.

Viscount Tyrconnel face upscaled x 2

1590 x 2000 pixels

Upscaling

Converting lower resolution images to a higher resolution, i.e. one with more pixels. Pixel comes from picture element and is similar to the dot seen on a screen. It's like going from a standard definition TV to a high definition. This particular programme focuses on the human face. And so, it doesn't enhance any oil painting cracks! 

It works on photographs too, below.

2nd Earl Brownlow & the Honourable Adelbert Wellington Brownlow-Cust Albumen print (Royal Collection Trust)

Upscaled

An Unknown C17 Young Gentleman, (NT436140) is discussed further below. Upscaling by x2 reveals the extra detail extracted.

Colourisation

The machine learning model performs colourisation based on semantic meanings, such as grass is green, the sky is blue, and faces are pink. While we can be certain the photographed subjects had pink faces and hands, clothing colours are impossible to prove, but add to the realism, as Lady Marion demonstrates.

Lady Marion Alford with her two sons (Royal Collection Trust).

Sheila Loughborough, one of the bright young things in Belton's visitor book. From a black and white photograph.

5th Baron Brownlow colourised

Which do you prefer? Lady Sophia Frances Cust, later Lady Tower (1811-1882), John Hume Egerton, later Viscount Alford, MP (1812-1851) and Captain, The. Hon. Charles Henry Cust (1813-1875) as a boy. The B&W original or in colour with upscaling x 2. Sophia shows one of the defects of AI, a 'zombie' left hand, an unrecognised shape for colourisation.

Personal characteristics

Trained on very large datasets of faces with known characteristics, machine learning can tag subjects with age and sentiment. The red dots on Adelbert’s face signify 64 anatomical landmarks extracted by AI. The red boxes enclose these landmarks. AI then probes the face within for characteristics like age, sex and emotion. The computer labels Adelbert, born in 1844, as a 25-year-old male. This would place the print’s unknown year of creation to around 1867 at the latest when the 2nd Earl died. Was Adelbert’s ‘angry’ face because mum kept telling him to keep still for the albumen photograph’s 5-to-10-minute exposure?

Deep fakery

Allows us to bring to life the face captured in the computer using movement from a video of a real person. Teeth included!

The original image of the 1st Earl left, is the top left cropped from his portrait below.

John Cust (1779–1853), 1st Earl Brownlow, GCH, FRS, MP. Martin Archer Shee (1769–1850)

Play Viscount Tyrconnel's video

Tyrcgraffitistill.mp4

Having captured the face we can dub what words we want like this low resolution example from our web site on historical graffiti at Belton.

Another example of animation, this time of Kitty Brownlow from her famous portrait by Simon Elwes painted in 1939. Prepared using MyHeritage Nostalgia.

Synthetic images

AI is proficient in producing impressively photorealistic high-quality photos of faces that don't exist. This is the 1st Baron Brownlow reimagined.

Facial recognition & verification

If we have an unknown photograph or portrait of a person is there a way to identify that individual?

Face detection picks out faces, but without remembering details. In the examples below, a purple box is drawn around that face. 

Face recognition uses that detection to identify a face in a photo or portrait against a pre-existing database of faces. Face verification compares two faces and gives a probability of them being identical. 

Here we use two independent machine learning programmes. Azure's Face API gives a probability between 0 and 1, typically 'yes' to the same person if 0.5 or above, 'no' if <0.5. Amazon Rekognition's face comparison provides a similarity score, typically >85% for the same person.

Below are examples of Belton faces compared to a reference image of Kitty Brownlow in 1952 the year of her death.

Kitty Brownlow, 1952. Reference image for verification of other images.

Kitty engagement photo 1927. The two faces belong to the same person. Confidence is 0.76. Similarity score 96%.

Kitty profile (NT 436465). The two faces belong to the same person. Confidence is 0.78. Similarity score 100%.

Kitty portrait 1939 (NT 436150). The two faces belong to the same person. Confidence is 0.76. Similarity score 93%.

Maud Brownlow, Kitty's mother-in-law. The two faces belong to different people. Confidence is 0.09. Similarity score 0%.

Viscount Tyrconnel. The two faces belong to different people. Confidence is 0.10.   Similarity score 0%.

Caroline Cust, Kitty's daughter, 1952. The two faces belong to different people. Confidence is 0.38. Similarity score 12%

Jean Norton, Kitty's older sister, 1926. The two faces belong to different people. Confidence is 0.13. Similarity score 7%.

Results

Confidence is less certain with Kitty's blood relations where some similarity is expected, but still discriminates. AI has no issue with adult age, portraiture, nor with Kitty's face in profile. But it works best with frontal face views.

These two machine learning programmes were trained on millions of faces each. The process extracts high-quality features from the face to create a 128 element vector representation of these features, called a face embedding. This is used as the mathematical comparison between faces. Colour is unimportant as the image is grey scaled before analysis. The embedding is a relatively low-dimensional space into which are translated high-dimensional vectors - the measurements from the face. The closeness or distance between these embeddings determines likeness.

Using face verification

Let's take an oil painting bought at the 1984 auction as possibly of Kitty Brownlow and apply AI. Comparing this painting to photographs of Dorothy Power. The results detailed below support that this painting is Lady Dorothy Brownlow (née Power) or her during one of 4 earlier marriages. Peregrine Brownlow married Dottie, as she was called, in 1954 after Kitty's death as his second wife. 

Reference image, an oil painting on canvas, described possibly of Katherine Hariet Kinloch, Lady Brownlow. British (English) School, circa 1950/52 NT 436176. Compared to our Kitty reference photo above, the two faces belong to different people. Confidence is 0.1. Similarity score 0%.

Either the artist's representation is poor or this is not Kitty.

Dorothy Rice Power (1902-1966), The Tatler 22 July 1936. Compared to the oil painting left, the two faces belong to the same person. Confidence is 0.57.  Similarity score 21%.

Dorothy Beatty (née Dorothy Rice Power) in an earlier marriage. Divorced 1945. Compared to the oil painting, the two faces belong to the same person. Confidence is 0.68.  Similarity score 50%.

Lady Dorothy Brownlow. Compared to the oil painting, the two faces belong to the same person. Confidence is 0.72.  Similarity score 69%.

Countess Beatty, formerly Dorothy Power Sands. Pictured in a natural colour photograph vivex print by Madame Yevonde. Confidence is 0.5. Similarity score 63%.

Results

The reference oil painting was compared to 7 images each of Kitty and Dottie. The chart shows the median (bar), minimum and maximum scores using the Azure Face API. The median face verification confidence was 0.6 that this is Dottie compared to 0.1, that it is Kitty.

The similarity scores for Dorothy with the painting are not above 85%. But compared to the Kitty comparison they are much higher. The reference painting had a median similarity score of 2% with 10 photographs of Kitty. This compares to a median of 63% for 8 photographs of Dorothy. 

A Mann-Whitney U Test indicates a significant difference between the two results for both AI programmes (p<0.05).

A Silver Locket

Further confusion arises with a silver locket engraved with Leila. Stated is, a photographic portrait of the late Lord Brownlow's second wife. But his second wife was Dorothy above!

This is Leila Reynolds, or during one of two previous marriages as Mrs Player or Lady Manton. The oil painting of Dorothy and the locket photo belong to different people. Confidence is 0.12. The locket image belongs to known photos of Leila as below. She married Peregrine Brownlow as his third wife in 1969.

Locket NT 437353.

Lady Manton 1938. The locket face and above belong to the same person. Confidence 0.67. Similarity score 94%.

Leila Player. The locket face and above belong to the same person. Confidence 0.78. Similarity score 100%.

A Flapper

AI confirms the left-hand photo, below as Peregrine Brownlow's cousin, Barbara, Maud Brownlow's sister's daughter.

A black and white photograph of an unknown young lady. Hairstyle short, flapper style. Picture is marked on reverse - Jan 31, Druce (NT 437700).

Mabel Barbara Joan (née Dillon/Druce) Gielgud (1906-1985). Actress, newspaper publicity shot from 1924 & upscaled/colourised with AI.

The two faces belong to the same person. Confidence is 0.79, similarity score 98%.

Facial recognition and identification is not related to the colour of the image or the medium

Below right is Phillip Mercier's oil on canvas 1725 conversation piece at Belton with Eleanor Brownlow, Viscountess Tyrconnel in her wheelchair. Left is Mercier's preparatory study of Eleanor in red, black and white chalk on watermarked paper. The two faces have a 74% match based on OpenCV Face Recognition.

Mrs Frances Dayrell in the swing and her husband Francis Dayrell have a failed match with Eleanor's pastel (<66%).

A 'new' portrait of 'Young' Sir John Brownlow?

Here arises uncertainty with C17 portraiture. The arbitrary cut-off of 0.5 for 'yes' or 'no' is too crude. The Belton oil painting of an 'unknown' on the left is compared to know portraits of Young Sir John’ Brownlow (YSJB), family members and unrelated faces from the C17. We know that Old Lady Brownlow paid £6 for painting of YSJB for his marriage on March 26, 1676. Could this be the painting of the sixteen-year-old? 

We only have three verified portraits of YSJB, making a statistical approach difficult. We must rely on a graphical representation of the data for inference. And so, facial identity is explored with the two machine learning programmes above and then finally with a third, the VGG Face Descriptor.

Oil painting on canvas, An Unknown Young Gentleman, British (English) School, late 17th century (NT436140).

Oil painting on canvas (oval), YSJB (1659-1697), British (English) School, late 17th century (NT 436101). The two faces belong to the same person. Confidence is 0.71. Similarity score 87%.

YSJB c1685 (NT 436005.1). The two faces belong to the same person. Confidence is 0.74. Similarity score 86%.

YSJB undated (NT 436066) . The two faces belong to the same person. Confidence is 0.89. Similarity score 100%.

Similarity scores (Amazon Rekognition) comparing the unknown young man with 3 YSJB portraits and those of 13 family & 13 unrelated C17 portraits. Maximum, median and minimum values for each group. 

AI seems to confirm that this is a portrait of a young John Brownlow. Calculating the similarity score using Amazon Rekognition graphically infers that the unknown is YSJB, left. In BNLW 4/6/8 John writes that Alice his wife was to pay the cost of £6.

Using Azure Face API the median confidence with the YSJB portraits is 0.7. With 12 family members it's 0.5, while that of 8 C17 unrelated portraits from ArtUK is likewise 0.5. This is a smaller sample, because Azure Face API  rejects more faces if not of high enough resolution, compared to Rekognition.

Euclidean distance

Since preparing this article, I have updated the face verification with a fourth painting of YSJB from Grimesthorpe Castle (above left, unknown above right), acquired May 2022. 

A third way of determining similarity is to measure the Euclidean distance between the face embedding vectors using the VGG Face Descriptor (Visual Geometry Group, University of Oxford). The closer the faces are related, the shorter the Euclidean distance. Again, the reference is the unknown man versus the known 4 YSJB portraits and 50 C17/C18 male portraits. 

A box & whisker representation of the distances is given below. The boxes indicates the median, lower & upper quartiles, the whiskers the two extremes.

As with the two other methods, the four YSJB portraits have the shortest distance to the unknown.

Statistical Analysis

Student's t-test can be used for normally distributed samples of any size down to N=2. The Lilliefors test of Normality indicates that the 4 YSJB portrait Euclidean distances are from a normal distribution. For the 50-portrait sample, the magnitude of the difference between the sample distribution and the normal distribution is medium, p<0.05. However, The t-test is valid for large samples from non-normal distributions. Applying the t-test to the Euclidean distance of the 4 portraits of YSJB and the unrelated portrait sample, the YSJB oils are highly significantly closer to the unknown portrait. The p-value equals 0.00006675.

The Permutation Test also confirms the difference between the mean Euclidean distances as highly significant.

Hence, both graphically and statistically the Unknown Young Man is highly likely to be another portrait of YSJB.

We can then move on to using OpenCV Age Detection with Deep Learning to estimate his perceived age. This reports that he falls in the 15 to 20 year age group. 

But AI struggles with perceived age and another model puts him at 29 versus, 28, 31 & 34 for the ages of the known YSJB portraits.

Upscaled and using the human eye he does appear as the youngest of all 4 portraits! The wisps of hair over his forehead suggests that his hair is naturally long at this 'young' age.

Pepys warned of the risk of nits and the plague acquired from wearing periwigs. The Great Plague of London, lasted from 1665 to 1666. 

Wigs & face identification

Identifying the portrait faces is befuddled by the narrower face of bewigged men. Apparent from the rectangular shape of the identifying boxes around YSJB and the squarer boxes around the modern images above. AI programmes are trained on 21st century photographs of real faces. A C17 artist's interpretation of a bewigged head lacks feature details present in modern photographs. The box plot below shows the facial area calculated by a machine learning face detection programme in 10 each of C17 male portraits and C21 male photographs. The bewigged face area is significantly less in size than modern male (Mann-Whitney U test P<0.01). The condition of the painting and the quality of photography will all affect the result. This explains both the difficulty in identification and ageing historical portraits.

Face Clustering

Face clustering is unsupervised learning, different from above - we have only the faces themselves. From there we need to identify and count the number of unique people in a dataset. Each resulting cluster (ideally) represents a unique individual. Once again a face embedding 128-dimension feature vector is extracted from each face then the vectors close together are clustered, graphically. Below is the result for Kitty Brownlow, Dorothy Beatty and YSJB included are the Unknown Young Gentleman and the painting labelled as possibly Kitty.

Kitty cluster

Dorothy cluster

YSJB cluster with the Unknown Young Gentleman

Unknown, but the two photographs are of Dorothy

The faces were submitted to machine learning altogether without any labelling. The result is clustering almost as a human would predict. The Unknown Young Gentleman clusters with YSJB. The exception is the Kitty painting which falls into the unknown category along with two Dorothy photographs. This approach works best with a near full face view rather than profiles.

Text Mining

Analysing large chunks of text as found in the Brownlow archival documents is another target for AI. Text mining transforms the free (unstructured) text in documents into normalized, structured data suitable for analysis. One such role is the extraction of keywords from the Belton Establishment accounts, in this case the voluminous records kept by John Trigg, steward to Alice Brownlow (transcript March to January 1703, Julian calendar). Is there a difference in purchases when at Belton during 1703 compared to when living in rented accommodation at Holland House, London the same year? Having extracted those nouns a word cloud highlights differences based on the top 150 words keeping Trigg's vernacular spelling.

Belton

The Belton accounts emphasise chickins , ducks, salmon, cockells, pigeons, fish, shrimp, sheep, bullocks, veale, eggs, butter, lemons, wheat and east [yeast] for bread made at Belton. 

Measures: stone, strike, pound, gallons, side of meat. 

Killed, the weekly slaughter for meat. Letters to and from Jane & Lady Brownlow appear.

Local places like Grantham the source of near weekly deliveries and Stapleford the home of the Sherards.

Holland House

The most striking difference in London is bill. Far more produce is purchased rather than made on site, like bread. Activities like washing and transport figure. Spot Charemen, Sedan chair men and flambos for lighting on the way home.

Conduit & Turns reflect the lack of running water, water is bought in by the tun, an English wine cask unit, from a conduit, possibly the one a short distance away in Kensington Palace.

Flower in Trigg spelling covers flowers, flour and floor.

Named Entity Recognition

is another machine learning process, e.g.

“Person”: Mark Zuckerberg, “Company”: Facebook, “Location”: United States

Applied to the 4,799 word letters of Lucy Cust, we isolate,

Allington, Denton, Baker St, Mrs Fane, Batchelor, Holywell, Henry, Kelly, Brownlow, Fulbeck among many others all names and places from her letters.

Sentiment analysis 

reports these letters as negative with 63% probability. The letters reflect her anxiety about losing parliamentary seats in a coming general election.