Skip to content

Add ns-download-data mipnerf360 subcommand (S3-compatible)#3768

Draft
goanpeca wants to merge 1 commit into
nerfstudio-project:mainfrom
goanpeca:b2-mipnerf360-dataset
Draft

Add ns-download-data mipnerf360 subcommand (S3-compatible)#3768
goanpeca wants to merge 1 commit into
nerfstudio-project:mainfrom
goanpeca:b2-mipnerf360-dataset

Conversation

@goanpeca

@goanpeca goanpeca commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Adds a mipnerf360 subcommand to ns-download-data that fetches the Mip-NeRF 360 scenes from an anonymously-readable bucket using the Amazon S3 API. The change is small and additive: no existing download paths are touched, and the new subcommand only appears when boto3 is installed (otherwise it registers as NotInstalled, matching the existing pattern for optional downloaders).

Motivation

Mip-NeRF 360 is one of the most common benchmarks people reach for when trying nerfstudio, but there is currently no first-class ns-download-data entry for it. This adds one so users can grab the scenes with a single command instead of hunting down the archive by hand.

The downloader talks to storage through the standard Amazon S3 API, so it works against any S3-compatible endpoint. It is written to be provider-agnostic: it reads AWS_S3_ENDPOINT_URL (and accepts --bucket), so the same code path runs against Amazon S3 or any S3-compatible object store (for example Backblaze B2, Cloudflare R2, or MinIO). The endpoint and bucket are plumbing, not baked-in assumptions.

What changed

  • nerfstudio/scripts/downloads/mipnerf360_download.py (new): a Mipnerf360Download(DatasetDownload) that lists and downloads scene objects via boto3 over the Amazon S3 API. Anonymous (unsigned) reads by default so no credentials are needed for a public bucket; anonymous=False falls back to standard credentials from the environment. Sets a nerfstudio/<version> user-agent fragment on the client.
  • nerfstudio/scripts/downloads/download_data.py: registers the mipnerf360 subcommand behind a boto3 import guard, so users without boto3 get a clear "install boto3" message rather than an import error.
  • tests/scripts/downloads/test_mipnerf360_download.py (new): unit tests covering endpoint resolution and the AWS_S3_ENDPOINT_URL override, the client user-agent and addressing config, signed vs. anonymous request configuration, per-scene pagination/download, and the unknown-scene exit path. boto3 calls are mocked, so the tests need no network access.
  • .gitignore: allowlists tests/scripts/downloads/ (the downloads/ ignore rule would otherwise hide the new test files).

Apache license headers are on the new files, and the new subcommand's description string is wired through the existing NotInstalled mechanism.

Testing

  • pytest tests/scripts/downloads/test_mipnerf360_download.py passes locally. All boto3 interaction is mocked, so no network or credentials are required in CI.
  • Ran ns-dev-test locally (Ruff format + lint, Pyright, pytest, license headers, docs build) so the PR should land green.

Notes

  • The default endpoint and bucket in mipnerf360_download.py are placeholders pending a public mirror being provisioned; happy to update them (or drop the defaults and require --bucket plus AWS_S3_ENDPOINT_URL) based on what you all prefer for hosting.
  • Kept the scope intentionally minimal and optional. If you would rather see the S3 client helpers shared with a future generic downloader, I can factor that out, but wanted to start small and additive.

Signed-off-by: Gonzalo Peña-Castellanos <goanpeca@gmail.com>
@goanpeca
goanpeca force-pushed the b2-mipnerf360-dataset branch from ba18cd1 to 90cd299 Compare July 1, 2026 14:00
@goanpeca goanpeca changed the title Add ns-download-data mipnerf360 subcommand (S3-compatible mirror) Add ns-download-data mipnerf360 subcommand (S3-compatible) Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant