Menu

1 / 3

Teaching a CNN to read hieroglyphs: 96.9% on 59 signs, and why my first model failed

DEV Community: machinelearning·Omar Essam El Sherbiny·about 12 hours ago
#OcQevVN8
Reading 0:00
15s threshold

Every Egyptian hieroglyph has a catalogue number. Egyptologists use Alan Gardiner's sign list, so the owl is G17, the reed leaf is M17, the water ripple is N35. I wanted to see how far a small convolutional network could get at the first step of reading a wall: look at one carved sign and say which one it is.

The answer, on held-out glyphs: 96.9% right at the first guess and 99.7% within five guesses , across 59 signs. The more useful part of the story is the first model, which failed, and what fixed it.

The data

The GlyphDataset (Franken and van Gemert, ACM Multimedia 2013, MIT licence) has 4,210 manually labelled glyphs cut from ten photographs of the Pyramid Texts in the pyramid of Unas at Saqqara, each a 50×75 px greyscale crop. It covers 172 signs, but most of them appear only a handful of times, so I kept the 59 signs with at least ten examples: 3,674 glyphs, split 70/10/20 with stratification (2,571 train, 368 validation, 735 test).

The imbalance is the defining feature of this dataset.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.