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, mip_36h12). 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, qw, qx, qy, qz]

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, real cameras Default. Decode-first with a dark-border-ring check, 4-connectivity, fused and photometrically calibrated corners.
"grid" Calibration boards, low-contrast prints standard's pipeline with blob-shape gates kept, sharpening off and lower contrast gates.
"high_accuracy" Metrology, AV pose EdLines quads and model-edge pose refinement for single-tag rotation tails. Needs camera intrinsics + tag_size.

standard is benchmarked against pinned OpenCV aruco 4.10 (three corner refiners) and aruco_nano on real and rendered data with cargo xtask sota (2026-10-04, 1 thread, AMD EPYC-Milan):

Benchmark Metric Locus standard Best reference
EuRoC cam_april (real camera, Kalibr AprilGrid) Recall 86.0 % 57.1 %
Precision 99.996 % 99.993 %
Leave-one-out corner error, median / p90 0.283 / 0.575 px 0.516 / 0.996 px
render-tag 1080p (Blender) Corner error, debiased mean 0.062 px 0.230 px
Liu4K (real 4K photos, ArUco MIP 36h12) Recall 37.2 % 66.3 %

Liu4K recall is an open gap (threshold model; see the recall lessons). Sources: the EuRoC report and the SOTA scoreboard (2026-10-04).

For single-tag pose, high_accuracy had the lowest rotation and translation tails on the 1080p render-tag suite in the 2026-07 snapshot (rotation p99 0.249° vs 0.376° for OpenCV's apriltag refiner). Details, 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.

Metadata

Release files for locus-tag 0.10.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.10.0
File Size Uploaded Provenance Actions
locus_tag-0.10.0.tar.gz 495.5 kB With provenance Details for locus_tag-0.10.0.tar.gz

Built distributions (wheels)

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

Total release size: 5.5 MB

Release files / locus_tag-0.10.0.tar.gz

Download URL locus_tag-0.10.0.tar.gz
Size 495.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0f916763f86619bb9eb68f9a637db618561ef98f5d083f863a48cabb5207dc23
BLAKE2b-256 checksum
How to use checksums
d4e9ebfe37924d9991195f1b4bce1b8be11ed0a4e218956922e7b0bb223d57e1
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 Oct 13, 2026.

Transparency log

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

Download URL locus_tag-0.10.0-cp310-abi3-win_amd64.whl
Size 600.4 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2903ceb8da4619853dd1c9ac3f0b58675071a82fb119d31930dc7424295c01bf
BLAKE2b-256 checksum
How to use checksums
861f2b794e32ed77efe02d1db02446083208d0e29a6ceef5a931c7b84776f181
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 Oct 13, 2026.

Transparency log

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

Download URL locus_tag-0.10.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 926.1 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
6596c302b8d1b2e4c29210c308ed0e04ec54c8c2cbb7242b62dbe68ca2f552de
BLAKE2b-256 checksum
How to use checksums
37c47530cea7b77b41397d1b24b48e525e649d9ff7d5a3f2ef2828b489ef806b
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 Oct 13, 2026.

Transparency log

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

Download URL locus_tag-0.10.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 825.4 kB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
0a76f69f845c63d281803b8b126edff28051ac9480738299b26a84ef3d9b28f2
BLAKE2b-256 checksum
How to use checksums
5a43d7efbda27c8868f26b0c957455ca887bf78e099731c0115f6f794c0569c8
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 Oct 13, 2026.

Transparency log

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

Download URL locus_tag-0.10.0-cp310-abi3-manylinux_2_28_x86_64.whl
Size 712.1 kB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
22f3d9ced4a04e3f9fd2fcc447fa34989952c6fa19d9f1e1ad0917df7384591a
BLAKE2b-256 checksum
How to use checksums
92cea7bb39560b9fa72f9ce0d666ef739ba969a0adeb8104f62a6862f21efd15
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 Oct 13, 2026.

Transparency log

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

Download URL locus_tag-0.10.0-cp310-abi3-manylinux_2_28_aarch64.whl
Size 646.0 kB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
97055b7303ad34b881203a38e4aa7637c526abb357f890ae79e0696d44a7d908
BLAKE2b-256 checksum
How to use checksums
a72b5bc584f29c226efdb9e563af18ef6853a1e95a936493a382c26c77f516fd
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 Oct 13, 2026.

Transparency log

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

Download URL locus_tag-0.10.0-cp310-abi3-macosx_11_0_arm64.whl
Size 604.4 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f6cce36779c352eb32a9d0cf6d1ad0a78be7c6eaaf98d35012a6d3d663c2b69c
BLAKE2b-256 checksum
How to use checksums
87d72b7fac360130554d8a4fdc149e5fbf85ec30a2af49a6ca37551937b263f8
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 Oct 13, 2026.

Transparency log

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

Download URL locus_tag-0.10.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 670.8 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0d2274ce8a7f92d984a480a6b191aed8410ccd2901705c9766a8f7a7637e3366
BLAKE2b-256 checksum
How to use checksums
d956fb49043945808bb6b29144f357d1142dd0aa8f115a0e498d1ad2a92ce047
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 Oct 13, 2026.

Transparency log

Security for locus-tag 0.10.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 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for locus_tag-0.10.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 Oct 13, 2026.

Transparency log

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.

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