PapyrusVision is an AI-powered digital paleography tool for ancient Egyptian hieroglyph analysis. This system combines deep learning with Egyptological knowledge to provide papyrus analysis, automated sign detection, and digital paleography generation.
Training Data: The model was trained on 2,430 manually annotated hieroglyphs from the Book of the Dead of Nu (British Museum EA 10477), covering 177 distinct Gardiner sign categories. This ensures high-quality, scholarly-accurate detection.
Performance: During training (5,000 iterations), the model achieved classification accuracy of approximately 73-78% on detected hieroglyphs, with comprehensive Unicode support for 594+ official mappings.
graph TD
A[Upload Papyrus Image] --> B[AI Hieroglyph Detection]
B --> C[Confidence Filtering]
C --> D[Gardiner Classification]
D --> E[Unicode Mapping]
E --> F{Output Format}
F --> G[Detection Results<br/>JSON/CSV/Visualization]
F --> H[Digital Paleography<br/>Cropped Signs + HTML Catalog]
style A fill:#e1f5fe
style B fill:#fff3e0
style C fill:#f3e5f5
style D fill:#e8f5e8
style E fill:#fff8e1
style F fill:#fce4ec
style G fill:#e3f2fd
style H fill:#e8f5e8
How it works:
- Upload papyrus images
- AI detects and classifies hieroglyphic signs
- Generate digital paleography catalogs
- Export results in multiple formats
Required:
- Python 3.8 or higher must be installed on your system
- Windows: Download from python.org
- macOS: Install via python.org or Homebrew:
brew install python - Linux: Usually pre-installed, or install via package manager:
sudo apt install python3
- Terminal/Command Prompt access
- Windows: Command Prompt, PowerShell, or Windows Terminal
- macOS: Terminal (Applications > Utilities > Terminal)
- Linux: Terminal application
To verify Python installation:
python3 --version # Should show Python 3.8 or higherMethod 1: Download ZIP (No Git Required)
- Download ZIP from GitHub
- Extract the ZIP file to your desired location
- Open terminal/command prompt in the extracted folder:
- Windows: Right-click in the folder → "Open in Terminal" or "Open PowerShell window here"
- macOS: Right-click in the folder → "New Terminal at Folder" (or drag folder to Terminal)
- Linux: Right-click in the folder → "Open in Terminal"
- Run:
python3 install.py
Method 2: Git Clone (Requires Git)
# Clone the repository
git clone https://github.com/MargotBelot/PapyrusVision.git
cd PapyrusVision
# Run the automated installer
python3 install.pyNote: Make sure you have Python 3.8+ installed and can access terminal/command prompt as described in Prerequisites above.
What the installer does:
- Checks system requirements (Python 3.8+, disk space)
- Creates isolated virtual environment
- Installs all dependencies automatically
- Detects your system (Windows/macOS/Linux) and installs appropriate versions
- Handles Detectron2 installation for your platform (CPU/GPU)
- Creates launch scripts for easy startup
- Verifies everything works correctly
After installation, launch the app:
./run_with_env.sh streamlit run apps/unified_papyrus_app.pyYour browser will automatically open to http://localhost:8501
Quick Demo: The app includes a built-in test image (Book of the Dead of Nu, Spell 145) - just click "Analyze Image" to see instant results!
For advanced installation, development setup, and technical details, see docs/TECHNICAL_GUIDE.md
Common Issues:
-
"python3 command not found"
- Try
python --versioninstead ofpython3 - On Windows, you might need to use
pyinstead:py install.py - Reinstall Python and ensure it's added to your system PATH
- Try
-
"Permission denied" errors
- On macOS/Linux, try:
sudo python3 install.py - On Windows, run Command Prompt as Administrator
- On macOS/Linux, try:
-
Can't find terminal/command prompt
- Windows: Press
Win + R, typecmd, press Enter - macOS: Press
Cmd + Space, type "terminal", press Enter - Linux: Press
Ctrl + Alt + T
- Windows: Press
-
Installation fails
- Check you have at least 4GB free disk space
- Ensure stable internet connection for downloading dependencies
- Try the manual installation method below
Click to expand manual installation instructions
1. Install Dependencies
# Create virtual environment (recommended)
python -m venv papyrus_env
source papyrus_env/bin/activate # On Windows: papyrus_env\Scripts\activate
# Install core dependencies
pip install -r requirements.txt2. Install Detectron2
macOS Apple Silicon (M1/M2/M3):
pip install torch torchvision torchaudio
pip install 'git+https://github.com/facebookresearch/detectron2.git'Linux/Windows with GPU:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu118/torch2.0/index.htmlCPU-only (any platform):
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch2.0/index.html3. Run the Application
streamlit run apps/unified_papyrus_app.py- AI Detection: Automatically detect and classify hieroglyphic signs (177 Gardiner categories)
- Interactive Interface: User-friendly web app with built-in test image
- Real-time Analytics: Confidence charts and frequency statistics
- Digital Paleography: Generate cropped sign catalogs with HTML documentation
- Multiple Export Formats: CSV, JSON, HTML, and ZIP archives
- Professional Output: Publication-ready visualizations and reports
- Upload Image: Use built-in test image or upload your own papyrus (PNG, JPG, JPEG, TIFF)
- Analyze: AI detects hieroglyphic signs with confidence scores and Gardiner classifications
- Review Results: Interactive visualizations with color-coded detection boxes
- Generate Paleography: Create professional catalogs with cropped signs
- Export: Download results in CSV, JSON, HTML, or ZIP format
# Analyze single image
./run_with_env.sh python scripts/hieroglyph_analysis_tool.py --image path/to/image.jpg
# Access development environment
./run_with_env.sh jupyter notebook- Detection Results: CSV/JSON with bounding boxes, Gardiner codes, and confidence scores
- Digital Paleography: High-quality cropped signs organized by Gardiner categories
- HTML Catalogs: Professional documentation with embedded images
- Analytics: Charts showing confidence distributions and frequency statistics
- ZIP Archives: Complete packages with organized folder structures
Example Output:
D4 | Eye | 87.3% confidence
N35 | Water ripple | 92.1% confidence
G43 | Quail chick | 79.8% confidence
M17 | Reed leaf | 94.5% confidence
For complete technical documentation, training details, and advanced usage, see docs/TECHNICAL_GUIDE.md
If you use this work in your research, please cite:
@misc{papyrusvision2025,
title={PapyrusVision: AI-Powered Hieroglyph Detection and Digital Paleography},
author={Margot Belot},
year={2025},
url={https://github.com/MargotBelot/PapyrusVision}
}Author: Margot Belot (margotbelot@icloud.com)
Support: Open an issue for questions or bug reports
License: MIT License
Primary Source: Book of the Dead of Nu (British Museum EA 10477)