Skip to main content
Pictograph

Pictograph

Real-time vision tools for agents and developers.

Label images with SAM3, train small task-specific models, and run them in real time:
GPU endpoints, live video streams, and tracking workflows.

PyPI Python License Docs

Docs · Quick start · API reference · App


Four ways in. Same API underneath, so you can move between them.

Python pip install pictograph, this repo
CLI pip install "pictograph[cli]" · reference
REST Any language, X-API-Key header · reference
Claude Code /plugin install pictograph --marketplace pictograph-io/pictograph-sdk · guide

Quick start

pip install pictograph

Upload a directory, draft labels from a text prompt, review them, then export and train.

from pictograph import AnnotateReport, Client, TrainingRun, UploadReport

client = Client()  # reads PICTOGRAPH_API_KEY

uploaded: UploadReport = client.images.upload_from_directory(
    dataset="road-signs",
    source_path="./road_signs",
)
print(f"{uploaded.images_uploaded} images uploaded")

labelled: AnnotateReport = client.auto_annotate.dataset(
    dataset="road-signs",
    classes=[("stop_sign", "bbox"), ("yield", "bbox")],
)
print(f"{labelled.annotations_added} annotations added")

# They are drafts: a person reviews them before you train. Start with the images
# whose drafts scored under 0.5 (the app's review stage approves an image or sends it back).
for image in client.images.list(
    dataset="road-signs",
    min_confidence_lt=0.5,
):
    print("review first:", image.filename)

client.exports.create(
    dataset="road-signs",
    name="road-signs-v1",
    format="pictograph",
    include_images=True,
    wait=True,
)

run: TrainingRun = client.training.create(
    dataset="road-signs",
    export="road-signs-v1",
    pipeline_type="yolox",
    name="road-signs-detector",
)
print("Trained model:", run.model_id or run.status)

A class is a (name, output_type) pair, where the output type is bbox, polygon or tag, because auto-annotation has to know what shape to produce. Training runs on an export, never on a dataset directly: you create the export, see what went into it, then train that.

The same thing from the shell:

pictograph login
pictograph images upload-directory road-signs ./road_signs
pictograph auto-annotate dataset road-signs --classes "stop_sign:bbox,yield:bbox"
pictograph images list road-signs --min-confidence-lt 0.5    # review the drafts that scored under 0.5
pictograph exports create road-signs --name road-signs-v1 -f pictograph --include-images
pictograph train start road-signs road-signs-v1 --pipeline yolox --gpu a10g --name road-signs-detector
pictograph models download "road-signs-detector" -o ./yolox.onnx

Or over REST:

curl -s https://api.pictograph.io/api/v1/developer/datasets/ \
  -H "X-API-Key: $PICTOGRAPH_API_KEY"

Resources are addressed by name everywhere: datasets, images by path, exports, models, deployments. The only ids you meet are the image ids a list returns, which a few bulk calls take (images.bulk_tag, batch.delete).

Typed

Responses are Pydantic models. Failures are typed exceptions.

from pictograph.exceptions import NotFoundError, PaymentRequiredError, RateLimitError

try:
    client.datasets.get(dataset="does-not-exist")
except NotFoundError:
    ...

Transient failures retry with backoff, and writes carry an idempotency key so a retry cannot apply twice.

Async

Every method has an async twin with the same signature, except four that work on your machine: images.augment, images.tile, datasets.as_pytorch and models.load.

import asyncio
from pictograph import AsyncClient

async def main() -> None:
    async with AsyncClient() as client:
        datasets = await client.datasets.list(limit=5)
        print([d.name for d in datasets])

asyncio.run(main())

Deploy, then stream live video

Deploy a trained model on a GPU, then send it single images or a live stream. An RTSP camera, a browser webcam (WebRTC) or a video file comes back as one result per frame.

from pictograph import Client, CreatedDeployment, DetectionResult

client = Client()
created: CreatedDeployment = client.deployments.create(
    model="road-signs-detector",
    gpu_type="t4",
    precision="fp16",
)
deployment = client.deployments.wait_until_active(
    deployment=created.deployment,
)
infer = client.deployments.connect(
    deployment=deployment,
    api_key=created.auth_token,
    task="object_detection",
)

with infer.open_stream(source="rtsp://camera.example.com:554/live") as stream:
    for frame in stream.frames():
        result: DetectionResult = frame.result
        print(frame.index, [p.name for p in result.predictions])
pictograph deployments create "road-signs-detector" --gpu t4 --precision fp16 --wait
pictograph deployments stream road-signs-detector rtsp://camera.example.com:554/live --token pk_deploy_...

See deployments and streams.

Run models on your own hardware

from pictograph import get_model

model  = get_model(name="signs-detector", task="object_detection")
result = model.predict(image="test.jpg")

Weights download and cache on first use. ONNX, PyTorch, ExecuTorch and TensorRT are supported targets. Predictions run on your machine and report nothing: the SDK turns off ONNX Runtime's default telemetry to Microsoft. See local inference.

Agents

Claude Code: install the CLI, then the plugin. In Claude Code:

/plugin install pictograph --marketplace pictograph-io/pictograph-sdk

Paste your API key when it asks. Claude Code keeps it in your system's credential store and hands it to the pictograph commands it runs (pip install "pictograph[cli]"). The plugin may run pictograph commands and read files without asking; anything else still asks. It sends data only to Pictograph (what goes where). On Claude Code older than 2.1.275, run /plugin marketplace add pictograph-io/pictograph-sdk, then /plugin install pictograph@pictograph.

Without the plugin, pictograph agents install-skill copies the same skill into ~/.claude/skills/ (--target claude-ai zips it for claude.ai).

Your own agent: the tool registry, with Claude and OpenAI adapters (pip install "pictograph[agents]"):

from pictograph.agents import Toolkit

tools = Toolkit(client).as_anthropic_tools()   # or .as_openai_tools()

Offline utilities

No network needed, so an existing local dataset can be brought into typed models before uploading anything.

pictograph.formats Read and write COCO, YOLO, Pascal VOC
pictograph.metrics Score detections against ground truth by IoU
pictograph.augment Transform images, remapping annotation geometry with them
pictograph.tile Slice images into a grid, clipping annotations per tile

Documentation

Full reference at pictograph.io/docs.

Quick start · Installation · Authentication · API reference · CLI · Agents · Annotation format · Auto-annotation · Local inference · Deployments · Streams · Export conversion · Async client · Error handling · Rate limits

Requires Python 3.10 or newer. Extras: [cli], [agents], [inference], [executorch], [tensorrt], [torch], [all].

Contributing, security, license

CONTRIBUTING.md has the development setup and the checks a change must pass. Report vulnerabilities per SECURITY.md, not as a public issue.

The SDK is MIT licensed, see LICENSE. Two model architectures are vendored so local inference works without pulling their full training stacks; both are Apache-2.0 and keep their own licence and attribution alongside the code:

Component Upstream Licence
pictograph.inference._rfdetr RF-DETR (Roboflow) Apache-2.0 · NOTICE
pictograph.inference._yolox YOLOX (Megvii) Apache-2.0 · NOTICE

Metadata

Release files for pictograph 1.69.211

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

Source distribution (sdist)

Source distribution for pictograph 1.69.211
File Size Uploaded Provenance Actions
pictograph-1.69.211.tar.gz 1.8 MB Without provenance Details for pictograph-1.69.211.tar.gz

Built distribution (wheel)

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

Total release size: 3.1 MB

Release files / pictograph-1.69.211.tar.gz

Download URL pictograph-1.69.211.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
da894fdded28ca22eb681f1824fa6ef1dc91438d616672500c0b856ea4562550
BLAKE2b-256 checksum
How to use checksums
e27e885ff121497e2493df5c9be66687fc404119dbdd43411373e12b0e25b9c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Release files / pictograph-1.69.211-py3-none-any.whl

Download URL pictograph-1.69.211-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9808f89cd3cfb209524ea7bd1b19361362b4bb4637cf20fdaac2465345e1824d
BLAKE2b-256 checksum
How to use checksums
f682a38658bb552a2c7342bd146c6a3007c72de13565296845b28670599e844d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Security for pictograph 1.69.211

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

1.69.211 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