marwantosolve/archforge-mamluk-cairo
ArchForge — Mamluk / Islamic Cairo Architecture Dataset A small, curated, licence-documented image dataset of Mamluk and Islamic Egyptian architecture, built for LoRA style adaptation on FLUX.1-dev. 39 images at 512x512px, 33 train / 6 validation. Built as part of ArchForge — a time-boxed proof of concept, not a production dataset. The evaluation, the LoRA adapter and the comparison grid are linked from there. Why this dataset exists The target is a style, not a… See the full description on the dataset page: https://huggingface.co/datasets/marwantosolve/archforge-mamluk-cairo.
ArchForge — Mamluk / Islamic Cairo Architecture Dataset
A small, curated, licence-documented image dataset of Mamluk and Islamic Egyptian architecture, built for LoRA style adaptation on FLUX.1-dev. 39 images at 512x512px, 33 train / 6 validation.
Built as part of ArchForge — a time-boxed proof of concept, not a production dataset. The evaluation, the LoRA adapter and the comparison grid are linked from there.
Why this dataset exists
The target is a style, not a subject: carved limestone facades, pointed arches, muqarnas vaulting, mashrabiya screens, ablaq striped stonework, domes and minarets of historic Cairo. The curation work was therefore mostly rejection — Wikimedia Commons categories mix architecture with book scans, museum objects, architectural plans, paintings, lithographs, and buildings from other countries entirely.
Provenance and licensing
Every image comes from Wikimedia Commons and retains its original licence. No image was scraped from a source without a checkable licence, and no licence was inferred. Attribution for each file is recorded in metadata.csv and listed below.
Reuse obligation: most files are CC BY or CC BY-SA, which require attribution and (for SA) share-alike. If you reuse this dataset, carry the per-image attribution in the table below. Public domain and "no restrictions" files carry no such condition.
Curation method
- Collection (
scripts/collect_dataset.py) — MediaWiki API enumeration over 36 Mamluk/Islamic Cairo categories, filtering on a 800px minimum edge and JPEG/PNG only. - Review — every candidate was inspected visually on a contact sheet at two zoom levels. 123 candidates were reviewed; 39 were kept.
- Rejection — 20 candidates were rejected for a recorded reason. The dominant failure modes were:
- Wrong country — Portuguese colonial facades, Agra and Delhi monuments, Aleppo, the Armenian Quarter, all reaching these categories through shared vocabulary ("mashrabiya", "muqarnas").
- Not a photograph — 19th-century lithographs (David Roberts), orientalist paintings (J. F. Lewis), book scans, architectural plans.
- Modern architecture — 20th/21st-century apartment towers, modern mosques with no Mamluk vocabulary, construction cranes, night shots dominated by LED lighting.
- Museum objects — mashrabiya screens photographed as artefacts, not in situ. Each rejection and its reason is recorded in
data/exclusions.csv. - Quality control (
scripts/build_dataset.py) — corrupted-file drop, perceptual-hash deduplication (64-bit pHash, Hamming distance <= 10), 512px centre-crop and resize, deterministic 85/15 split seeded at 0.
Deduplication found 0 duplicates at that threshold; this was verified rather than assumed, by confirming the hash function separates a JPEG-recompressed copy of an image (distance 0) from a genuinely different image (distance 36).
Structure
data/train/ 33 images, 512x512 PNG
data/validation/ 6 images, 512x512 PNG
metadata.csv image_path, caption, source, architectural_style, split,
license, license_url, artist, title, category, phash
captions.jsonl caption, style token, VLM base description, provenance
data/selected.csv the curated allowlist (pageid + note)
data/exclusions.csv rejected candidates with reasonsCaptions
Each caption follows [STYLE TOKEN] + description + structural elements + materials + viewpoint, for example:
mamluk_architecture, historic Islamic courtyard in Cairo, carved limestone facade, pointed arches, geometric stone ornamentation, warm natural light, architectural photographyThe architectural vocabulary is grounded in the image's recorded Wikimedia category rather than generated freely, so the template cannot invent a minaret on a doorway.
Limitations
- Small (39 images) and heavily weighted toward Cairo. Not a general Islamic architecture dataset.
- Wikimedia Commons bias — photographs are skewed toward well-documented, tourist-accessible monuments, and toward the aesthetics of the contributing photographers.
- Not deduplicated against the wider web — only against itself.
- Some images contain minor modern intrusions (street furniture, signage, vehicles) that were judged not to dominate the frame.
