
Philatelists often maintain large collections of postal stamps stored across multiple albums. Over time, these collections grow into entire shelves, making it increasingly difficult to:
- Keep track of what stamps are already owned
- Find a specific stamp quickly
- Search by visual appearance or textual metadata
While digitization seems like the obvious solution, existing tools are either cloud-based, heavyweight, or require significant technical expertise. What was needed was a simple, fast, and offline-first solution that could work for hobbyists—not just AI engineers.
Design Goals
From the beginning, the tool was designed with the following requirements:
- Lightweight – minimal memory and storage footprint
- Local-first – runs entirely offline
- Search by image and text – including semantic search
- Easily extensible – future models and features can be added
- Simple GUI – usable by non-technical users
- Pre-built binaries – one-click install for Windows and macOS
Exploring Possible Solutions
The first approach involved Meta’s Segment Anything Model (SAM). While SAM performed impressively without any training, it came with significant drawbacks:
- Required a large model size (300+ MB) for reliable segmentation
- Needed additional post-processing, slowing down the pipeline
- Overkill for a task focused on stamps
Object detection models like YOLO were also tested. However, pre-trained models tended to detect objects within the stamp (faces, symbols, shapes) instead of segmenting the stamp itself from the album page.
The Key Insight
The idea was simple:
Use a large model once to generate training data, then switch to a small, fast model for everyday use.
I also observed that , stamp albums with black pages are easier to process than white ones. To overcome this, generative image models (GenAI) were used to create realistic album-like images. These images were then manually segmented to produce clean training data.
Final Architecture
- Model: Tiny YOLO
- Model size: ~6 MB
- Training data: 30 fine-tuned images
- Inference: CPU-only, fast, and reliable
- Data Store: SQLite
- Vector Search: sqlite-vec
Despite its small size, the fine-tuned YOLO model proved to be:
- Accurate enough for stamp segmentation
- Much faster than SAM
- Suitable for local, offline use
Usability and Distribution
A major focus was accessibility. Most philatelists are not technically inclined and expect software that:
- Installs with a single click
- Has a simple graphical interface
- “Just works” without configuration
To achieve this:
- A basic Tkinter GUI was built around the core functionality
- The application was packaged using PyInstaller
- Pre-built binaries were created for Windows and macOS (Linux can be added easily)
Previous experience with PyInstaller helped overcome the usual challenges of Python binary packaging.
Screenshots of GUI
Download
Pre-built binaries
Windows: https://github.com/code2k13/philately-tool/releases/download/windows_v0.17/philately_tool_gui.exe
macOS: https://github.com/code2k13/philately-tool/releases/download/macos_v0.1/philately_tool_gui
Source Code
🔗 https://github.com/code2k13/philately-tool
Conclusion
This project reinforced two important lessons:
Small models still matter
In an era dominated by large generative models, compact and efficient models remain extremely valuable—especially for local and offline applications.Bigger is not always better
Using a large model for everything can be unnecessary overkill. Sometimes, the best solution is a hybrid approach: leverage big models for setup, and small models for daily use.
If you’re a philatelist looking to digitize your collection—or a developer interested in practical, lightweight AI—this project demonstrates how thoughtful model selection can make AI both accessible and efficient.

