Skip to main content

The kwimage_ext Module

GitlabCIPipeline GitlabCICoverage Pypi PypiDownloads ReadTheDocs

Read the docs

https://kwimage_ext.readthedocs.io

Gitlab (main)

https://gitlab.kitware.com/computer-vision/kwimage_ext

Pypi

https://pypi.org/project/kwimage_ext

The kwimage_ext module contains acceleration extensions used by kwimage. Normal installs are Rust-first: the public compatibility API is implemented in Python and dispatches supported kernels to the kwimage_ext._rust PyO3 extension.

Install a released wheel in the usual way:

python -m pip install kwimage_ext

Building from source requires a Rust toolchain because the normal PEP-517 backend is maturin. CMake and Cython are not required for the production wheel; they are only needed by maintainers when building the historical parity backend.

Rust-first development

The default PEP-517 build uses maturin and installs the Rust extension as kwimage_ext._rust. The public Python modules remain compatibility shims, so downstream kwimage imports do not need to change while kernels are ported.

For an editable Rust build:

./dev/build_rust.sh
python -m pytest tests/test_rust_backend.py tests/test_rust_shims.py

The historical Cython/C sources are retained temporarily as a parity reference. To rebuild both implementations and require direct semantic parity:

./dev/check_backend_parity.sh

dev/build_legacy.sh is available when only the reference extensions are needed. It builds CPU reference modules under explicit *_legacy names; those binaries are not part of the normal wheel.

Backend selection is capability-aware: a Rust module is selected only when it implements every symbol required by a particular shim. Set KWIMAGE_EXT_FORCE_RUST=1 to prove that a test is not accidentally falling through to a legacy extension. KWIMAGE_EXT_FORCE_LEGACY=1 is intended for maintainer diagnostics only.

The Rust module also exposes narrow coco-assignment capabilities through kwimage_ext.algo.assignment. coco_greedy_match batches IoU thresholds; coco_greedy_match_grid additionally batches independent area/ignore slices so downstream evaluators can cross the Python/Rust boundary once per image. Both accept an already-built CSR sparse candidate graph plus stable prediction order / truth flags. Geometry and metric policy remain outside these kernels; downstream kwcoco retains Python reference implementations and fallbacks. Direct kernel parity and timing can be checked with:

KWIMAGE_EXT_FORCE_RUST=1 python -m pytest -q tests/test_rust_assignment.py
python dev/bench_assignment.py --n-pred=400 --n-true=400 --candidates=40

Release wheels use PyO3 abi3-py310. Build one CPython 3.10 baseline wheel per platform and test that same artifact on every supported Python version. The artifact-level check is:

python dev/check_wheel_artifact.py wheelhouse/kwimage_ext*.whl

Release evidence audit

For release candidates, validate the built wheel, not an editable checkout. The artifact validator first checks the archive structure, then installs the wheel into a temporary target directory and requires every imported kwimage_ext module (including algo.assignment and _rust) to resolve from that isolated target. This prevents source-tree imports or stale editable .pth files from hiding an incomplete release artifact:

python dev/validate_wheel_artifact.py wheelhouse/kwimage_ext*.whl

For a local release candidate, the deterministic preflight is:

./dev/build_release_candidate.sh _release_candidate

That command always builds a fresh non-editable wheel, validates the isolated install/capability surface, runs the release-packaging guards, records SHA256 hashes and wheel contents, and emits an uploadable evidence bundle. dev/validate_rust_port.sh performs the same non-editable wheel audit in addition to the editable development tests. End-to-end COCO metric speed / memory comparisons remain owned by kwcoco because only the full evaluator can make a meaningful comparison against pycocotools.COCOeval.

Release files for kwimage-ext 0.4.0

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

Built distributions (wheels)

Table of built distributions (wheels) for kwimage-ext 0.4.0
File
kwimage_ext-0.4.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
kwimage_ext-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
kwimage_ext-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
kwimage_ext-0.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
kwimage_ext-0.4.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
kwimage_ext-0.4.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
kwimage_ext-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 2.8 MB

Release files / kwimage_ext-0.4.0-cp310-abi3-win_amd64.whl

Download URL kwimage_ext-0.4.0-cp310-abi3-win_amd64.whl
Size 276.8 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a79b2a688e0ef05ee574ed2d43ea0bed0f549d6bf220fe3547fc65346b798f12
BLAKE2b-256 checksum
How to use checksums
870c588a48d7ab54b0191e6d2599bcaff98e6eb8514bb66888b2505e3790a652
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 21, 2026.

Transparency log

Release files / kwimage_ext-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL kwimage_ext-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 483.5 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
49f2f9df4cfcc74c415a9fa6696e7791db046b27f32b4f90c0df090f3a097209
BLAKE2b-256 checksum
How to use checksums
1d225407bc89409395634fed2d4f6527603835cb2bed5251730615d5b381eca0
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 21, 2026.

Transparency log

Release files / kwimage_ext-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL kwimage_ext-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 465.5 kB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
b2bf716bed2b95963835ebbdd4ddf199fc8dd2919533ae89749cd191326f745c
BLAKE2b-256 checksum
How to use checksums
6d1d47fef9f7d1d79e6c7e84f9239e69a467ca2132d7689e028c185111c8c95f
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 21, 2026.

Transparency log

Release files / kwimage_ext-0.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL kwimage_ext-0.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 414.2 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
a4f475ad95fa9aba9a6e3ca10817f4c3d07879452cb8f84d96a4eeaecf93a734
BLAKE2b-256 checksum
How to use checksums
e21ec67117143593f055d9e1dc9052f656774a63a1e4211a48ce87e37e37431a
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 21, 2026.

Transparency log

Release files / kwimage_ext-0.4.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL kwimage_ext-0.4.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 398.7 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
832103a45bf73c5b4ea7b8dcac15b9c15d51ba3b1ba68a36b5783dd88c175633
BLAKE2b-256 checksum
How to use checksums
c4f11ffdab4c0bcfb4163c6c3298bfbbd49c9f41c2fdb998b2431c7097dfb2ad
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 21, 2026.

Transparency log

Release files / kwimage_ext-0.4.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL kwimage_ext-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
Size 357.7 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e72321fdb976777d0a34a51720dce640fa6ee15c3332c785cd2a34793b73f339
BLAKE2b-256 checksum
How to use checksums
e689701803e69605db159ddf4cd03fcc719feca913763bd6bc9039598fbd48b8
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 21, 2026.

Transparency log

Release files / kwimage_ext-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL kwimage_ext-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 366.6 kB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
047bcb37b084fe4150d3f9eb81463f001339e3002c6c17d402253ec3dffd8a84
BLAKE2b-256 checksum
How to use checksums
f00e90cf8de0c4841ae359bcfde9f07f93e71f430054c9e54f6c45364ada9e38
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 21, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.1

7 release files

This release

0.4.0 This release

7 release files

0.3.2

1 release file

0.3.1

5 release files

0.2.2

5 release files

0.2.0

5 release files

0.0.1

4 release files

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