Skip to main content

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

Apache License 2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stamp_grader-0.2.0.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stamp_grader-0.2.0-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file stamp_grader-0.2.0.tar.gz.

File metadata

  • Download URL: stamp_grader-0.2.0.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for stamp_grader-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1646854f81446dddb6b4e40aac53b5d76af7e971d4edd31e62fd2e25be339737
MD5 9449f20f1c0aa5d5dfbfc49bcac5941f
BLAKE2b-256 7b407c80184ea3d36113f064d74608917173110e7cc0c1114511250235247f29

See more details on using hashes here.

Provenance

The following attestation bundles were made for stamp_grader-0.2.0.tar.gz:

Publisher: publish.yml on DanMat/stamp-grader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stamp_grader-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: stamp_grader-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for stamp_grader-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3488199a40d8ee99e8ccd4ecfd42df7d2feed0cba26ba01a8898229add97b08
MD5 f7fbdb87c4ded46f700f75bd18910abe
BLAKE2b-256 439182dca5cbec80c0157c592029de36eff67d3c960915c9deaa99d66d44ff0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for stamp_grader-0.2.0-py3-none-any.whl:

Publisher: publish.yml on DanMat/stamp-grader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page