agentleFS
h-watah-wata/claude-skills/skills/nerfstudio-trainer/SKILL.md

nerfstudio-trainer

Skill0 starsChanged 6 months agoApache-2.0View on GitHub

Launch nerfstudio splatfacto (3D Gaussian Splatting) training with project-specific parameters. Use when the user asks to start/launch/run 3DGS training, retrain with new parameters, or resume training. Handles data path resolution, parameter configuration, background execution, and log file management.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user requests to:

    line 14
  2. Distinctive:

    Ask or infer the following from user context:

    line 25
  3. Distinctive:

    Check existing log files to auto-increment:

    line 40
  4. Very specific:

    Default reset_alpha_every=30 → reset_every=3000, which is smaller than pause_refine_after_reset for large datasets

    line 70
  5. Very specific:

    Check initial log output: tail -5 {log_file}

    line 84
  6. Very specific:

    Check points3D.txt for NaN/Inf values

    line 127
  7. Very specific:

    Verify reset_alpha_every is large enough: reset_alpha_every × refine_every > num_train_data + refine_every

    line 131
  8. Very specific:

    Check if training step has passed pause_refine_after_reset

    line 132

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Nerfstudio Trainer

Overview

This skill launches nerfstudio splatfacto (3D Gaussian Splatting) training with parameters tuned for LiDAR-camera fusion datasets. It manages the full launch workflow: parameter configuration, background execution, and log file setup.

When to Use This Skill

Use this skill when the user requests to:

  • "学習を開始して" / "trainを走らせて"
  • "新しいパラメータで再学習"
  • "splatfactoを起動"
  • "3DGS training を開始"
  • "v{N}で学習開始"

How to Use This Skill

Step 1: Determine Parameters

Ask or infer the following from user context:

ParameterDefaultDescription
data_dir(required)COLMAP sparse model directory (containing cameras.txt, images.txt, points3D.txt)
output_dir{data_dir}/../outputsTraining output directory
log_versionauto-incrementLog file version suffix (e.g., train_lidar_v8.log)
reset_alpha_every200Alpha reset interval (critical for large datasets)
densify_grad_thresh0.0002Gradient threshold for densification
camera_optimizerSO3xR3Camera pose optimization mode
max_num_iterations30000Total training steps
load_3d_pointsTrueInitialize Gaussians from points3D.txt

Step 2: Determine Log Version

Check existing log files to auto-increment:

ls {project_dir}/train_lidar_v*.log 2>/dev/null | sort -V | tail -1

Step 3: Build and Execute Command

Base Command Template

ns-train splatfacto \
  --data {data_dir} \
  --output-dir {output_dir} \
  --max-num-iterations {max_num_iterations} \
  --pipeline.model.camera-optimizer.mode {camera_optimizer} \
  --pipeline.model.reset-alpha-every {reset_alpha_every} \
  --pipeline.model.densify-grad-thresh {densify_grad_thresh} \
  --pipeline.datamanager.dataparser.orientation-method none \
  --pipeline.datamanager.dataparser.center-method poses \
  --pipeline.datamanager.dataparser.auto-scale-poses False \
  --pipeline.datamanager.dataparser.assume-colmap-world-coordinate-convention False \
  --pipeline.datamanager.dataparser.load-3D-points {load_3d_points} \
  > {project_dir}/train_lidar_v{N}.log 2>&1 &

Important Notes on Parameters

Densification fix for large datasets (>3000 images):

  • nerfstudio has a known issue (GitHub #2927, #3743) where pause_refine_after_reset = num_train_data + refine_every
  • Default reset_alpha_every=30 → reset_every=3000, which is smaller than pause_refine_after_reset for large datasets
  • Must use reset_alpha_every=200 (or higher) so that reset_every=20000 > pause_refine_after_reset
  • Without this fix, Gaussian count stays constant (no densification)

LiDAR-based datasets:

  • orientation-method none: LiDAR world coordinates are already aligned
  • center-method poses: Center scene at camera pose centroid
  • auto-scale-poses False: Preserve real-world scale from LiDAR SLAM
  • assume-colmap-world-coordinate-convention False: Using LiDAR world frame, not COLMAP convention

Step 4: Verify Launch

After launching:

  1. Confirm PID is running: ps aux | grep ns-train
  2. Check initial log output: tail -5 {log_file}
  3. Report the viewer URL (typically http://localhost:7007)
  4. Report the output directory path

Step 5: Report to User

Provide:

  • PID
  • Log file path
  • Output directory
  • Viewer URL
  • Key parameters used
  • Expected densification window (when Gaussians should start growing)

Parameter Presets

Default (LiDAR + large dataset)

reset_alpha_every=200
densify_grad_thresh=0.0002
camera_optimizer=SO3xR3
max_num_iterations=30000

Fast test (quick validation)

reset_alpha_every=200
densify_grad_thresh=0.0002
camera_optimizer=SO3xR3
max_num_iterations=5000

High quality (longer training)

reset_alpha_every=200
densify_grad_thresh=0.0001
camera_optimizer=SO3xR3
max_num_iterations=50000

Troubleshooting

NaN error at startup:

  • Check points3D.txt for NaN/Inf values
  • Filter with: np.isfinite(xyz).all(axis=1)

Gaussian count not growing:

  • Verify reset_alpha_every is large enough: reset_alpha_every × refine_every > num_train_data + refine_every
  • Check if training step has passed pause_refine_after_reset

CUDA out of memory:

  • Reduce initial point count in points3D.txt
  • Lower max-num-iterations for testing

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.