Skip to main content

ATracker

DOI License Python

A flexible Python toolkit for animal tracking.

Citation

Jolles JW (2026). ATracker: A flexible Python toolkit for animal tracking. Zenodo. https://doi.org/10.5281/zenodo.18889019

Overview

ATracker combines video setup, automated and manual tracking, interactive correction, event review and trajectory processing. Use a project overview for collections of recordings, or track and process individual videos independently. It is developed by Dr Jolle Jolles, senior researcher at CEAB-CSIC.

Version 2.0 brings together over 70 changes since 1.0, spanning tracking, the interactive interface, processing, visualisation and documentation. The editor now brings setup and coordinate correction into one workflow, individual videos can be tracked without a project, and batch tracking is more reliable. The release also adds event review, configurable body measurements and support for tracking incoming recordings during experiments. See the changelog for the release summary and Upgrading across breaking changes for changes to existing scripts.

Features

  • Flexible animal tracking: background subtraction or HSV colour detection, single or multiple animals, and a choice of blob-centre tracking or centreline, head/tail and body-shape measurements.
  • Interactive setup and annotation: define tracking regions, masks, zones and calibration; tune detection, track manually, correct coordinates and review events.
  • Trajectory processing and visualisation: filter and smooth tracks, interpolate gaps, calculate movement and spatial measures, and inspect tracking overlays.
  • Individual videos or whole experiments: use standalone functions or organised projects, run batches in parallel, reuse settings and watch for incoming recordings.
  • Measurements and analysis outputs: measure lengths and outlines on images, and export coordinates, movement measures and geometry for downstream analysis.

Barcode handling remains experimental; modular detector backends and the instance-based project redesign are planned, not released capabilities.

Installation

Install from GitHub in a virtual environment:

python -m pip install git+https://github.com/JolleJolles/atracker.git

See installation for environment setup, notebooks and troubleshooting. Python 3.9 or later is required. The GUI uses PyQt5 and OpenCV; runtime dependencies are declared in setup.py.

Quick start

For a video project:

from atracker import ATracker

AT = ATracker("/path/to/project")
AT.setup_files(fname_extract=False)
AT.get_bgfiles()
AT.editor(inds=[0], threshtypes=["bw"])
AT.set_config(body_mode="centroid", show_tracking=False)
AT.track(folder="originals", threshtype="bw", overwrite=False)
AT.process()

Initialisation moves supported videos in the project root into 0originals. Use a dedicated project folder. Configure ROI, masks, object counts and calibration as needed; folder tracking covers the workflow.

For centreline measurements, independently of B/W or colour detection:

AT.set_config(body_mode="skeleton", head_rule="near_widest",
    skeleton_points=10, save_body=True)

In centroid mode cx/cy is the blob centroid; in skeleton mode it is the centreline midpoint. Head/tail estimates use a configurable heuristic. See the output reference for coordinate conventions, units, validity and raw geometry files.

For a video without a project:

from atracker import track_video, process_video

tracked = track_video("/path/to/video.mp4", body_mode="centroid", save_settings=True)
processed = process_video(tracked, videofile="/path/to/video.mp4", conv=0.25)

Here conv is calibration in mm/pixel. See standalone tracking for setup reuse and visualisation.

For candidate review in a project:

AT.event_checker("jump_candidates.csv", modifier="complete", unreviewed_only=True)

For new recordings sharing a tested setup:

AT.watch_folder("/path/to/incoming", template_ind=0)

For image measurements:

from atracker import measure_images

measure_images("/path/to/images", px_per_mm=10,
    variables=["length"], out_csv="measurements.csv")

Documentation

  1. Installing ATracker
  2. Capabilities and workflow overview
  3. Folder tracking, batches and incoming recordings
  4. Standalone tracking, processing and visualisation
  5. Tracking editor and event review
  6. Processing, output columns and units
  7. Measuring images
  8. Upgrading across breaking changes

See the changelog for release changes and the roadmap. Archived notebooks are historical examples, not current tutorials. Report problems through GitHub Issues.

Metadata

Release files for atracker 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atracker 2.0.0
File Size Uploaded Provenance Actions
atracker-2.0.0.tar.gz 215.0 kB Without provenance Details for atracker-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for atracker 2.0.0
File Interpreter ABI Platform Actions
atracker-2.0.0-py3-none-any.whl Python 3 none any Details for atracker-2.0.0-py3-none-any.whl

Total release size: 368.8 kB

Release files / atracker-2.0.0.tar.gz

Download URL atracker-2.0.0.tar.gz
Size 215.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1d29d98c22805d6a07b4417576078fc486902ed89da536b0d8a32a1f7f99d9eb
BLAKE2b-256 checksum
How to use checksums
d7b693f6fb5a59ca97801f90c74105444c09d0cae70823ddcd4796bd9e44ea73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.4

Release files / atracker-2.0.0-py3-none-any.whl

Download URL atracker-2.0.0-py3-none-any.whl
Size 153.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37d048cb09aac22b60b1dbc9719c5155b900b97b90c4cd552b56c201b5fde0e2
BLAKE2b-256 checksum
How to use checksums
a391056bd31040287a4e7d598de672f835ea74ed3c32cc77e5fda6d8bdb762e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.4

Security for atracker 2.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page