(500,500) is the center, whatever the image dimensions.
asset_idx and, for video observations, its timestamp. Resolve an omitted selector through inheritance or the last asset available when the annotation was produced. The annotation reference defines the tags and inheritance rules; multiple assets explains which input each selector identifies.
Convert between normalized and pixel coordinates
Use the dimensions of the selected image as it was supplied to the model:1000 denotes the image boundary; if a drawing library needs an integer pixel index, clamp the final index to width - 1 or height - 1.
For example, the illustrative normalized box (250,250) (750,750) becomes (480,270) (1440,810) on a 1920×1080 image. On a 640×360 thumbnail of the same image it becomes (160,90) (480,270).
Choose the correct asset
Identify the asset before choosing dimensions. Useasset_idx when present, including an inherited value. Otherwise, use the last asset available when the annotation was produced. If the only asset is a 1920×1080 image, a box without a selector uses that image’s dimensions, even if a later tool result adds a 512×512 crop. A new box produced after the crop defaults to the crop when its selector is neither explicit nor inherited. Repeating an image in the conversation creates another asset occurrence.
For a video track, the asset selector identifies the video and t identifies the observation time. Spatial coordinates describe that frame. Keep frame timestamps separate from frame numbers: sampling does not guarantee that one model observation corresponds to one source frame.
When rendering a thumbnail, use the size of its displayed image content. If the viewer letterboxes the image, add the content rectangle’s offset after scaling; do not scale into the surrounding margins. Keep EXIF orientation and any explicit rotations consistent between the input and the rendered image.
Map a crop back to the original image
A crop returned by a tool is a separate asset. Its coordinates describe the crop, so first convert them to crop pixels and add the crop’s offset in the original:Validate before drawing or measuring
- Require finite coordinates in the expected 0–1000 range. Keep invalid predictions available for inspection rather than silently hiding them with clamping.
- Require ordered box corners:
x1 < x2andy1 < y2for a nonempty box. - Resolve inherited selectors on collections and tracks before selecting a canvas. Preserve selector
0; it is a valid value. - Compare geometry only after resolving its asset, timestamp, orientation, and coordinate frame. Normalized coordinates alone do not make boxes from different images comparable.