> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/core-concepts/frame-interpolation.md).

# Frame Interpolation

When annotating videos, Hub can use keyframes to carry annotation information across multiple frames. This lets annotators label only the frames where something changes, instead of manually editing the same label on every frame.

Frame interpolation is available for all video file types.

## Keyframes

Whenever you create or edit an object or frame-specific classification on a video frame, you are creating a keyframe for that label.

For example, if I create a new bounding box on frame 1, I will have created a keyframe for it on frame 1. Keyframes are marked with white diamonds on the video timeline:

<figure><img src="/files/dkThMedff36t4kEDCFKW" alt=""><figcaption></figcaption></figure>

If I navigated to frame 20 and edited the position of the bounding box, I will have created a new keyframe for it:

<figure><img src="/files/gtWVN0vUomNSrF4lPR1Q" alt=""><figcaption></figcaption></figure>

The position of the bounding box will be interpolated between frames 1 and 20. You can add, remove, and edit keyframes using the video labeling editor interface.

## Object Interpolation

For object tools, interpolation means that Hub calculates the object's shape or position on frames between keyframes.

For example:

1. You draw a bounding box around a car on frame 1.
2. You move to frame 20 and move the same bounding box to the car's new position.
3. Hub calculates the bounding box positions for frames 2 through 19.

{% hint style="info" %}
Interpolation is currently only available for the Bounding Box, Polygon, Segmentation, and Point labeling tools.
{% endhint %}

<div data-full-width="true"><figure><img src="/files/6HoAbcsbai52fLkSAoYA" alt=""><figcaption></figcaption></figure></div>

## Frame-Specific Classifications

Classifications can also be frame-specific. In the project ontology, enable the *Frame-specific* setting on a classification when answers should apply to individual video frames instead of the whole asset.

Frame-specific classifications do not interpolate geometry. Instead, the answer from the latest previous keyframe applies until another keyframe changes the answer, or until the classification's segment ends.

For example, if a frame-specific radio classification is set to *Green* on frame 5, *Red* on frame 15, and *Blue* on frame 40:

* frames 5 through 14 use *Green*
* frames 15 through 39 use *Red*
* frame 40 and later frames in the classification segment use *Blue*

## Import Format Counterparts

When importing video annotations, the UI concepts above map to these Ango Import Format fields:

<table data-full-width="true"><thead><tr><th>UI concept</th><th>Import field</th><th>What it controls</th></tr></thead><tbody><tr><td>Timeline row for one tracked object or frame-specific classification</td><td><code>objectId</code></td><td>Groups keyframes that belong to the same object or classification instance.</td></tr><tr><td>Start and end of the timeline row</td><td><code>segments</code></td><td>The frame range where the object or frame-specific classification exists.</td></tr><tr><td>Frames where the object or answer changes</td><td><code>keyFrames</code></td><td>Frame-number keys containing the object geometry or classification answer for that frame.</td></tr><tr><td>Hidden / out-of-view spans</td><td><code>outOfViewSegments</code></td><td>Frame ranges where the object or frame-specific classification should not be visible.</td></tr><tr><td>A single page in multi-image or DICOM assets</td><td><code>page</code></td><td>The page or frame where a non-interpolated annotation belongs.</td></tr></tbody></table>

Video keyframe numbers are frame indexes. They start from 0.

{% hint style="info" %}
For complete JSON examples, see the video object and video classification sections in the [Ango Import Format](/data/importing-and-exporting-annotations/importing-annotations/ango-import-format.md#video-and-multi-image-labeling) page.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.imerit.net/core-concepts/frame-interpolation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
