This repository presents a custom (non-official) PyTorch-based implementation of the Glyphnet classifier introduced in the work A Deep Learning Approach to Ancient Egyptian Hieroglyphs Classification, 2021 and applies it to the data accompanying the work "Automatic Egyptian Hieroglyph Recognition by Retrieving Images as Texts", 2013 (NB! Glyphnet paper uses a larger dataset).
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
G17 | G26 | G25 | G4 | G5 | G43 |
We hope that this implementation of the model will encourage the further research in this direction.
UPDATE April 2022: the original AUTHORS' CODE is now available.
Please see requirements.txt
.
TL;DR: run prepare_data.sh
, then main.py
.
An entry point is the script prepare_data.sh
that downloads the dataset and splits it into train/test
parts in a 'stratified' manner, i.e. keeping all labels with just a single image in the training set,
yet preserving similar label counts distributions in each part of the dataset.
It should print
DEBUG:root:Labels total: 172
DEBUG:root:Labels seen just once: 37
before shutting down.
Training script main.py
uses standard hydra configuration mechanism; the parameters one can modify
at the CLI call can be found in configs/...
.
python3 main.py model.epochs=10
If you use the GlyphNet model, please cite the original work:
@article{barucci2021deep,
title={A Deep Learning Approach to Ancient Egyptian Hieroglyphs Classification},
author={Barucci, Andrea and Cucci, Costanza and Franci, Massimiliano and Loschiavo, Marco and Argenti, Fabrizio},
journal={IEEE Access},
volume={9},
pages={123438--123447},
year={2021},
publisher={IEEE}
}
If you use the dataset, please cite the original work:
@inproceedings{franken2013automatic,
title={Automatic Egyptian hieroglyph recognition by retrieving images as texts},
author={Franken, Morris and van Gemert, Jan C},
booktitle={Proceedings of the 21st ACM international conference on Multimedia},
pages={765--768},
year={2013}
}
Citing this repository is also appreciated:
@misc{glyphnetpytorch2021alekseev,
title = {{alexeyev/glyphnet-pytorch: GlyphNet, PyTorch implementation}},
author = {Anton Alekseev},
year = {2021},
url = {https://github.com/alexeyev/glyphnet-pytorch},
language = {english}
}
- Add a practical usage scenario using data augmentation
- Add an end-to-end image-to-prediction inference script using a pre-trained GlyphNet model
- morrisfranken/glyphreader, the source of the Pyramid of Unas data
- Please do not confuse this work with another GlyphNet project training networks to communicate using a visual language