Skip to main content

locus-tag

CI Docs License: MIT OR Apache-2.0

Locus detects AprilTag and ArUco markers, as well as AprilGrid and ChArUco boards. It's implemented in Rust with zero-copy Python bindings. It targets a balance of low latency, high pose accuracy and high recall.

Some Features

  • Zero-copy ingestion: images cross the Rust↔Python boundary through the NumPy Buffer Protocol; no copies.
  • Releases the GIL during detection, so it parallelizes cleanly across Python threads.
  • 6-DOF pose: an IPPE-Square seed refined by a weighted Levenberg–Marquardt solver, and internal-edge based optional refinement.
  • Allocation light: per-frame arena allocation, no malloc inside detect().

Supported markers & requirements

  • Tag families: AprilTag (16h5, 36h11) and ArUco (4x4_50, 4x4_100, 6x6_250). More can be registered: Add a dictionary.
  • Boards: AprilGrid and ChArUco layouts over those families.
  • Python: 3.10+ (abi3 wheels).
  • Platforms: prebuilt wheels for Linux (x86_64 / aarch64, glibc + musl), macOS (Intel + Apple Silicon), and Windows (x64).

Installation

pip install locus-tag

The PyPI wheel targets rectified (pinhole) imagery. For unrectified cameras (Brown–Conrady, Kannala–Brandt fisheye), see Install with distortion support.

Quick start

Detect markers

import cv2
import locus

img = cv2.imread("tags.jpg", cv2.IMREAD_GRAYSCALE)
detector = locus.Detector(families=[locus.TagFamily.AprilTag36h11])

batch = detector.detect(img)  # parallel NumPy arrays
print(batch.ids)  # (N,)
print(batch.corners.shape)  # (N, 4, 2)

Estimate 6-DOF pose

from locus import Detector, CameraIntrinsics

intrinsics = CameraIntrinsics(fx=800.0, fy=800.0, cx=640.0, cy=360.0)

batch = detector.detect(
    img,
    intrinsics=intrinsics,
    tag_size=0.10,  # physical side length, meters
)

if batch.poses is not None:
    print(batch.poses[0])  # [tx, ty, tz, qx, qy, qz, qw]

Configuration is nested and Pydantic-validated: start from a shipped profile, edit the group you care about, and hand it back to the detector. The detection guide walks through the DetectorConfig API.

Performance

Profiles are selected by name and embedded in the wheel:

profile Best for Notes
"standard" General detection Balanced recall and precision; highest recall on small/distant tags.
"grid" ChArUco / AprilGrid boards 4-connectivity recovers touching tags that "standard" merges.
"high_accuracy" Metrology, AV pose Best pose accuracy and rotation-tail control. Needs camera intrinsics + tag_size.

On our high-fidelity render-tag suite (1080p, single-thread), high_accuracy leads both the translation and rotation tails while running ~13× faster than OpenCV's best-accuracy configuration:

Detector Rot p99 Trans p99 Latency
Locus (high_accuracy) 0.249° 20.1 mm 15.2 ms
OpenCV (cv2.aruco, apriltag) 0.376° 55.3 mm 195.8 ms

Full results — both benchmark suites (render-tag + ICRA 2020), every percentile, methodology, and hardware — are in the performance docs.

Visual debugging

Built-in integration with the Rerun SDK emits intermediate pipeline stages:

batch = detector.detect(img, debug_telemetry=True)
if batch.telemetry:
    print(batch.telemetry.subpixel_jitter)

Documentation

Contributing

See the engineering workflow for the dev setup and PR gates.

License

Dual-licensed under Apache 2.0 or MIT.

Release files for locus-tag 0.8.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 locus-tag 0.8.0
File Size Uploaded
locus_tag-0.8.0.tar.gz 407.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for locus-tag 0.8.0
File
locus_tag-0.8.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
locus_tag-0.8.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
locus_tag-0.8.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
locus_tag-0.8.0-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details
locus_tag-0.8.0-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details
locus_tag-0.8.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
locus_tag-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 5.5 MB

Release files / locus_tag-0.8.0.tar.gz

Download URL locus_tag-0.8.0.tar.gz
Size 407.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0113fd0307653ea20658c293bcf7770ff3818e8ab89b0dd0417a3505c2ec13b0
BLAKE2b-256 checksum
How to use checksums
29af211853dfc77e2584bad537d676e9413db4737c01790eb4bd0b6dd71c9ae8
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 Sep 25, 2026.

Transparency log

Release files / locus_tag-0.8.0-cp310-abi3-win_amd64.whl

Download URL locus_tag-0.8.0-cp310-abi3-win_amd64.whl
Size 608.7 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
cebd55342457f6a5e09dfe196252d455e5b7b56db8e298076c3f63157f5efd4e
BLAKE2b-256 checksum
How to use checksums
43f665dfb13f9f720f7437506b0cac539d52f63ab3b127997b3da2dd7a9cbbf7
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 Sep 25, 2026.

Transparency log

Release files / locus_tag-0.8.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL locus_tag-0.8.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 934.1 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
b836f8010838130ddcc8a46e2e8d7665efa5aee94f9adde79b954f1626899149
BLAKE2b-256 checksum
How to use checksums
17b7d1c01907a9f50b4aca9ec1e6cc2ccf7f04fef25f441c6ca1f8143cb9d75a
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 Sep 25, 2026.

Transparency log

Release files / locus_tag-0.8.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL locus_tag-0.8.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 842.3 kB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
cc05d4ee9491ac7d1294c702a298df8b1ffe5a414a7b677d1a259919817640d0
BLAKE2b-256 checksum
How to use checksums
53979a362f27b68041117cbda68ffb9ac62e3bd25d3dd0fb2f06fa354c412e93
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 Sep 25, 2026.

Transparency log

Release files / locus_tag-0.8.0-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL locus_tag-0.8.0-cp310-abi3-manylinux_2_28_x86_64.whl
Size 720.0 kB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
e4c9c35e879d537f62d95e3c78d18e9a1e9f4f661f0490a2219e30915f2cecc8
BLAKE2b-256 checksum
How to use checksums
1b96e57cb3086c581c8658cb4ae25001179f3ccac72401cd100d9b6239197c1f
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 Sep 25, 2026.

Transparency log

Release files / locus_tag-0.8.0-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL locus_tag-0.8.0-cp310-abi3-manylinux_2_28_aarch64.whl
Size 663.4 kB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
1a02072878f775f657f25ccc98cd59c1f343239a01bcde216dba6d7f3d1b4e1b
BLAKE2b-256 checksum
How to use checksums
189e7c32281755203c2898ee89a5a509995734ab01aea66003a8a7356106208d
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 Sep 25, 2026.

Transparency log

Release files / locus_tag-0.8.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL locus_tag-0.8.0-cp310-abi3-macosx_11_0_arm64.whl
Size 657.8 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8945832260548b422bd3d4514aff81f85ec5ceee868c1ace7c4220b941310b99
BLAKE2b-256 checksum
How to use checksums
a5aaf6d028a27d6272718f2d9ddee5e01cb69927d73b87a23298d06aaa2570f0
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 Sep 25, 2026.

Transparency log

Release files / locus_tag-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL locus_tag-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 684.3 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7a904b74a04e488589b57130ee77e46bb77f97e03bad9083a8684f51d450cd96
BLAKE2b-256 checksum
How to use checksums
996199638e24d142556bdbc49aad43954e71a0cf4f41a9fdf4fd7817f3f6d457
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 Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

8 release files

0.7.1

8 release files

0.7.0

8 release files

0.6.0

8 release files

0.4.0

3 release files

0.3.1

3 release files

0.3.0

3 release files

0.2.6

3 release files

0.2.5

3 release files

0.2.4

3 release files

0.2.3

3 release files

0.2.2

3 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

5 release files

0.1.2

1 release file

0.1.1

1 release file

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