Pictograph
Label images, train vision models, run them anywhere.
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 skill | Let an agent drive it · guide |
Quick start
pip install pictograph
Upload, label from a text prompt, train, predict.
from pictograph import Client
client = Client(api_key="pk_live_...") # or set PICTOGRAPH_API_KEY
client.datasets.create(
name="road-signs",
annotation_types=["bbox"],
)
client.images.upload(
dataset_name="road-signs",
file_path="sign.jpg",
)
client.auto_annotate.batch(
dataset_name="road-signs",
image_filenames=["sign.jpg"],
classes=[{"name": "stop sign", "type": "bbox"}],
)
client.exports.create(
dataset_name="road-signs",
name="v1",
format="coco",
)
run = client.training.create(
dataset_name="road-signs",
export_name="v1",
pipeline_type="rfdetr_detection",
name="signs-detector",
config={"epochs": 30},
)
client.training.wait_for_completion(run_id=run.id)
result = client.models.predict(
name="signs-detector",
image="test.jpg",
)
for a in result.annotations:
print(a.name, round(a.confidence, 3), a.bounding_box)
The same thing from the shell:
pictograph login
pictograph datasets create road-signs --type bbox
pictograph images upload road-signs ./sign.jpg
pictograph models predict signs-detector ./test.jpg
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. There are no IDs to look up first.
Typed
Responses are Pydantic models. Failures are typed exceptions.
from pictograph.exceptions import NotFoundError, PaymentRequiredError, RateLimitError
try:
client.datasets.get(name="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.
import asyncio
from pictograph import AsyncClient
async def main():
async with AsyncClient() as client:
print([d.name for d in await client.datasets.list()])
asyncio.run(main())
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. See local inference.
Agents
pip install "pictograph[agents]"
pictograph agents install-skill --target claude-code
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 · Export conversion · Async client · Error handling · Rate limits
Requires Python 3.10 or newer. Extras: [cli], [agents], [inference],
[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. MIT licensed, see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pictograph-1.69.63.tar.gz.
File metadata
- Download URL: pictograph-1.69.63.tar.gz
- Upload date:
- Size: 993.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b526da0e855d49f01b81516acc5a757c8573606c55e0fd2bb87961d0b918bb04
|
|
| MD5 |
0d4569dcbe7bdec920bc51f838e5ff1f
|
|
| BLAKE2b-256 |
9972271b1aefec1ad3e58e817678c7e0e3e7098d9e21426dc8836c1347b6a1ef
|
File details
Details for the file pictograph-1.69.63-py3-none-any.whl.
File metadata
- Download URL: pictograph-1.69.63-py3-none-any.whl
- Upload date:
- Size: 732.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2d5c1f1636b3fae98d0a1c55cc5df2bbe2736563c739d0da5c67f470f9d5cda
|
|
| MD5 |
76030dab5d51d1c2bbc6f54fb5a8bf28
|
|
| BLAKE2b-256 |
5c0fd6557e9e1b8c72eed11ad87b87f4b6cfe20d743212074a8f79e70b21604f
|