The Harness

All packages

perception

See: segmentation, pointing, scenes, generic vision and vision-language models

harness install perception
Latest
0.5.3
Harness
>=0.66.1,<2
Platforms
windows, macos, linux
Depends on
local-models ^0.3

Provides

Skills
pointing, scene, segmentation, vision, vlm
Services
molmo2, sam3, vision

Readme

The perception package gives programs eyes: questions about images, instance masks, open-vocabulary pointing and 3D localization on a robot, scene watching, and generic vision (changes, text, boxes, depth, masks and small self-trained models) for any game or screen.

Install

harness install perception

A run whose agent uses one of its skills installs it by itself the first time (packages.auto_install, see Packages).

Each model runs as a service in an environment of its own, built the first time a run calls it; its weights are downloaded then too. To do it ahead of time, name the services:

harness install sam3 vision      # environments, sources and weights
harness fetch molmo2             # weights only

Outside Python you need an NVIDIA GPU with a driver recent enough for CUDA 12.8 builds of PyTorch, for each service you run locally:

Service GPU memory
sam3 about 7 GB
molmo2 about 13 GB
vision about 3 GB with every model loaded

query_vlm and pointing through the vlm role need no GPU when that role is a hosted model.

Use

On a robot

Turn on a segmenter in the agent file; pointing and query_vlm use the model roles:

[services]
segmenter = "sam3"

Programs then see:

obs = get_observation()
masks = segment_text(obs, "white bowl")                    # instance masks, best first, or []
pixels = point_to(obs, "red cup")                           # [(u, v), ...] in cam_head
cup = localize_3d(obs, "red cup")                           # {"position", "cameras", "residual_m", "single_view"}
answer = query_vlm(obs.images["cam_left_wrist"], "Is the gripper holding the cup?")

segment_text scores depend on phrasing: describe color and object ("white bowl") or use a plural. When it finds nothing, point first and segment the pixel with segment_point. localize intersects the pixel ray with a horizontal plane (the table top by default), so for tall objects pass the height of the pointed part, or use localize_3d, which triangulates across the head and wrist cameras.

watch_scene holds both arms still and records frames, for watching a demonstration; clear_view moves both arms out of the head camera's view; press presses a button with the closed fingertips.

On a game or a screen

The vision skill knows nothing about the game or app in front of it. Name the skill and its service in the agent file:

[services]
vision = "vision"

[skills]
enable = ["vision"]
a = get_observation(); hold("w", 0.5); b = get_observation()
vision.diff(a, b)                       # {changed, magnitude, box, regions, shift [dx, dy], explained, grid}
vision.ocr(b, region=None)              # [{text, box, score}]
vision.detect(b, ["tree trunk", "zombie"])   # [{label, box, score}]
vision.depth(b)                         # metres, at half the frame's size
vision.segment(b, (640, 360))           # masks under a pixel, or in a box

diff is how an agent learns its controls: press a key between two frames and look. A camera turn shows as a shift; a menu, an item count or a health bar shows as a region.

When plain words are not enough for something the agent needs often, it labels frames from practice and trains a small model:

result = vision.train("trunks", [{"frame": f, "masks": {"trunk": m}} for f, m in labelled])
vision.predict("trunks", frame)["regions"]   # {"trunk": {"pixels", "box"}}

train hands the model to the learner as a skill entry, trunks(frame=None), with a test and its weights attached. It goes through the same checks as any learned skill and into the same library. The service only caches models by their SHA-256; a later episode with the library but a fresh service loads the weights from the entry.

What it provides

Skills:

Services:

Library (harness_perception, for other packages):

The eef, manipulation and reflexes skills of the robot package call segmentation and pointing from this package.

Configuration

Agent file:

Key Meaning
[services] segmenter the segmenter service, e.g. "sam3"; "" for none
[services] vision the vision service for the vision skill
[skills] enable optional skills, e.g. ["vision"]
roles model roles the agent uses, among main, vlm, pointer, verifier

Model file (configs/models/<name>.toml):

[vlm]          # query_vlm, and pointing when there is no pointer role
service = "qwen3-vl-8b"

[pointer]      # open-vocabulary pointing
service = "molmo2"

Without a [pointer] table, the vlm role points; without either, pointing and scene drop, and without a [vlm] table query_vlm drops. A role can name a hosted model instead of a service (model = "..."). See Models.

Deploy file, to place a service yourself:

[services.vision]
gpu = "auto"
mode = "on_demand"

See Services for mode, swap and idle_seconds.

harness config shows which of these skills are on and why the others dropped ("no segmenter service", "needs one of the services pointer, vlm").

Limits and known issues

Versions

VersionHarnessDepends onsha256Published
0.5.3 >=0.66.1,<2 local-models ^0.3 62cdf0c5be5f 2026-11-03 Download
0.2.0 >=0.58,<2 none 432981371d57 2026-11-03 Download

Changelog

0.5.3

0.5.2

0.5.1

0.5.0

0.4.0

0.3.0

0.2.0

0.1.0