Run NuRec Validation#
This guide covers running NuRec in validation mode to evaluate a trained reconstruction checkpoint. Validation produces quality metrics and rendered output you can use to assess model performance.
This guide assumes you have already completed a training run. If you haven’t, see Reconstruct an AV Scene with NuRec first.
Validation Modes#
NuRec supports the following training and validation modes via the mode argument:
Mode |
Description |
|---|---|
|
Runs training steps only. |
|
Runs validation against a trained checkpoint. |
|
Runs both training and validation in sequence. |
Run Validation#
Run validation against a trained checkpoint. The command reuses the parsed config and the final checkpoint from your training run, and writes validation artifacts back into the same output directory:
nurec_dev bazelisk run //:run -- \
--config-name="$NUREC_SRC/outputs/<RUN-ID>/config/parsed.yaml" \
mode=val \
resume="$NUREC_SRC/outputs/<RUN-ID>/checkpoints/last.ckpt" \
out_dir="$NUREC_SRC/outputs"
Notes:
$NUREC_SRC/outputsis theout_diryou passed to your training run.<RUN-ID>is the identifier NuRec auto-generated for that training run. Training writes its artifacts to$NUREC_SRC/outputs/<RUN-ID>/, soconfig/andcheckpoints/live one level below it. List that directory to find the run ID, or passlogger.run_id=<name>during training to choose it yourself.This step may prompt you to configure
wandb. Select option3to skip it.
Run Training and Validation Together#
Use mode=trainval to run training and validation as a single step — for example, in a batch pipeline where you don’t need to inspect training results before validation. NuRec trains to completion first, then automatically runs the validation pass against the final checkpoint.
To inspect training artifacts before deciding whether to validate (for example, to check convergence first), run the modes separately: mode=train followed by mode=val.
nurec_dev bazelisk run //:run -- \
mode=trainval \
out_dir="$NUREC_SRC/outputs" \
--config-name=configs/apps/prod/Hyperion-8.1/car2sim_6cam.yaml \
model/gaussians/initialization@model.layers.background.initialization=lidar_rig_trajectory \
dataset.path="$NUREC_SRC/data/pai_<CLIP_ID>.json" \
dataset.camera_ids="[<CAM1>,<CAM2>,<CAM3>]" \
dataset.lidar_ids="[lidar_top_360fov]" \
dataset.aux_data=True
Note
The model/gaussians/initialization@... override points the background at standard LiDAR initialization. The car2sim_6cam.yaml preset otherwise seeds its background from an Instant NuRec PLY, which this example does not supply. See Reconstruct an AV Scene with NuRec for the seeded path.
dataset.camera_ids selects the cameras to train on. Validation is narrower: the
car2sim_6cam.yaml preset validates only camera_front_wide_120fov, regardless of
how many cameras you train with. To validate other cameras, set dataset.val_camera_ids
explicitly:
dataset.val_camera_ids="[camera_front_wide_120fov,camera_cross_left_120fov]"
Interpreting Validation Metrics#
After validation completes, open metrics.yaml in the output directory. The key field to check is test/psnr (Peak Signal-to-Noise Ratio, measured in dB) — a standard measure of reconstruction fidelity. Higher values indicate the rendered output more closely matches the reference images.
PSNR values vary by scene complexity, number of cameras, and config, but as a general guide:
Above 25 dB — Good reconstruction quality; typically suitable for use in a simulation platform.
20–25 dB — Acceptable for some use cases; review the rendered images and depth maps to judge visually.
Below 20 dB — Low fidelity; investigate data quality, auxiliary data completeness, or try additional training epochs.
Also review the MP4 videos and per-frame images to catch spatial artifacts that aggregate metrics may not surface — for example, blurring around fast-moving actors or edge distortion in wide-angle cameras.
Validation Artifacts#
The validation pipeline writes the following artifacts to <TRAINING_OUTPUT_DIR>/val/:
metrics.yaml— Per-frame metrics and summary statistics (see Interpreting Validation Metrics and Metrics File Schema).Depth map images and a corresponding MP4 video.
Opacity map images and a corresponding MP4 video.
Segmentation map images and a corresponding MP4 video.
Log files from the validation pipeline.
Metrics File Schema#
metrics.yaml is the machine-readable companion to the validation output, and the same schema is written by the gRPC server and by the render command. Read schema_version before you parse the rest of the file. Files written by the current release report 5; files from earlier releases report 2. Version 5 adds a profile_type key naming the profiler instrumentation used, CPU and operating-system metadata inside hardware, and a nullable torch_cuda_available flag. It also keeps invalid CUDA frame timings in the file rather than dropping them, marking each with an explicit validity flag. Every addition is backward compatible, so a parser built for version 2 still reads a version 5 file. Version 3 does not appear here; it belongs to an unrelated schema.
Top-level key |
Contents |
|---|---|
|
Schema revision. |
|
The NuRec version that wrote the file. |
|
|
|
Per-sample values, split into |
|
One entry per metric, each with a |
|
Free-form metadata keyed by metric name — for example, the timing method and renderer behind a timing metric. Empty when nothing records metadata. |
|
The GPU, CPU, operating system, and software stack the run used. |
|
The profiler instrumentation in use when the metrics were collected, or null when none was. |
The hardware block reports torch_cuda_available, gpu_device_index, gpu_name, gpu_compute_capability, gpu_total_memory_bytes (in bytes), gpu_multiprocessor_count, compiled_architectures, cuda_runtime_version, cuda_driver_version, torch_version, and the cpu and os blocks describing the processor and the kernel and distribution. On a host with no visible GPU the GPU fields are null. Every field is nullable, so read each one defensively rather than assuming it is present.
Check hardware and run_info.mode before you compare two metrics files. Quality metrics such as test/psnr are comparable across hardware, but timing metrics are not.
Next Steps#
Once validation passes and you’re satisfied with the reconstruction quality, the scene is ready to use in your simulation platform:
Render offline — Use the
rendercommand to generate a batch of images from the USDZ for inspection or dataset augmentation without a live server. You can request color, distance-colorized, and semantics-colorized outputs with--output-type.Integrate with your sim platform — Launch the NuRec gRPC API server pointing at
artifacts/last.usdzto serve rendered RGB and LiDAR frames to your simulator in real time. See Get Started with NuRec: For Simulation Platforms for the full integration overview.
–>
Help include for NuRec command#
Get Help#
To view all available arguments for training, validation, and export utilities, run the following:
nurec_dev bazelisk run //:run -- --help
To get help for a specific export utility:
nurec_dev bazelisk run //:run -- <EXPORT_UTILITY_NAME> --help