> For the complete documentation index, see [llms.txt](https://docs.eyepop.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eyepop.ai/platform/pop/pop-components/tracking.md). Agents can also search and read this documentation through its [MCP server](https://docs.eyepop.ai/~gitbook/mcp).

# Tracking

The tracking component, its defaults and its tuning

Re-identifies objects across video frames so the same object carries the same `trackId` from frame to frame. Place it on a forward from the detector whose objects you want tracked.

Tracking is trajectory-based by default. Naming a re-identification ability adds appearance similarity — `eyepop.person.reid:latest` is the usual choice for people.

| Attribute                           | Type    | Default             | Description                                                                                                                                                                                 |
| ----------------------------------- | ------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `reidModel`                         | string  | none                | Re-identification ability by alias. Omit for trajectory-only tracking.                                                                                                                      |
| `reidModelUuid`                     | string  | none                | Re-identification ability by uuid. Mutually exclusive with `reidModel`.                                                                                                                     |
| `maxAgeSeconds`                     | float   | `1.0`               | How long an unmatched trace is kept before it is retired. Does not cap the length of a matched trace.                                                                                       |
| `predictionHorizonSeconds`          | float   | `0.5`               | How long a trace the detector lost keeps moving as it last moved. After it, the trace stands where it got to until it is matched again or `maxAgeSeconds` retires it. Must not be negative. |
| `iouThreshold`                      | float   | `0.3`               | Minimum overlap for a detection to join a trace that similarity did not already match.                                                                                                      |
| `simThreshold`                      | float   | `0.4`               | Minimum appearance similarity for a detection to join a trace.                                                                                                                              |
| `agnostic`                          | boolean | `false`             | Matches across class labels instead of tracking each class separately.                                                                                                                      |
| `motionModel`                       | string  | `constant_velocity` | `random_walk`, `constant_velocity`, or `constant_acceleration`. Match it to how the objects actually move.                                                                                  |
| `downweightLowConfidenceDetections` | boolean | `false`             | Lets weak detections extend a trace without pulling it as hard as a confident one.                                                                                                          |

### Lost traces

When the detector misses a tracked object for a few frames, its trace is not lost with it. Until `maxAgeSeconds` retires it, the trace is predicted where its object got to: it keeps moving as it last moved for `predictionHorizonSeconds`, then stands. A detection near that prediction picks the trace up again, so the object keeps its `trackId` across the gap.

A trace whose prediction leaves the frame is kept too. It waits at the edge it left by, so an object that comes back in there within `maxAgeSeconds` keeps its `trackId`.

Raise `predictionHorizonSeconds` for objects that keep moving steadily while the detector misses them, such as vehicles behind a pole. Lower it for objects that stop or turn unpredictably, where a long prediction carries the trace away from where the object reappears. `predictionHorizonSeconds` needs eyepop-worker 4.32.0 or later, and in the SDKs, the Python SDK `eyepop` 4.5.0 or later or the Node SDK `@eyepop.ai/eyepop` 4.5.0 or later.

### Kalman filter noise

The Kalman filter's noise terms can be tuned when the defaults track poorly. Raising a process-noise term makes the tracker trust its motion prediction less. Raising a measurement-noise term makes it trust the detector less. A negative value keeps the default.

| Attribute                     | Type  | Default | Description                                                                             |
| ----------------------------- | ----- | ------- | --------------------------------------------------------------------------------------- |
| `processNoisePosition`        | float | `0.01`  | Process noise of the box center (x and y).                                              |
| `processNoiseVelocity`        | float | `0.01`  | Process noise of the velocity. Used by `constant_velocity` and `constant_acceleration`. |
| `processNoiseAcceleration`    | float | `0.01`  | Process noise of the acceleration. Used by `constant_acceleration` only.                |
| `processNoiseScale`           | float | `0.01`  | Process noise of the box area.                                                          |
| `processNoiseAspectRatio`     | float | `0.01`  | Process noise of the box aspect ratio.                                                  |
| `measurementNoiseCx`          | float | `0.1`   | Measurement noise of the detected center x.                                             |
| `measurementNoiseCy`          | float | `0.1`   | Measurement noise of the detected center y.                                             |
| `measurementNoiseArea`        | float | `0.1`   | Measurement noise of the detected box area.                                             |
| `measurementNoiseAspectRatio` | float | `0.1`   | Measurement noise of the detected box aspect ratio.                                     |

### Class fusion and hysteresis

Each trace keeps its class confidences over time. With the defaults, a trace reports the class of its latest matched detection. When a tracked object's class label flickers between frames, class hysteresis holds the label steady.

| Attribute                       | Type             | Default     | Description                                                                                                               |
| ------------------------------- | ---------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- |
| `classBeta`                     | float            | `1.0`       | How much a matched detection's class confidences count against the trace's, from 0 to 1. `1.0` replaces them.             |
| `classGamma`                    | float            | `0.0`       | What a trace's class confidences are multiplied by on a frame it goes unmatched, from 0 to 1. `0.0` forgets them at once. |
| `classHysteresis`               | boolean          | `false`     | Turns class hysteresis on.                                                                                                |
| `classHysteresisHighThreshold`  | float            | `0.7`       | Confidence at which a class latches.                                                                                      |
| `classHysteresisLowThreshold`   | float            | `0.5`       | Confidence below which a latched class is released.                                                                       |
| `classHysteresisMinHoldFrames`  | integer          | `10`        | Frames a latched class holds at least before it can change.                                                               |
| `classHysteresisAllowedClasses` | array of strings | every class | The class labels that may latch.                                                                                          |

### Next steps

* [Components](https://docs.eyepop.ai/platform/pop/pop-components.md) — the other component types and the shared attributes
* [Tracks and selected predictions](https://docs.eyepop.ai/platform/response-format/predictions/tracks-and-selected-predictions.md) — what tracking adds to the response
* [Select operators](https://docs.eyepop.ai/platform/temporal-context/select-operators.md) — picking each track's best moment


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eyepop.ai/platform/pop/pop-components/tracking.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
