# Models & analysis

Canonical: https://interlatent.com/docs/ivy/models

Choose the method for your question: actions, object locations, masks, or classifications.

## Choose by the output you need

Section: https://interlatent.com/docs/ivy/models#choose

Ask your agent to check the available capabilities for your account before choosing a model. Name a model when it matters to the experiment; ask for an explicit explanation if it is unavailable.

| Task | Method | Output |
| --- | --- | --- |
| Describe what happens and when | Subtask segmentation | Labeled action intervals. |
| Find all instances of a named object | Grounding DINO | Bounding boxes and detection scores. |
| Outline an object in independent frames | SAM image segmentation | A mask for each prompted frame. |
| Follow seeded objects over time | SAM 2.1 video tracking | Per-frame masks associated with seed IDs. |
| Evaluate a visual question | TypeSafe Jev | Typed presence, class, score, or box answers. |
| Compute a deterministic statistic | Python / NumPy / OpenCV | Measurements, tracks, and files defined by your code. |

- [Train and evaluate a vision decision model](https://interlatent.com/docs/ivy/vision-model-training)
- [Data handling and model rights](https://interlatent.com/docs/ivy/rights-and-data)

## Detection, segmentation, and tracking

Section: https://interlatent.com/docs/ivy/models#detection-masks

Detection returns a rectangle around an object. Image segmentation returns its mask in an individual frame. Video tracking propagates masks between frames. A common workflow uses Grounding DINO to find targets, then SAM video to follow them. The outputs need review, especially around overlapping or similar-looking objects.

Note: Grounding DINO is the instance-detection tool when you need all matching objects. The SDK’s phrase-based `ctx.detect` helper returns at most one best-match box per phrase per frame and should not be used to count instances.

- [Object tracking walkthrough](https://interlatent.com/docs/ivy/object-tracking)

## Structured visual questions with Jev

Section: https://interlatent.com/docs/ivy/models#jev

Jev supports named questions with typed answers. Include explicit criteria for each class or score level, and leave an unclear outcome when the image is ambiguous. Combine related questions and up to eight timestamps in a request. For repeated evaluation across recordings, put the evaluation in one annotation recipe and batch the recordings.

| Question type | Use |
| --- | --- |
| Presence (`noul`) | Estimate the probability of a yes/no visual condition. |
| Choice | Distinguish named alternatives using written criteria. |
| Score | Evaluate 2–10 ordered levels with explicit descriptions. |
| Box | Return normalized edges for a requested target. Pair with presence. |

### Prompt

```text
On representative frames from this episode, use Jev to assess whether the gripper holds the object. Define visible evidence for “holding”, “empty”, and “unclear”. Show the sampled timestamps and answers. Save an annotation track if we apply this across the project.
```

Note: A Jev box question always returns edges, even if the target is absent. Evaluate presence separately. A probability or score is model output, not a verified ground-truth label.

## Action timelines

Section: https://interlatent.com/docs/ivy/models#actions

Use subtask segmentation for a sequence of actions and their boundaries. Define one subtask in terms of an observable goal change. For a presence or state question at sampled times, use frame labeling instead. Sparse classifications do not reconstruct every action between samples.

### Prompt

```text
Divide this recording into goal-directed actions. Use a new interval when the immediate goal changes, retain unsuccessful attempts, and use short action labels. Save a timeline and return the result link. Explain any boundaries that are uncertain.
```

- [Steer subtask segmentation with a prompt](https://interlatent.com/docs/ivy/subtask-segmentation)

## Specify sampling and camera coverage

Section: https://interlatent.com/docs/ivy/models#sampling

Choose sampling based on the shortest event you need to observe. A brief failure may occur between widely spaced samples. State the selected cameras and interval in the request, and ask your agent to report the actual coverage. Use synchronized views together when the task depends on multiple cameras.

- [Sampling in Python recipes](https://interlatent.com/docs/ivy/custom-code#sampling)
- [Search by visual content](https://interlatent.com/docs/ivy/find-and-tag)
