Part 1: Deep Learning Models to Classify Roman Coins
An introduction to the project.
Introduction
I started this blog to document my journey applying deep learning to ancient coin classification. I collect primarily ancient Roman Republican and Roman Imperial coins. My academic and professional background is in computer engineering and computer science—specifically, computer engineering of CPU hardware is what I work on professionally. Beyond an occasional script and hobby projects like this one, I had not directly applied my computer science and ML interests in my day-to-day work.
After taking deep learning courses on Coursera many years ago, I decided to combine my passions for numismatics and machine learning.
I developed ResNet-based deep learning image classification models using Keras and TensorFlow to classify Roman Republican and Roman Imperial coins, and deployed them on my website, ancientcoinid.com. Much of that original training was done locally on an NVIDIA RTX 2080 Ti GPU.
While those initial models reached a solid baseline of accuracy, I had many ideas I wanted to pursue further. However, finding the time to explore them was difficult—until recently.
The advent of AI-assisted coding and agentic workflows has turbocharged this effort. I have been using Google Antigravity to pair-program, analyze model performance, and engineer architectural enhancements across the pipeline. With these new improvements underway, it felt like the right time to document the methodology, experiments, and results.
Additionally, I have upgraded my hardware and am now using an NVIDIA RTX 5090 GPU and an NVIDIA DGX Spark.
Recent Developments in Roman Republican Coin Classification
I will elaborate on the baseline model and subsequent architectural iterations in detail in upcoming posts. Here is a brief overview of where the project started and what has been achieved so far.
My Roman Republican coin classifier processes images combining both coin faces (a 150×150 obverse and 150×150 reverse side-by-side into a single 300×150 image) and predicts the corresponding Roman Republican coin type ID. I use the catalog format from the Coinage of the Roman Republic Online (CRRO) (e.g., rrc-1.1), which contains comprehensive type information and images based on Michael H. Crawford’s standard reference, “Roman Republican Coinage”.
The Baseline Model
The original baseline was built in TensorFlow/Keras following a ResNet-34 architecture trained from scratch on 33,338 images. While it achieved 97.29% Top-1 accuracy on the training split, its performance on unseen coins was constrained:
- Validation split (6,895 images): 50.94% Top-1 / 69.57% Top-5 / 74.98% Top-10
- Held-out test split (7,063 images): 44.74% Top-1 / 61.86% Top-5 / 67.35% Top-10
This baseline model is currently live on ancientcoinid.com/rrcoinid.php, where users can upload coin images to receive the model’s Top-10 candidate predictions.
Modernizing the Architecture
Using AI-assisted experimentation, I built an interactive explorer application to deeply inspect error modes and modernized the computer vision pipeline:
- Backbones & Metric Learning: Upgraded the convolutional backbone to ConvNeXt and integrated ArcFace metric learning.
- Ensembling: Combining these representations via reciprocal rank fusion pushed Test Top-1 accuracy to 69.26% and Test Top-10 accuracy to 86.22%.
- Multimodal VLM Re-Ranking: Fine-tuned a Gemma 4 (4B) Vision-Language Model to inspect target coin images alongside the CNN’s Top-10 candidate descriptions. The VLM is trained to either re-rank the correct Crawford type or actively trigger an Option K (“None of the choices”) rejection if the candidate pool is wrong.
| Pipeline Stage | Test Top-1 Accuracy | Test Top-5 Accuracy | Test Top-10 Accuracy |
|---|---|---|---|
| Original ResNet-34 Baseline | 44.74% | 61.86% | 67.35% |
| Modernized Ensemble Pipeline | 69.26% | — | 86.22% |
What’s Next
Future posts will dive deep into the history of this project and the recent improvements. In addition to the technical details of developing the classification models, I will post about how I’ve used AI assistance in this effort as that itself is new and potentially interesting.
I hope this series proves insightful for numismatists, computer vision practitioners, and anyone interested in AI engineering and fine-grained classification.