Metadata-Version: 2.4
Name: pictograph
Version: 1.69.58
Summary: Pictograph SDK — agent-native computer vision annotation platform
Project-URL: Homepage, https://pictograph.io
Project-URL: Documentation, https://pictograph.io/docs
Project-URL: Repository, https://github.com/pictograph-io/pictograph-sdk
Project-URL: Changelog, https://github.com/pictograph-io/pictograph-sdk/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/pictograph-io/pictograph-sdk/issues
Author-email: Pictograph <support@pictograph.io>
License: MIT
License-File: LICENSE
Keywords: agents,ai,annotation,claude,computer-vision,dataset,labeling,machine-learning,openai,sam3
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx[http2]<1.0,>=0.27
Requires-Dist: pillow>=10.0
Requires-Dist: pydantic-settings<3.0,>=2.0
Requires-Dist: pydantic<3.0,>=2.5
Requires-Dist: typing-extensions>=4.10
Provides-Extra: agents
Requires-Dist: anthropic>=0.40; extra == 'agents'
Requires-Dist: claude-agent-sdk>=0.0.1; extra == 'agents'
Requires-Dist: openai-agents>=0.0.7; extra == 'agents'
Provides-Extra: all
Requires-Dist: aiosqlite>=0.20; extra == 'all'
Requires-Dist: anthropic>=0.40; extra == 'all'
Requires-Dist: claude-agent-sdk>=0.0.1; extra == 'all'
Requires-Dist: numpy>=1.24; extra == 'all'
Requires-Dist: onnx>=1.16; extra == 'all'
Requires-Dist: onnxruntime>=1.17; extra == 'all'
Requires-Dist: openai-agents>=0.0.7; extra == 'all'
Requires-Dist: opencv-python-headless>=4.8; extra == 'all'
Requires-Dist: opentelemetry-api>=1.20; extra == 'all'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'all'
Requires-Dist: rich>=13.7; extra == 'all'
Requires-Dist: safetensors>=0.4; extra == 'all'
Requires-Dist: scikit-image>=0.22; extra == 'all'
Requires-Dist: segmentation-models-pytorch==0.5.0; extra == 'all'
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'all'
Requires-Dist: torch>=2.0; extra == 'all'
Requires-Dist: torchvision>=0.15; extra == 'all'
Requires-Dist: typer>=0.12; extra == 'all'
Provides-Extra: cache
Requires-Dist: aiosqlite>=0.20; extra == 'cache'
Provides-Extra: cli
Requires-Dist: rich>=13.7; extra == 'cli'
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'cli'
Requires-Dist: typer>=0.12; extra == 'cli'
Provides-Extra: dev
Requires-Dist: hypothesis>=6.100; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff==0.16.0; extra == 'dev'
Requires-Dist: vcrpy>=6.0; extra == 'dev'
Provides-Extra: executorch
Requires-Dist: executorch<1.4,>=1.3; extra == 'executorch'
Requires-Dist: torch<2.13,>=2.12; extra == 'executorch'
Provides-Extra: inference
Requires-Dist: numpy>=1.24; extra == 'inference'
Requires-Dist: onnx>=1.16; extra == 'inference'
Requires-Dist: onnxruntime>=1.17; extra == 'inference'
Requires-Dist: opencv-python-headless>=4.8; extra == 'inference'
Requires-Dist: safetensors>=0.4; extra == 'inference'
Requires-Dist: scikit-image>=0.22; extra == 'inference'
Requires-Dist: segmentation-models-pytorch==0.5.0; extra == 'inference'
Requires-Dist: torch>=2.0; extra == 'inference'
Requires-Dist: torchvision>=0.15; extra == 'inference'
Provides-Extra: telemetry
Requires-Dist: opentelemetry-api>=1.20; extra == 'telemetry'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'telemetry'
Provides-Extra: tensorrt
Requires-Dist: tensorrt<11,>=10.0; extra == 'tensorrt'
Provides-Extra: torch
Requires-Dist: safetensors>=0.4; extra == 'torch'
Requires-Dist: torch>=2.0; extra == 'torch'
Requires-Dist: torchvision>=0.15; extra == 'torch'
Description-Content-Type: text/markdown

<div align="center">

<img src="https://storage.googleapis.com/pictograph-assets/logos/FullLogo_Transparent_NoBuffer.png" alt="Pictograph" height="64">

<h3>Pictograph</h3>

<p><strong>Label images, train vision models, run them anywhere.</strong></p>

[![PyPI](https://img.shields.io/pypi/v/pictograph?color=3e62b0&label=pypi)](https://pypi.org/project/pictograph/)
[![Python](https://img.shields.io/pypi/pyversions/pictograph?color=3e62b0)](https://pypi.org/project/pictograph/)
[![License](https://img.shields.io/badge/license-MIT-3e62b0)](LICENSE)
[![Docs](https://img.shields.io/badge/docs-pictograph.io-3e62b0)](https://pictograph.io/docs)

<p>
<a href="https://pictograph.io/docs">Docs</a> ·
<a href="https://pictograph.io/docs/quick-start">Quick start</a> ·
<a href="https://pictograph.io/docs/api-reference">API reference</a> ·
<a href="https://app.pictograph.io">App</a>
</p>

</div>

---

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

| | |
|---|---|
| **Python** | `pip install pictograph`, this repo |
| **CLI** | `pip install "pictograph[cli]"` · [reference](https://pictograph.io/docs/cli) |
| **REST** | Any language, `X-API-Key` header · [reference](https://pictograph.io/docs/api-reference) |
| **Claude skill** | Let an agent drive it · [guide](https://pictograph.io/docs/agents) |

## Quick start

```bash
pip install pictograph
```

Upload, label from a text prompt, train, predict.

```python
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:

```bash
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:

```bash
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.

```python
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.

```python
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

```python
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](https://pictograph.io/docs/local-inference).

## Agents

```bash
pip install "pictograph[agents]"
pictograph agents install-skill --target claude-code
```

```python
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](https://pictograph.io/docs).

[Quick start](https://pictograph.io/docs/quick-start) ·
[Installation](https://pictograph.io/docs/installation) ·
[Authentication](https://pictograph.io/docs/authentication) ·
[API reference](https://pictograph.io/docs/api-reference) ·
[CLI](https://pictograph.io/docs/cli) ·
[Agents](https://pictograph.io/docs/agents) ·
[Annotation format](https://pictograph.io/docs/annotation-format) ·
[Auto-annotation](https://pictograph.io/docs/sam3-auto-annotation) ·
[Local inference](https://pictograph.io/docs/local-inference) ·
[Deployments](https://pictograph.io/docs/deployments) ·
[Export conversion](https://pictograph.io/docs/export-conversion) ·
[Async client](https://pictograph.io/docs/async-client) ·
[Error handling](https://pictograph.io/docs/error-handling) ·
[Rate limits](https://pictograph.io/docs/rate-limits)

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

## Contributing, security, license

[CONTRIBUTING.md](CONTRIBUTING.md) has the development setup and the checks a
change must pass. Report vulnerabilities per [SECURITY.md](SECURITY.md), not as a
public issue. MIT licensed, see [LICENSE](LICENSE).
