locus-tag
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
mallocinsidedetect().
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, 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, 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
- Detection guide for end-to-end usage and the config API
- Python API reference
- Performance & benchmarks
- Architecture & memory model
- Coordinate conventions
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.9.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 |
|---|---|---|---|---|
| locus_tag-0.9.0.tar.gz | 454.0 kB | With provenance | Details for locus_tag-0.9.0.tar.gz |
Built distributions (wheels)
Total release size: 5.3 MB
Release files / locus_tag-0.9.0.tar.gz
| Download URL | locus_tag-0.9.0.tar.gz |
|---|---|
| Size | 454.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1824e7f9bba6b81e003017b41997d3c84947986296ec8e54bce6d80d73225619
|
|
BLAKE2b-256 checksum How to use checksums |
3b45535bd7a6cc7ae126e730b4fc1391727487757c38b4a19624ebd390611733
|
| 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 4, 2026.
Transparency logRelease files / locus_tag-0.9.0-cp310-abi3-win_amd64.whl
| Download URL | locus_tag-0.9.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 584.8 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
1857cd07ba076e078520d57165090000c25eb94962110f0575cf804bfd8d926e
|
|
BLAKE2b-256 checksum How to use checksums |
eb3b0b11a079babe2d463b2d53647a455da405c459c54a4fb6e8d84e8bad47d4
|
| 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 4, 2026.
Transparency logRelease files / locus_tag-0.9.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | locus_tag-0.9.0-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 911.0 kB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e76649c9ff0b4fa1855aae41edd045e0608be9f9994059f0f5fd15c55d553ffa
|
|
BLAKE2b-256 checksum How to use checksums |
570a2c1076cc65fc4580acb17658570d369493d02972884730b78ebb8d03d805
|
| 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 4, 2026.
Transparency logRelease files / locus_tag-0.9.0-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | locus_tag-0.9.0-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 808.4 kB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
517a8ad7da5a2f426e8452f648942a017c19afdab24a52b1348bcd4dd8596a07
|
|
BLAKE2b-256 checksum How to use checksums |
90e03d96309651fb0b8b90c523bb3b31ef4cad60439583dd99258d152b02121f
|
| 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 4, 2026.
Transparency logRelease files / locus_tag-0.9.0-cp310-abi3-manylinux_2_28_x86_64.whl
| Download URL | locus_tag-0.9.0-cp310-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 697.1 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9d60d68ef9a5c1f98521d724373267520e3dae03f86b1970e6c743d067620e20
|
|
BLAKE2b-256 checksum How to use checksums |
c7a6dad23444490ae04173f8f0d118cde3f61ac86750339a897682cdd299db61
|
| 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 4, 2026.
Transparency logRelease files / locus_tag-0.9.0-cp310-abi3-manylinux_2_28_aarch64.whl
| Download URL | locus_tag-0.9.0-cp310-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 629.9 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
b7971e7dd2b03dd0f03e0ce31a485119ce89644052c540a0bec7d80697941a9f
|
|
BLAKE2b-256 checksum How to use checksums |
800c2ddc62475d9b5b3fb50b4e665b852a046fca56b89bcd40bb976eac2cf528
|
| 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 4, 2026.
Transparency logRelease files / locus_tag-0.9.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | locus_tag-0.9.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 591.8 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ee93774086b2a0e6eef68f7489139ad5be2eabac48a0e0679e3790ef43bd06cf
|
|
BLAKE2b-256 checksum How to use checksums |
4d23fd71e5b43d2125dd6af4112fa9b0d63388b942bdbd01ffc9134dc0ddb25c
|
| 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 4, 2026.
Transparency logRelease files / locus_tag-0.9.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | locus_tag-0.9.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 657.8 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
6ab1dbd3086577f8a206c0034b0c3b470c24a742dc58abf48e888c54b311ac7c
|
|
BLAKE2b-256 checksum How to use checksums |
a3f58a367e39951871d5a181242f655ec1adfc36147e8d4838e90889ebf9bec8
|
| 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 4, 2026.
Transparency logSecurity for locus-tag 0.9.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.
Attestation for locus_tag-0.9.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 4, 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.