stamp-grader (working name — rename freely)
An honest stamp condition tool: point your camera, get a centering score you can see and understand, not a black-box valuation.
Why this exists
The consumer stamp-app category today is mostly predatory: point your camera, get "it's worth $X," hit a paywall. The valuations are inflated to sell subscriptions, and they answer the wrong question for the person holding the stamp. The one genuinely useful, honest thing those apps do not do is help you understand condition — and condition, especially centering, is what actually drives a stamp's grade and value.
stamp-grader does that one thing well and honestly. Centering is geometry: the distance from the printed design to the stamp's edges. We measure it, draw it on your image, and explain it. You can see exactly why the score is what it is.
The honest line
- Measure the objective. Centering and perforation gauge are geometric and measurable. We compute them and show our work.
- Surface the subjective, never fake it. Gum, cancellations, tears, thins, and creases are matters of judgement. We help you see them; we do not invent a number for them.
- A centering score, not an official grade. This is not a PSE/PSAG grade and never claims to be. It is a measurement you can trust because you can see it.
Status: working, early release (0.2.x)
The measurement library is the stamp_grader package
(src/stamp_grader/); its entry points are measure() (a file
path) and measure_array() (an in-memory RGB image). What works today:
- Centering for rectangular stamps, with perspective rectification (deskews a phone photo) and a colour-saturation / monochrome-darkness design detector.
- Shape-correct centering for triangles, diamonds, and round/oval stamps — each measured by the metric its geometry warrants, not forced through a rectangle.
- Honest refusals where a number would be meaningless: unsupported shapes, concave and design-hugging die-cuts, blank crops, and un-segmentable images all decline with a reason instead of a confident wrong score.
- Perforation gauge per axis (in catalogue units when a scale is given), declined when the stamp is not axis-aligned rather than guessed.
- A cancellation flag when a cancel crosses into the margin, built to abstain on anything but a genuinely clean margin.
Every call returns one stable result contract with a machine-readable
status. Behaviour is pinned by a test suite (prototype/tests).
pip install stamp-grader
# command line
stamp-grader path/to/stamp.jpg --json
# or from Python
python -c "import stamp_grader; print(stamp_grader.measure('path/to/stamp.jpg')['centering_score'])"
measure_array(rgb, quad=None, mask=None, px_per_mm=None) takes an in-memory RGB image
for callers that already hold one (no disk round-trip).
The hard, still-open problem is design-box stability across captures (the same stamp can score a few percent apart between photos); until a capture-to-capture cross-check exists, do not read a single score as precise. See ROADMAP.md and GOALS.md.
Relationship to the wider stamp work
Standalone today — it works on a single photo, on device, with no shared catalogue
data — but designed to plug into philatelyOS, which would supply clean crops (and
optionally the stamp geometry) and consume the measurement. That contract is written up
in INTEGRATION.md. It is also a sibling to the parked "doorway" app
(stamp-atlas).
Contributing
Early prototype — issues and small PRs welcome; please open an issue before a large change so we can agree the approach first.
License
Metadata
Release files for stamp-grader 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| stamp_grader-0.2.0.tar.gz | 24.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stamp_grader-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.9 kB
Release files / stamp_grader-0.2.0.tar.gz
| Download URL | stamp_grader-0.2.0.tar.gz |
|---|---|
| Size | 24.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1646854f81446dddb6b4e40aac53b5d76af7e971d4edd31e62fd2e25be339737
|
|
BLAKE2b-256 checksum How to use checksums |
7b407c80184ea3d36113f064d74608917173110e7cc0c1114511250235247f29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logRelease files / stamp_grader-0.2.0-py3-none-any.whl
| Download URL | stamp_grader-0.2.0-py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3488199a40d8ee99e8ccd4ecfd42df7d2feed0cba26ba01a8898229add97b08
|
|
BLAKE2b-256 checksum How to use checksums |
439182dca5cbec80c0157c592029de36eff67d3c960915c9deaa99d66d44ff0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logSecurity for stamp-grader 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for stamp_grader-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.