Skip to main content

nerfstudio-gnt

Unofficial GNT (Generalizable NeRF Transformer) integration for Nerfstudio.

Install

uv pip install -e .

Verify method registration

ns-train --help | grep -i gnt

Dataset format

This integration uses Nerfstudio's native VanillaDataManager with NerfstudioDataParserConfig. Point the dataparser to a scene root containing transforms.json.

Configure GNT

Basic Training (Full Network Training - Default)

By default, all components (ResUNet feature extractor and GNT transformer network) are fully trainable (freeze_mode = "none"):

ns-train gnt --pipeline.datamanager.data-root /path/to/datasets

Transfer Learning & Freezing Strategies

When initializing with pretrained weights (or transferring priors across distinct image domains such as histology datasets), you can specify how the feature network is frozen via --pipeline.model.freeze_mode:

  1. Full Training (none - Default):

    ns-train gnt \
      --pipeline.datamanager.dataparser.data /path/to/scene_root \
      --pipeline.model.transfer_learning True \
      --pipeline.model.pretrained_ckpt_path /path/to/pretrained.pth \
      --pipeline.model.freeze_mode none
    
  2. Freeze Late Layers (late): Keeps the ResNet encoder (conv1, bn1, layer1, layer2, layer3) trainable to adapt to domain-specific low-level image distributions (e.g. histology), while freezing the U-Net decoder (upconv3, iconv3, upconv2, iconv2, out_conv):

    ns-train gnt \
      --pipeline.datamanager.dataparser.data /path/to/scene_root \
      --pipeline.model.transfer_learning True \
      --pipeline.model.pretrained_ckpt_path /path/to/pretrained.pth \
      --pipeline.model.freeze_mode late
    
  3. Freeze Early Layers (early): Freezes the ResNet encoder backbone (conv1, bn1, layer1, layer2, layer3) and trains only the U-Net decoder:

    ns-train gnt \
      --pipeline.datamanager.dataparser.data /path/to/scene_root \
      --pipeline.model.transfer_learning True \
      --pipeline.model.pretrained_ckpt_path /path/to/pretrained.pth \
      --pipeline.model.freeze_mode early
    
  4. Freeze All Extractor Weights (all): Freezes the entire ResUNet feature network:

    ns-train gnt \
      --pipeline.datamanager.dataparser.data /path/to/scene_root \
      --pipeline.model.transfer_learning True \
      --pipeline.model.pretrained_ckpt_path /path/to/pretrained.pth \
      --pipeline.model.freeze_mode all
    

Differential Learning Rates

You can configure different learning rates for the feature network and transformer networks via CLI optimizer flags:

ns-train gnt \
  --pipeline.datamanager.dataparser.data /path/to/scene_root \
  --pipeline.model.transfer_learning True \
  --optimizers.feature_net.optimizer.lr 5e-5 \
  --optimizers.network.optimizer.lr 5e-4

Smoke check

python test.py /path/to/scene_root/transforms.json

This runs one train step through GNTPipeline.get_train_loss_dict and checks source-view tensor shapes.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nerfstudio_gnt-0.0.29.tar.gz (60.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nerfstudio_gnt-0.0.29-py3-none-any.whl (83.1 kB view details)

Uploaded Python 3

File details

Details for the file nerfstudio_gnt-0.0.29.tar.gz.

File metadata

  • Download URL: nerfstudio_gnt-0.0.29.tar.gz
  • Upload date:
  • Size: 60.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nerfstudio_gnt-0.0.29.tar.gz
Algorithm Hash digest
SHA256 7c8addb30ba2e91a5a8719c9781ba0b1b7786e65618a04727b9d36eb2cd42cf5
MD5 e894c9eae9736545e17bbf05b32d5672
BLAKE2b-256 8b731d35f7384b0f0b160555671c65af3a739f15870cc2f2cff40dc1f7cf2a45

See more details on using hashes here.

File details

Details for the file nerfstudio_gnt-0.0.29-py3-none-any.whl.

File metadata

  • Download URL: nerfstudio_gnt-0.0.29-py3-none-any.whl
  • Upload date:
  • Size: 83.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nerfstudio_gnt-0.0.29-py3-none-any.whl
Algorithm Hash digest
SHA256 7de4a68eb026abb1dc9413fa9402b71d389caec29505b7e9c0ed9617784dbfbe
MD5 42240ffb787c503c8a8b078631a68f8b
BLAKE2b-256 d001bd54bff8ba0f27df928c1632ba7d0c2476e6bf18731ad7f67fe24f268b01

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.29 This release

2 files

0.0.28

2 files

0.0.27

2 files

0.0.26

2 files

0.0.25

2 files

0.0.24

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

1 file

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.1

2 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