# How to Configure YAML Presets in LingBot-Map for Indoor vs Outdoor Scenes

> Learn how to configure YAML presets in LingBot-Map for indoor and outdoor scenes. Easily switch between indoor.yaml and outdoor_drive.yaml using the --config flag for optimal rendering.

- Repository: [Robbyant/lingbot-map](https://github.com/Robbyant/lingbot-map)
- Tags: how-to-guide
- Published: 2026-07-30

---

**Configure YAML presets in LingBot-Map by passing the `--config` flag to rendering scripts like [`demo_render/batch_demo.py`](https://github.com/Robbyant/lingbot-map/blob/main/demo_render/batch_demo.py), selecting [`demo_render/config/indoor.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/demo_render/config/indoor.yaml) for small-scale environments with shallow depth or [`demo_render/config/outdoor_drive.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/demo_render/config/outdoor_drive.yaml) for large-scale scenes with sky masking and multi-segment camera trajectories.**

LingBot-Map (Robbant/lingbot-map) drives its rendering and preprocessing pipelines through declarative YAML preset files. These configuration files act as the source of truth for voxelization parameters, camera paths, and post-processing effects, allowing you to switch between indoor walkthroughs and outdoor drives without modifying Python code.

## YAML Preset Structure and Schema

Every preset follows a hierarchical schema where top-level keys group related functionality. When you launch a rendering job, the parser loads the YAML into a configuration object; any CLI flag matching a top-level key will **override** that specific value, while nested structures like `camera.segments` remain intact unless explicitly replaced.

The canonical schema includes these sections:

- **`scene`** – Voxelization and point-cloud parameters (`voxel_size`, `octree_level`, `max_depth`, `downsample`)
- **`preprocess`** – Per-frame filtering (`mask_sky`, `sky_model`, `conf_threshold`)
- **`camera`** – Virtual camera trajectory (`fov`, `transition`, `segments` list)
- **`render`** – Engine settings (`width`, `height`, `point_size`, `depth_colormap`)
- **`overlay`** – UI elements for the final video (`camera_vis`, `trail_color_ramp`)
- **`pipeline`** – Execution control (`fps`, `num_workers`, `fast_review`)
- **`gpu`** – Memory tuning (`build_batch_size`, `cull_chunk_size`, `memory_limit_gb`)

## Indoor Scene Configuration

For small-scale indoor walkthroughs such as office tours or museum captures, use **[`demo_render/config/indoor.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/demo_render/config/indoor.yaml)**. This preset optimizes for confined spaces and static lighting.

Key settings in the indoor preset:

- **`scene.max_depth: 10.0`** – Shallow rendering depth prevents background noise in tight corridors
- **`preprocess.mask_sky: false`** – Disables sky segmentation since indoor scenes lack open sky
- **`camera.segments`** – Single **birdeye** segment covering the entire sequence (`frames: [0, -1]`) for a stable top-down overview

The shallow depth and disabled sky masking reduce GPU memory consumption and processing time for high-resolution indoor scans.

## Outdoor Scene Configuration

For large-scale outdoor drives or aerial footage, use **[`demo_render/config/outdoor_drive.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/demo_render/config/outdoor_drive.yaml)**. This preset accommodates vast distances and dynamic lighting conditions.

Key settings in the outdoor preset:

- **`scene.max_depth: 250.0`** – Deep rendering depth captures distant landscape features
- **`preprocess.mask_sky: true`** – Enables sky masking using an ONNX segmentation model to exclude overexposed pixels from the point cloud
- **`camera.segments`** – Two distinct phases: a **follow** segment for the first 3000 frames that simulates vehicle-like motion with `back_offset`, `up_offset`, and `smooth_window` parameters, followed by a **birdeye** segment for the final overview

The sky-segmentation model runs on GPU with a configurable `sky_batch_size` to balance throughput against memory usage.

## Applying Presets via the Command Line

Pass presets to the rendering pipeline using the `--config` argument. Both [`demo_render/batch_demo.py`](https://github.com/Robbyant/lingbot-map/blob/main/demo_render/batch_demo.py) and [`demo.py`](https://github.com/Robbyant/lingbot-map/blob/main/demo.py) accept this flag.

For a fully YAML-driven indoor render, avoid passing camera-related flags that would discard the preset's `segments` list:

```bash
python demo_render/batch_demo.py \
  --video_path /data/indoor.mp4 \
  --output_folder /data/out/indoor \
  --model_path /path/to/lingbot-map.pt \
  --config demo_render/config/indoor.yaml \
  --mode windowed --window_size 128 \
  --keyframe_interval 10

```

For outdoor scenes, you can keep the preset and override specific values on the fly. For example, increasing camera optimization iterations without editing the file:

```bash
python demo_render/batch_demo.py \
  --video_path /data/drive.mp4 \
  --output_folder /data/out/drive \
  --model_path /path/to/lingbot-map.pt \
  --config demo_render/config/outdoor_drive.yaml \
  --camera_num_iterations 6

```

## Creating Custom Presets

To customize behavior, copy an existing preset and modify the fields. The rendering pipeline automatically picks up new values without code changes.

For example, create [`demo_render/config/custom_indoor.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/demo_render/config/custom_indoor.yaml) with a longer chase-camera segment:

```yaml
scene:
  voxel_size: 0.001
  max_depth: 12.0
preprocess:
  mask_sky: false
camera:
  fov: 60.0
  transition: 30
  segments:
    - mode: follow
      frames: [0, 5000]
      back_offset: 0.25
      up_offset: 0.07
      look_offset: 0.35
      smooth_window: 25
    - mode: birdeye
      frames: [5000, -1]
      reveal_height_mult: 2.0

```

Run the custom preset:

```bash
python demo_render/batch_demo.py \
  --video_path /data/custom_indoor.mp4 \
  --output_folder /data/out/custom_indoor \
  --model_path /path/to/lingbot-map.pt \
  --config demo_render/config/custom_indoor.yaml

```

## Summary

- LingBot-Map uses YAML presets in `demo_render/config/` to declaratively control rendering, preprocessing, and camera behavior
- **Indoor presets** ([`indoor.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/indoor.yaml)) use shallow depth (`max_depth: 10.0`), disable sky masking, and employ a single birdeye camera segment
- **Outdoor presets** ([`outdoor_drive.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/outdoor_drive.yaml)) use deep depth (`max_depth: 250.0`), enable ONNX-based sky segmentation, and combine follow and birdeye camera segments
- Pass presets via `--config` to [`batch_demo.py`](https://github.com/Robbyant/lingbot-map/blob/main/batch_demo.py) or [`demo.py`](https://github.com/Robbyant/lingbot-map/blob/main/demo.py); CLI flags override top-level YAML keys but avoid camera flags when relying on preset segments
- Copy and modify existing YAML files to create custom configurations without altering source code

## Frequently Asked Questions

### What happens if I pass camera flags while using a YAML preset?

If you pass flags like `--camera_mode`, `--back_offset`, or `--look_offset` on the command line, the renderer will discard the `camera.segments` list defined in the YAML and use the CLI values instead. To preserve the preset's multi-segment trajectory, avoid passing any camera-related flags and control the behavior solely through the YAML file.

### Can I switch between indoor and outdoor presets without reprocessing the point cloud?

Yes. The YAML presets primarily affect the rendering and camera trajectory phases. If you have already generated a point cloud, you can re-run the rendering stage with a different `--config` file to produce new videos with different camera paths or depth settings without recomputing the underlying scene geometry.

### How do I adjust GPU memory limits for large outdoor scenes?

Modify the **`gpu`** section in your YAML preset. Increase `memory_limit_gb` to allow larger working sets, or decrease `build_batch_size` and `cull_chunk_size` to process the scene in smaller chunks. These settings are located under the `gpu:` key in both [`indoor.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/indoor.yaml) and [`outdoor_drive.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/outdoor_drive.yaml).

### Why does the outdoor preset require an ONNX model?

The outdoor preset sets **`preprocess.mask_sky: true`** to exclude sky pixels from the point cloud, preventing floating artifacts at the horizon. This feature requires an ONNX-format segmentation model specified by the `sky_model` path. The model runs inference on each frame to generate binary sky masks before depth fusion occurs.