https://github.com/alexeyev/glyphnet-pytorch
Сracking Egyptologist's MNIST: PyTorch implementation of the Glyphnet model introduced in "A Deep Learning Approach to Ancient Egyptian Hieroglyphs Classification", Barucci et al., 2021.
https://github.com/alexeyev/glyphnet-pytorch
computer-vision deep-learning egyptian-hieroglyphics egyptology hieroglyph-recognition hieroglyphics inception
Last synced: 6 months ago
JSON representation
Сracking Egyptologist's MNIST: PyTorch implementation of the Glyphnet model introduced in "A Deep Learning Approach to Ancient Egyptian Hieroglyphs Classification", Barucci et al., 2021.
- Host: GitHub
- URL: https://github.com/alexeyev/glyphnet-pytorch
- Owner: alexeyev
- License: mit
- Created: 2021-11-24T20:43:23.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-06T06:57:25.000Z (about 3 years ago)
- Last Synced: 2025-04-12T03:07:53.044Z (6 months ago)
- Topics: computer-vision, deep-learning, egyptian-hieroglyphics, egyptology, hieroglyph-recognition, hieroglyphics, inception
- Language: Python
- Homepage:
- Size: 62.5 KB
- Stars: 14
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# glyphnet-pytorch

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](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9528382)
and applies it to the data accompanying the work ["Automatic Egyptian
Hieroglyph Recognition by Retrieving Images as Texts", 2013](https://jvgemert.github.io/pub/FrankenACMMM13egyptian.pdf)
(NB! Glyphnet paper uses a larger dataset). |  |  |  |  | 
------------ | ------------- | ------------- | ------------- | ------------- | -------------
G17 | G26 | G25 | G4 | G5 | G43We hope that this implementation of the model will encourage
the further research in this direction.**UPDATE** April 2022: [the original AUTHORS' CODE](https://github.com/GAIA-IFAC-CNR/Glyphnet) is now available.
## Requirements
Please see `requirements.txt`.
## Quickstart
**TL;DR: run `prepare_data.sh`, then `main.py`.**
### Setting everything up
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: 37before shutting down.
### Training
Training script `main.py` uses standard **hydra** configuration mechanism; the parameters one can modify
at the CLI call can be found in `configs/...`.```bash
python3 main.py model.epochs=10
```## How to cite
If you use the GlyphNet model, please cite the original work:
```bibtex
@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:
```bibtex
@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:
```bibtex
@misc{glyphnetpytorch2021alekseev,
title = {{alexeyev/glyphnet-pytorch: GlyphNet, PyTorch implementation}},
author = {Anton Alekseev},
year = {2021},
url = {https://github.com/alexeyev/glyphnet-pytorch},
language = {english}
}
```## TODO
* Add a practical usage scenario using [data augmentation](https://albumentations.ai/)
* Add an end-to-end image-to-prediction inference script using a pre-trained GlyphNet model## Notes
* [morrisfranken/glyphreader](https://github.com/morrisfranken/glyphreader),
the source of the [Pyramid of Unas](https://en.wikipedia.org/wiki/Pyramid_of_Unas) data
* Please do not confuse this work with another [GlyphNet project](https://github.com/noahtren/GlyphNet)
training networks to communicate using a visual language