AI Pharaoh is an integrated artificial intelligence platform that bridges modern machine learning with Ancient Egyptian cultural heritage. It combines computer vision, natural language processing, and augmented reality to support both hieroglyph interpretation and monument-based cultural exploration.
The system operates through two main pipelines:
Pipeline A — Hieroglyph Translation Raw inscription image → glyph detection (YOLOv8) → segmentation (SAM) → hierarchical classification (ConvNeXt, 1,080 Gardiner codes) → spatial ordering → transliteration → NLP translation → English output
Pipeline B — Monument Recognition & AR Monument photo → detection (YOLOv8m) → knowledge base lookup → AR 3D overlay with audio narration
AI-Pharaoh/
├── src/ # Core pipeline source code
│ ├── pharaonic_dashboard.py # Streamlit UI
│ ├── config.py # Configuration loader
│ └── process_images.py # Headless batch processor
├── translation/ # NLP translation engine (beam search, SRL, discourse)
├── transliteration/ # Gardiner sign → phonetic conversion
├── orientation/ # Spatial ordering & reading direction
├── docs/ # Full stage-by-stage documentation
├── mobile-app/ # Unity AR application source (C#)
├── mobile-backend/ # Colab-based API backend (FastAPI + ngrok)
├── desktop-launcher/ # Desktop application source
├── config.example.json # Example configuration (copy to config.json)
├── requirements.txt # Python dependencies
├── LICENSE # MIT License
└── .gitignore
# 1. Clone the repository
git clone https://github.com/your-username/AI-Pharaoh.git
cd AI-Pharaoh
# 2. Install dependencies
pip install -r requirements.txt
# 3. Copy and edit configuration
cp config.example.json config.json
# Update model paths in config.json to match your setup
# 4. Run the dashboard
streamlit run src/pharaonic_dashboard.pyNote: Pre-trained model weights (
.pt/.pth) are not included in this repository. See Model Weights below.
Full pipeline documentation is available in docs/:
| Document | Description |
|---|---|
| Pipeline Overview | End-to-end system walkthrough |
| Stage 1: Input & Config | Image ingestion & config |
| Stage 2: YOLO Detection | Glyph proposal generation |
| Stage 3: SAM Segmentation | Mask refinement |
| Stage 4: NMS | Box + mask non-max suppression |
| Stage 5: Classification | ConvNeXt hierarchical classifier |
| Stage 6: Orientation | Reading direction estimation |
| Stage 7: Spatial Ordering | Reading sequence reconstruction |
| Stage 8: Transliteration | Gardiner → phonetic conversion |
| Stage 9: Translation | NLP translation engine |
| Stage 10: Monument Detection | Artifact recognition |
The model weight files are not included in this repository due to size constraints. They are available on request. The following weights are needed:
| Model | File | Size |
|---|---|---|
| YOLOv8 glyph detector | best.pt |
~18 MB |
| SAM segmentation | sam_vit_b_01ec64.pth |
~358 MB |
| Stage 1 classifier (29 families) | best_stage1_model.pt |
~106 MB |
| Stage 2 classifier (1,080 codes) | stage2_best_model.pth |
~110 MB |
| YOLOv8m monument detector | best.pt |
~64 MB |
| Orientation classifier | orientation_model.pth |
~9 MB |
| Component | Metric | Value |
|---|---|---|
| Hieroglyph Detection (YOLOv8) | Test Accuracy | 92.1% |
| Stage 1 Classification (29 families) | Test Accuracy | 96.77% |
| Stage 2 Classification (1,080 codes) | Test Accuracy | 93.2% |
| Combined End-to-End | Accuracy | 89.44% |
| Monument Detection (YOLOv8m) | Test Accuracy | 88.6% |
| Spatial Ordering | Sequence Accuracy | 100% (synthetic) |
| Transliteration (known codes) | Phonetic Accuracy | 98.2% |
- Detection: Ultralytics YOLOv8
- Segmentation: Meta SAM ViT-B
- Classification: ConvNeXt Tiny (Facebook AI)
- NLP: Custom beam search + SRL pipeline
- AR: Unity ARFoundation + ARCore
- UI: Streamlit, React (desktop launcher)
- Backend: FastAPI, ngrok
This project is licensed under the MIT License — see LICENSE.
If you use this work in your research, please cite:
@misc{ai_pharaoh_2026,
title={AI Pharaoh: An Integrated AI Platform for Ancient Egyptian
Heritage Interpretation},
author={AI Pharaoh Team},
school={October University for Modern Sciences and Arts (MSA)},
year={2026}
}