TemporalFix
TemporalFix stabilizes and repairs frame-level object detections without locking an application to a detector or full tracking framework.
Status: stable version
0.1.0is prepared from the TestPyPI-validated0.1.0rc1. Production PyPI and the public GitHub release remain approval-gated.
Installation
pip install temporalfix
Optional integrations are isolated:
pip install "temporalfix[opencv]"
pip install "temporalfix[supervision]"
pip install "temporalfix[ultralytics]"
Ultralytics uses AGPL-3.0 or a commercial licence; review its terms before installing that extra.
Five-minute quick start
import numpy as np
from temporalfix import Detections, TemporalFixConfig, TemporalRepairer
repairer = TemporalRepairer(TemporalFixConfig.preset("balanced"))
for frame_index in range(5):
detections = Detections(
xyxy=np.asarray([[frame_index, 0, frame_index + 10, 10]]),
confidence=np.asarray([0.9]),
class_id=np.asarray([1]),
)
fixed = repairer.update(
detections,
timestamp=float(frame_index),
stream_id="camera-1",
)
print(fixed.xyxy, fixed.track_id, fixed.source, fixed.uncertainty)
The complete NumPy example is examples/numpy_only.py and is executed during
verification.
detector -> Detections -> global association -> stabilization
-> provenance-labelled output
Core features
- validated, owned, read-only NumPy arrays and JSON-compatible serialization;
- deterministic global IoU assignment with optional class gating;
- no smoothing, EMA smoothing and constant-velocity Kalman smoothing;
- observation-aware confidence smoothing and prediction-only decay;
- majority or confidence-weighted class evidence and switch diagnostics;
- bounded gap recovery with
RECOVERED/PREDICTEDprovenance; - configurable false-positive confirmation and optional tentative output;
- independent multi-stream state and scoped/global reset;
- strict safe YAML and inspectable presets.
CLI
temporalfix inspect-config --preset balanced
temporalfix validate-config config.yaml
temporalfix process-video input.mp4 --detections predictions.json
temporalfix benchmark benchmark.yaml
temporalfix version
process-video reads detector-independent JSON and does not run or require a
detector. Use --help for schemas/options. Real failures return non-zero.
Uncertainty and provenance
Uncertainty is a bounded [0, 1] heuristic, not a calibrated probability.
Direct observations reduce it toward initial_uncertainty; each missed frame
adds uncertainty_growth up to 1.0. Prediction-only frames also decay
confidence and never masquerade as detector observations.
Provenance is the Provenance enum: DIRECT, SMOOTHED, RECOVERED,
PREDICTED, and TENTATIVE.
Benchmark methodology and results
The synthetic suite records warm-up count, every measured latency sample,
median/P95, seed, environment, resolved configuration and a separate
tracemalloc peak at 10/50/100/500 detections. Input generation is outside the
timed region. No portable performance or accuracy number is claimed here:
local artifacts are machine-specific, git-ignored and must be regenerated.
| Verified check | Observed scope | Claim boundary |
|---|---|---|
| NumPy core, scenarios, CLI, and adapter contracts | Local Windows / Python 3.13 | Functional, not portable performance |
| Optional adapters | Ubuntu / Python 3.13 CI with installed extras | Supervision and Ultralytics contract tests passed |
| TestPyPI wheel | Clean GitHub runner and isolated local execution | Import, CLI, and minimal API smoke checks passed |
Optional adapters
from temporalfix.adapters import (
from_supervision,
from_ultralytics,
to_supervision,
to_ultralytics,
)
Imports remain dependency-light until a conversion function is called.
Supervision's public data mapping carries namespaced provenance, uncertainty
and lifecycle fields for lossless round trips. Ultralytics Results has no
documented equivalent; conversion back therefore raises on non-default
TemporalFix-only fields unless allow_lossy=True is explicit.
Scope and limitations
TemporalFix is not an appearance-based tracker or long-term re-identification system. Dense crossings, abrupt motion, camera motion and long occlusions can change identity. Masks/keypoints are preserved for observed rows but are not predicted across gaps.
Contributing and citation
Development requires Ruff, strict Mypy, Pytest, strict documentation, security
scans, and clean wheel tests. See the contributor guide,
security policy, and documentation. Cite
CITATION.cff; release history is in
CHANGELOG.md. Original code is Apache-2.0 licensed.
Metadata
Release files for temporalfix 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| temporalfix-0.1.0.tar.gz | 57.4 kB | With provenance | Details for temporalfix-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| temporalfix-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for temporalfix-0.1.0-py3-none-any.whl |
Total release size: 89.8 kB
Release files / temporalfix-0.1.0.tar.gz
| Download URL | temporalfix-0.1.0.tar.gz |
|---|---|
| Size | 57.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79d510b40de3075d3f9ed874793d9314391a6911c3729b998beeb96e3920d49e
|
|
BLAKE2b-256 checksum How to use checksums |
ecca5939cd3e6dfc9b7dc7c597c4c50cc6ef999ac86c88b677502f58dbcb7141
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.
Transparency logRelease files / temporalfix-0.1.0-py3-none-any.whl
| Download URL | temporalfix-0.1.0-py3-none-any.whl |
|---|---|
| Size | 32.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
422388af90ecc08c9af98a185425364b06bf313f9728664a87460719026e4282
|
|
BLAKE2b-256 checksum How to use checksums |
4d5e8ada2c40eb8a3f60f21d456bb4009771f630bd6a37bf00e9266119057ba1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.
Transparency logSecurity for temporalfix 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for temporalfix-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.