Skip to main content

InspectRT

CI Python 3.11 | 3.12 License: Apache-2.0

InspectRT is a reproducible, reduced feature-memory baseline for one MVTec AD category at a time. RT means Runtime. InspectRT records scientific outputs and runtime measurements for its frozen workloads.

Status

inspectrt_feature_memory_v1 is the implemented profile. It uses a frozen ResNet-50 feature extractor, a complete nominal patch bank, exact nearest-neighbor retrieval, raw anomaly maps, and threshold-free metrics. The supported installed/user commands are evaluate, benchmark, fixture validate and onnx validate. Fixture and ONNX export are source-checkout reproducibility workflows; portability commands are scoped maintainer/evidence tooling. The complete command, schema and experimental Python API boundary is in docs/public-interface.md. See docs/retrieval-fixtures.md for the format, commands, and validation limits.

The baseline freeze covers bottle and leather on a ThinkPad P53 with a Quadro T1000 and the current locked Linux stack. The frozen bottle workload also has reviewed results for Intel Core i7-9850H CPU, RTX 4080 Super CUDA under WSL 2, M1 Pro CPU, and M1 Pro MPS. Floating outputs and metrics stayed within the reviewed envelope, although exact nearest-neighbour indices varied across devices. The synchronized wall-clock record contains six descriptive timing rows. See docs/portability.md and the baseline method contract in docs/baseline.md.

The frozen bottle workload also has a reviewed ONNX feature boundary for layer2 and row-major patch embeddings. ONNX Runtime CPU results pass the policy-v2 calibration and independent Ryzen/WSL2 holdout. See docs/onnx-portability.md and the compact scientific evidence.

Bundled fixture quickstart

InspectRT supports CPython 3.11 and 3.12. Install a reviewed wheel by following docs/installation.md, including the CPU-first or CUDA-first PyTorch sequence for Linux.

An installed distribution can validate the bundled canonical synthetic fixture offline on CPU:

inspectrt fixture validate --device cpu

The fixture identity and validation limits are documented in docs/retrieval-fixtures.md.

ONNX feature artifact

The optional ONNX tools use the onnx extra in a locked source checkout:

uv sync --locked --extra onnx

Export is a source-checkout reproducibility workflow. It requires a clean source tree and the accepted pretrained weight already cached:

uv run --extra onnx inspectrt onnx export \
  --output-root outputs

The generated artifact contains only manifest.json and model.onnx. Its model bytes remain ignored. Validation is a supported installed/user workflow when inspectrt[onnx] is installed:

uv run --extra onnx inspectrt onnx validate \
  --artifact \
  outputs/artifacts/inspectrt_onnx_feature_portability_v1/<artifact-id>

Validation covers artifact structure and graph identities. The graph emits the two feature tensors; InspectRT's PyTorch pipeline handles preprocessing, retrieval, scoring, maps, and metrics. See the ONNX portability guide for the experimental direct CPU consumer API and reviewed limits.

MVTec AD

Obtain MVTec AD from the official dataset page. The download form asks for your email, name, and occupation, and commercial use is not allowed. Place the categories below one dataset root:

datasets/mvtec_ad/
├── bottle/
└── leather/

The dataset remains untracked through .gitignore. Pass datasets/mvtec_ad, not an individual category directory, as --dataset-root.

Installed MVTec quickstart

inspectrt evaluate \
  --dataset-root /path/to/mvtec_ad \
  --category bottle \
  --device cpu \
  --output-root /path/to/output

The wheel includes the frozen baseline profile. Use a separately obtained MVTec root; torchvision supplies the official pretrained weight. An explicit --config remains supported. See the baseline guide for the method, complete run bundle and benchmark command.

Benchmark

benchmark is supported for the frozen bottle workload with exactly five warm-ups and 30 measured repetitions. See docs/baseline.md for the command, device rules, eight-file bundle and reviewed measurements.

Method scope

inspectrt_feature_memory_v1 is InspectRT's reduced feature-memory reference. Interpret its results under the method in the baseline guide. Supported installation paths are listed in the installation and support guide, while reviewed scientific portability evidence is documented in docs/portability.md.

License and distribution

InspectRT-authored code is licensed under the Apache License 2.0, and NOTICE preserves first-party attribution. Dependencies, datasets, and pretrained weights retain separate terms. MVTec AD is obtained separately by the user.

Release archives contain InspectRT code, the baseline profile, the synthetic fixture, and legal metadata. Users obtain MVTec and torchvision weights separately and generate run bundles or ONNX models locally. THIRD_PARTY_NOTICES.md records the dependency, dataset, weight, and generated-artifact boundaries.

Metadata

Release files for inspectrt 0.1.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 inspectrt 0.1.0
File Size Uploaded
inspectrt-0.1.0.tar.gz 140.8 kB Details

Built distribution (wheel)

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

Total release size: 248.4 kB

Release files / inspectrt-0.1.0.tar.gz

Download URL inspectrt-0.1.0.tar.gz
Size 140.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e20f2c5a8dc30a19a196d9e882e5b158155259f290f2e4e19764ac314b221080
BLAKE2b-256 checksum
How to use checksums
3324e3dbf39377cd6cff39396ad245b994b1ddfb1c8c7eb7f151ffab2e616407
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 Aug 28, 2026.

Transparency log

Release files / inspectrt-0.1.0-py3-none-any.whl

Download URL inspectrt-0.1.0-py3-none-any.whl
Size 107.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e2f45813cc5795866b625092074ab8ea01ec29c72ede86a722665af6c5ef05c
BLAKE2b-256 checksum
How to use checksums
76fda2b4816b23ecad5c4489f0a8812b9708fb8913ac5d045150a89d51ad4fdb
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 Aug 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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