Key Concepts
This page explains how Pixano organizes data. Understanding these concepts helps you design datasets, write import scripts, and get the most out of the UI.
Architecture overview
Pixano has three layers:
- Python backend — manages datasets: creation, queries, updates, statistics. You can use it standalone for scripting.
- REST API — a FastAPI server that exposes the backend over HTTP.
- Web UI — a Svelte/TypeScript app for browsing, annotating, and running AI-assisted tools.
Run the full stack with pixano server run, or use the Python backend directly in your own scripts.
How data is organized
A Pixano dataset is a collection of tables stored in a LanceDB database. Each table belongs to one of seven schema groups:
| Group | Purpose | Schema classes |
|---|---|---|
| Record | One row per dataset sample. Holds metadata, split, and workflow status. | Record |
| View | Media files attached to a record. | Image, Video, SequenceFrame, Text |
| Entity | An object observable in one or more views (e.g. a car, a person). | Entity |
| Annotation | Labels attached to entities (bounding boxes, masks, keypoints, etc.). | BBox, CompressedRLE, KeyPoints, MultiPath, Classification, TextSpan, Message, Tracklet |
| EntityDynamicState | Per-frame state of an entity in video (e.g. visibility, pose). | EntityDynamicState |
| Timeseries | Numeric signals sampled alongside a record (e.g. robot state). | Timeseries |
| Embedding | Vectors for semantic search. | RecordEmbedding (record-level, used by the app), ViewEmbedding (legacy, per-view) |
All schema classes live in pixano.schemas and are Pydantic models backed by LanceDB. You can subclass them to add custom fields.
Example: an object detection dataset
Consider an image dataset for detecting vehicles:
- Each record represents one image in the dataset (with a split like
trainorval). - The record has one view — the image file itself.
- The image contains several entities — physical objects you want to label (a car, a truck, a bicycle).
- Each entity has one or more annotations — e.g. a bounding box with coordinates.
- You can later add model predictions (YOLO, GroundingDINO, etc.) as additional annotations — provenance fields on the annotation let you distinguish human labels from model outputs.
- You compute embeddings (e.g. OpenCLIP) so the dataset becomes searchable — those go in the embedding table.
The dataset schema
Every dataset is defined by a schema that declares its name, workspace type, views, and custom attributes. When importing, it lives in a dataset.yaml file:
pixano: 2format: pixano_jsonldataset: name: vehicle_detection workspace: imageschema: entity: attrs: category: str annotations: [bbox]The workspace selects the UI layout and provides default views. The annotations list determines which annotation tables are created in the database.
Custom fields
Records, entities, and per-frame states accept domain-specific attributes with a type and an optional default:
schema: entity: attrs: category: str is_difficult: { type: bool, default: false } confidence: { type: float, default: 0.0 }(Programmatic users can build the same schema in Python via DatasetInfo and Pydantic subclasses — the yaml compiles to exactly that.)
Record fields
The base Record class provides these fields out of the box:
| Field | Type | Default | Description |
|---|---|---|---|
id | str | "" | Unique identifier for the record |
split | str | "default" | Dataset split (e.g. train, val, test) |
status | str | "new" | Workflow status: new, inProgress, inReview, validated |
comment | str | "" | Free-text note from the annotator |
created_at | datetime | now | Creation timestamp |
updated_at | datetime | now | Last modification timestamp |
The status field is central to annotation campaigns: filter the dataset explorer by status to see which records still need work, and the Split and Status facets show how many fall into each bucket. You can set status in metadata.jsonl during import (e.g. "status": "validated" for ground truth).
Annotation provenance
Provenance is tracked directly on annotations via three built-in fields: source_type (one of model, human, ground_truth, other), source_name, and source_metadata (a JSON string). This lets you distinguish human annotations from model predictions without a separate table.
Workspace types
The workspace type tells Pixano what kind of data you’re working with and which UI layout to display:
| Workspace | Data | UI layout |
|---|---|---|
IMAGE | Single image per item | Image viewer with annotation tools |
VIDEO | Frame sequence per item | Video player with timeline and track inspector |
IMAGE_VQA | Image + Q&A conversations | Image viewer + conversation panel |
IMAGE_TEXT_ENTITY_LINKING | Image + text | Image viewer + text panel with span selection |
Directory structure
Pixano organizes data around three directories, created by pixano init:
my_data/ library/ # All datasets (each is a LanceDB database) media/ # Images, videos, and other files referenced by views models/ # Model files for inference (e.g. SAM weights)Each dataset inside library/ has this layout:
library/<dataset>/ info.json # Name, description, workspace type, schema features_values.json # Value constraints for fields stats.json # Dataset statistics embeddings.json # Semantic-search sidecar (model, dimension, metric) previews/ # Generated thumbnails for the UI db/ # LanceDB tables (one per schema)Python API
from pathlib import Pathfrom pixano.datasets import Dataset
# Open a datasetds = Dataset(Path("./my_data/library/my_dataset"))
# Read recordsrecords = ds.get_records(limit=20, skip=0)
# Read a specific tableimages = ds.get_data("images", limit=5)
# Add annotationsds.add_data("bboxes", [bbox1, bbox2])
# Semantic search over record embeddings. The query vector comes from the# inference server; the app does this for you from the explorer's search bar.records, distances = ds.search_records(query_vector, k=50)Next steps
Pick a use case to see these concepts in action:
- Object Detection — images + bounding boxes with pre-annotation
- Video Object Tracking — video frames + tracklets + SAM
- Multi-View Detection — synchronized multi-camera views
- Entity Linking — image + text annotation
- Visual Question Answering — image + conversation Q&A