brandcheck
Score brand photos against a photography guideline with a vision model.
You write the guideline in Markdown. brandcheck turns it into an answer card (a list of criteria with weights and must-pass rules), then scores each photo against that card. For each criterion you get a score (100, 75, 50, 25 or 0), the model's confidence and a short piece of evidence. All of it is combined into one brand match score.
Every result is a suggestion for a person to review, not an approval.
Install
pip install brandcheck
Needs Python 3.10 or newer. Extras: brandcheck[anthropic] to run on Claude,
brandcheck[mcp] to use it from a chatbot.
Set up the model
brandcheck works with any OpenAI-compatible vision model (for example Qwen3-VL served by vLLM, Ollama, or OpenAI itself). Set three environment variables, with no quotes inside the values:
export VISION_MODEL_BASE_URL=https://your-server/v1
export VISION_MODEL_API_KEY=your-key
export VISION_MODEL_NAME=your-model-name
On Windows PowerShell use $env:VISION_MODEL_BASE_URL="https://your-server/v1" and so on.
To use Claude instead: pip install brandcheck[anthropic], then set
VISION_MODEL_PROVIDER=anthropic, ANTHROPIC_API_KEY and VISION_MODEL_NAME (a Claude model
name). Claude gives no token probabilities, so confidence shows as n/a.
1. Make a card and review it
brandcheck make-card guideline.md -o card.json # takes a few minutes
brandcheck show-card card.json # every rule, weight and must-pass
brandcheck show-card card.json --rule clear_focal_point # what each score means
Change anything that is not right before scoring:
brandcheck edit-card card.json --must-pass brand_palette_compatibility=no --weight product_presentation=low
2. Score photos
brandcheck score photo.jpg --card card.json # one photo, full detail
brandcheck score photos/ --card card.json # a whole folder, 4 at a time
brandcheck score photos/ --card card.json --csv results.csv --html report.html
Options:
--context "live event"gives the model background about the photos--no-summaryskips the photo description (one model call per photo instead of two)--workers 4photos scored at the same time--retries 2extra tries when the model times out or sends a broken reply--cache .brandcheck-cacheskips photos already scored with the same card and model--min-score 70exits with code 3 if any photo scores below 70--jsonprints the full results
Exit codes: 0 all good, 1 something failed, 3 a photo was below --min-score.
3. Check accuracy against people's labels
Make a CSV with a photo column (path relative to the CSV), and an on_brand column (yes/no)
and/or one column per rule id (100, 75, 50, 25, 0 or na). Blank cells are skipped.
photo,on_brand,clear_focal_point,bright_readable_lighting
shoot1/a.jpg,yes,100,100
shoot1/b.jpg,no,50,25
brandcheck evaluate labels.csv --card card.json --save scores.json
brandcheck evaluate labels.csv --card edited-card.json # try a changed card
brandcheck evaluate labels.csv --card card.json --results scores.json # no model calls
The report shows how often brandcheck agreed with the labels, how many off-brand photos it caught, the best cut-off score for this data, agreement per rule (worst first) and the biggest disagreements with the model's evidence.
Python
from brandcheck import OpenAICompatibleModel, make_card, check_photo, check_many, write_csv
model = OpenAICompatibleModel.from_env()
card = make_card(open("guideline.md").read(), model)["card"]
result = check_photo("photo.jpg", card, model)
print(result["brand_score"]["score"]) # e.g. 80
rows = check_many(["a.jpg", "b.jpg"], card, model, workers=4)
write_csv(rows, "results.csv", card)
check_photo also takes the photo's bytes, so it works on uploads that were never saved.
Using a different model
Anything with a matching complete method works. Pass it in place of OpenAICompatibleModel:
from brandcheck import ModelReply
class MyModel:
def complete(self, messages, schema, *, name="", max_tokens=2048, timeout=None,
logprobs=False, require_stop=True):
# call your model with the messages, ask for JSON matching `schema`
return ModelReply(content=json_text, requested_model="mine", returned_model="mine")
The model has to accept an image with text and return JSON in the requested shape. Confidence
needs token log-probabilities. Without them, confidence is None and everything else works.
The prompts were tuned on Qwen3-VL, so check a new model with brandcheck evaluate first.
Use it from a chatbot (MCP)
pip install brandcheck[mcp]
Add it to Claude Desktop's config (claude_desktop_config.json):
{
"mcpServers": {
"brandcheck": {
"command": "brandcheck-mcp",
"env": {
"VISION_MODEL_BASE_URL": "https://your-server/v1",
"VISION_MODEL_API_KEY": "your-key",
"VISION_MODEL_NAME": "your-model-name"
}
}
}
}
If Claude Desktop can't find brandcheck-mcp, use its full path instead (run
which brandcheck-mcp on Mac/Linux or where brandcheck-mcp on Windows to get it).
Then ask things like "make a card from ~/guidelines/brand.md called capital-one" or "check the
photos in ~/shoot1 against capital-one". The chatbot shows the card and asks you to confirm it
before scoring. Photos are file paths on your computer. Cards are saved in ~/.brandcheck/cards
(change with BRANDCHECK_HOME).
How the brand match score works
- Each criterion counts by its weight: high 3, medium 2, low 1
cannot_assessandnot_applicableanswers are left out, not counted as 0- If a must-pass criterion scores below 100, the score is capped: 75 caps it at 80%, 50 at 60%, 25 or 0 at 40%. The worst miss sets the cap
Run the tests
pip install -e ".[test,mcp,anthropic]"
pytest
The tests use a fake model, so they need no network or API key.
Metadata
Release files for brandcheck 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 | Actions |
|---|---|---|---|---|
| brandcheck-0.2.0.tar.gz | 160.1 kB | Without provenance | Details for brandcheck-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brandcheck-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for brandcheck-0.2.0-py3-none-any.whl |
Total release size: 207.6 kB
Release files / brandcheck-0.2.0.tar.gz
| Download URL | brandcheck-0.2.0.tar.gz |
|---|---|
| Size | 160.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16ddf2ac150411ca678df186dbd2a7b094bd99bb72916e5a9c4a2ccf09b3566c
|
|
BLAKE2b-256 checksum How to use checksums |
ac606ea7a229aaa390b7054b2bfa61d1fc6468b3a342fb8496821b6566860de0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / brandcheck-0.2.0-py3-none-any.whl
| Download URL | brandcheck-0.2.0-py3-none-any.whl |
|---|---|
| Size | 47.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c32df566a4e0c422739288a30bd10b313352c03adb205739c80fda00858b6f2
|
|
BLAKE2b-256 checksum How to use checksums |
e8d1e715c47257dcae59614672d298f0e414a0d8fda854ff09348077ac71c2e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for brandcheck 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.