Skip to main content

nanodrr

tests docs pypi

A performance-oriented reimplementation of DiffDRR with the following improvements:

  • Optimized, pure PyTorch implementation (~5× faster than DiffDRR at baseline)
  • Fused Triton rendering kernel, used by default on CUDA (~40× faster than DiffDRR)
  • Fused Metal shader (experimental), used by default on MPS (~4× faster than PyTorch)
  • Modular design (freely swap subjects, extrinsics, and intrinsics during rendering)
  • Compatibility with torch.compile and mixed precision
  • Extensive type hints with jaxtyping
  • Runs on CUDA, Apple silicon (MPS), and CPU
  • Standard Python package structure managed with uv

All projective geometry is implemented internally using the standard Hartley and Zisserman pinhole camera formulation.

Installation

To strictly install the renderer:

pip install nanodrr

To install the optional plotting or 3D visualization module:

pip install "nanodrr[plot]"   # 2D visualization (matplotlib, opencv)
pip install "nanodrr[scene]"  # 3D visualization (VTK, PyVista)
pip install "nanodrr[all]"    # All extras

Benchmarks

Benchmarking runtime, FPS, and memory usage.

FPS computed from per-frame GPU kernel time (torch.profiler); median wall-clock timings are also recorded in tests/benchmark/benchmark.csv. Benchmarked by rendering 200×200 DRRs on an NVIDIA RTX 6000 Ada (48 GB) with Python 3.12. Compile represents torch.compile(mode="reduce-overhead", fullgraph=True). Full experiment at tests/benchmark/.

Docs

To test the docs locally, run

uv run --group docs jupyter nbconvert --to markdown tutorials/*.ipynb --output-dir docs/tutorials/
uv run --group docs zensical serve

Roadmap

  • Implement a fully optimized renderer
  • Port strictly necessary modules from DiffDRR (e.g., SE(3) utilities, loss functions, and 2D plotting)
  • Migrate 3D plotting functions to an optional module
  • Integrate with xvr to speed up network training and registration
  • Integrate with polypose to speed up registration
  • Release as v1.0.0 of DiffDRR!

Metadata

Release files for nanodrr 0.1.7

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

Source distribution (sdist)

Source distribution for nanodrr 0.1.7
File Size Uploaded Provenance Actions
nanodrr-0.1.7.tar.gz 43.3 kB With provenance Details for nanodrr-0.1.7.tar.gz

Built distribution (wheel)

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

Total release size: 96.9 kB

Release files / nanodrr-0.1.7.tar.gz

Download URL nanodrr-0.1.7.tar.gz
Size 43.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8b5c08b2c775f0b828d71f65d6c83160e7be556b00f9f4e19c5f51810fb4c83b
BLAKE2b-256 checksum
How to use checksums
26970a0028fddab8277fe9c8dbeedf34e849d390f8161ad986913afd5b5ee5b4
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 14, 2026.

Transparency log

Release files / nanodrr-0.1.7-py3-none-any.whl

Download URL nanodrr-0.1.7-py3-none-any.whl
Size 53.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4b893f0ddd325f478f9d250a152489bfd771a09b4ce849aa889c161ccffde2b
BLAKE2b-256 checksum
How to use checksums
f05d420a0c478c7e9bbfdd57154578e119b16796dd82216bc435d3c3eefd4be8
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 14, 2026.

Transparency log

Security for nanodrr 0.1.7

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nanodrr-0.1.7.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 14, 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