Skip to main content

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.

Set up the model

brandcheck works with any OpenAI-compatible vision model (for example Qwen3-VL served by vLLM). Set three environment variables:

export VISION_MODEL_BASE_URL=https://your-server/v1
export VISION_MODEL_API_KEY=your-key
export VISION_MODEL_NAME=your-model-name

Command line

Make a card from a guideline (this takes a few minutes):

brandcheck make-card guideline.md -o card.json

Score one or more photos:

brandcheck score photo1.jpg photo2.png --card card.json

Options for score:

  • --context "live event" gives the model background about the photo
  • --no-summary skips the photo description (one model call instead of two)
  • --json prints the full result

Python

from brandcheck import OpenAICompatibleModel, make_card, check_photo

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
for answer in result["answers"]:
    print(answer["name"], answer["score"], answer["confidence"], answer["evidence"])

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")

Confidence needs token log-probabilities. Without them, confidence is None and everything else still works.

How the brand match score works

  • Each criterion counts by its weight: high 3, medium 2, low 1
  • cannot_assess and not_applicable answers 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]"
pytest

The tests use a fake model, so they need no network or API key.

Metadata

Release files for brandcheck 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brandcheck 0.1.0
File Size Uploaded Provenance Actions
brandcheck-0.1.0.tar.gz 32.3 kB Without provenance Details for brandcheck-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brandcheck 0.1.0
File Interpreter ABI Platform Actions
brandcheck-0.1.0-py3-none-any.whl Python 3 none any Details for brandcheck-0.1.0-py3-none-any.whl

Total release size: 58.6 kB

Release files / brandcheck-0.1.0.tar.gz

Download URL brandcheck-0.1.0.tar.gz
Size 32.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ecc5a843f46c70058cefb0b69d492285c22d27ff0f6c93eeeecd98181d098b8c
BLAKE2b-256 checksum
How to use checksums
d129c1d0366ab94c7faecbb8fc127bedf4c8dc4a4b78f467f4f824935110cc0d
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.1.0-py3-none-any.whl

Download URL brandcheck-0.1.0-py3-none-any.whl
Size 26.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0ddc01d1fe6d0f4fd3af3193c345fd29e800b5f26abd80d8c25b1979b44ade6
BLAKE2b-256 checksum
How to use checksums
1af5314d46ef8f9b27f2389707c558d4fa83983a0382484d549eef31d933b9bc
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.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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