Boxes: where is it?
Click a step to see it happen.
1 Box question
A Box asks where something is in a picture. It can sit next to other questions in the same decision, and max_boxes sets how many boxes may come back (default 1, at most 20).
In the example: Box("the parcel on the doorstep"), asked of two photos: door_parcel.png and door_empty.png.
2 Upright picture
The picture is prepared like any other, so a photo taken sideways is turned upright first. The edges you get back belong to the upright picture.
In the example: Both photos are 800 by 600 PNGs, so they keep their size.
3 Model writes edges
A Box is an extraction question, so the model writes its answer: edges as whole numbers from 0 to 1000 or null, and how sure it is. A box has no option order, so it is not asked in two orders.
In the example: Qwen3-VL on Bedrock answered door_parcel.png in 1.19 s and door_empty.png in 0.86 s.
4 Fractions
Curva turns the edges into fractions of the picture from its top-left corner, keeps them within 0 to 1, and puts top above bottom and left left of right. Boxes past max_boxes are cut.
In the example: door_parcel.png: top 0.62, left 0.40, bottom 0.78, right 0.58, an overlap of 0.60 with the parcel as drawn.
5 How it comes back
box holds the first box, or null when the thing is not there. boxes holds every box, so a question with a higher max_boxes reads that list.
In the example: door_empty.png: box null, boxes []. The model found no parcel, and the drawing has none.
6 Found, confidence
confidence is the probability that the answer is right, and found is the probability that the thing is there. When a box came back they are equal; when the answer is not there, found is 1 minus confidence. Until calibrated, this is the model's own figure.
In the example: door_parcel.png: found 0.98, confidence 0.98. door_empty.png: found 0.0, confidence 1.0. Both calibrated: false.
7 Feedback
Send the true box, or null. An answer counts as right when it overlaps the true box by at least half, and from 30 labels Curva can calibrate the confidence. Boxes are rough on real photos: 82% reached that overlap on RefCOCO (n 125, Qwen3-VL), so check yours first.
In the example: Sent as feedback, the true parcel box would mark this answer right, since 0.60 is over 0.5.
A Box question asks where something is in a picture: the signature on a form, the total on a receipt, the dent on a parcel. The answer is the box around it, or nothing when it is not there, with a confidence you can calibrate like any other answer.
from curva import Asset, Box, decided = decide("Find the total on the receipt photo.", {"total": Box("the printed total")}, assets={"photo": Asset.image("receipt.jpg")})d["total"].box # {"top": 0.63, "left": 0.07, "bottom": 0.65, "right": 0.58}, or Noneimport { Asset, box, decide } from "curva-ai";const d = await decide("Find the total on the receipt photo.", { total: box("the printed total") }, { assets: { photo: Asset.image("receipt.jpg") } });d.answers.total.box;A Box goes with other questions in the same call: the merchant, the total amount, a box around it and “is this a receipt at all?” are one decision.
The answer
Section titled “The answer”{"type": "box", "found": 0.94, "box": {"top": 0.71, "left": 0.12, "bottom": 0.80, "right": 0.45}, "boxes": [{"top": 0.71, "left": 0.12, "bottom": 0.80, "right": 0.45}], "confidence": 0.94, "calibrated": false}- Edges are fractions of the picture from its top-left corner:
topandbottomof its height,leftandrightof its width. They always lie within 0 to 1, withtopabovebottomandleftleft ofright. boxis the first box, ornullwhen the thing is not there.boxesholds every box, up tomax_boxes(default 1, at most 20):Box("each signature", max_boxes=5).confidenceis the probability that the answer is right;foundis the probability that the thing is there. They are one number seen two ways:foundequalsconfidencewhen a box came back, and1 - confidencewhen the answer is “not there”.
Feedback
Section titled “Feedback”Send the true box, or null when it was not there:
import curvacurva.feedback(d.id, "total", {"top": 0.62, "left": 0.06, "bottom": 0.66, "right": 0.58})An answer counts as right when its box overlaps the true one by at least half (intersection over
union of 0.5 or more), and “not there” is right only when the truth is null. From these labels
the confidence is calibrated per project, as for extraction.
How it works
Section titled “How it works”- Every model is asked for the edges as whole numbers from 0 to 1000, the convention vision models
follow best (measured before this was built: a mean overlap of 0.96 on drawn scenes with
gemini-3.1-flash-lite). Curva turns them into fractions. - A Box is an extraction question, so it is answered in verbal mode, takes
when,rules,examples,min_confidenceandtarget_accuracy, and is not debiased (a box has no option order). A council keeps the box most members agree on. - Photos are turned upright before the model sees them (see Images), so the edges are those of the upright picture.

