# YAML Configuration Structure for Camera Paths in demo_render

> Learn the YAML configuration structure for camera paths in Robbyant/lingbot-map's demo_render. Specify dataset root, camera trajectory, and image patterns for your 3D scene rendering.

- Repository: [Robbyant/lingbot-map](https://github.com/Robbyant/lingbot-map)
- Tags: api-reference
- Published: 2026-07-25

---

**The `demo_render` utility requires a YAML configuration file containing `path`, `camera_path`, and `image_pattern` keys to specify the dataset root, COLMAP camera trajectory directory, and image file glob pattern.**

The `demo_render` script in the Robbyant/lingbot-map repository uses a standardized YAML schema to locate input data and camera trajectories for 3D reconstruction rendering. This configuration structure mirrors the benchmark dataset definitions found in the repository, ensuring consistent behavior across different scenes. Understanding the exact key-value pairs is essential for correctly preparing custom datasets for the rendering pipeline.

## Core YAML Structure for Camera Paths

The canonical structure is defined in [`benchmark/configs/datasets/tat.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/benchmark/configs/datasets/tat.yaml), which serves as the reference implementation for camera path configurations. The file uses simple top-level keys to define data locations without nested complexity.

### Required Fields

Every configuration file must specify three mandatory fields that define the data sources. These keys are read directly by the loader without additional nesting:

- **`path`**: The absolute or relative path to the dataset root directory containing the image sequence.
- **`camera_path`**: The subdirectory path (relative to `path` or absolute) containing COLMAP camera trajectory files (typically [`cameras.txt`](https://github.com/Robbyant/lingbot-map/blob/main/cameras.txt) and [`images.txt`](https://github.com/Robbyant/lingbot-map/blob/main/images.txt)).
- **`image_pattern`**: A glob pattern string (e.g., `"*.jpg"`) used to identify valid image files within the `path` directory.

As implemented in [`benchmark/configs/datasets/tat.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/benchmark/configs/datasets/tat.yaml), these fields appear as follows:

```yaml

# Tanks and Temples dataset (TaT) – a set of short video clips with known camera poses.

# The "camera_path" key specifies the location of COLMAP camera trajectory files.

path: /path/to/data/tat

camera_path: /path/to/data/tat/cameras

image_pattern: "*.jpg"

```

### Optional Fields

While the base rendering only requires images and camera poses, the schema supports additional modalities through optional keys:

- **`depth_path`**: Path to a directory containing corresponding depth maps for the image sequence.
- **`mask_path`**: Path to a directory containing segmentation masks or alpha masks.

These optional fields follow the same path conventions as the required fields and are referenced by the loader when available.

## Practical Configuration Examples

Below are runnable YAML templates for different `demo_render` use cases. Each follows the structure verified in the Tanks-and-Temples configuration.

### Standard Video Sequence with COLMAP Poses

Use this template for a typical scenario where COLMAP has processed a video into camera poses:

```yaml

# Root directory for the dataset

path: /mnt/data/my_video

# Directory containing COLMAP camera trajectory files

camera_path: /mnt/data/my_video/cameras

# Glob pattern for input images

image_pattern: "*.png"

```

### Multi-Modal Rendering with Depth

When supplying auxiliary depth maps for advanced rendering features:

```yaml
path: /datasets/office_scene
camera_path: /datasets/office_scene/cameras
image_pattern: "*.jpg"

# Optional depth maps for point cloud densification

depth_path: /datasets/office_scene/depth

```

### Relative Path Configuration

For portable configurations within a project directory:

```yaml
path: ./data/custom_scene
camera_path: ./data/custom_scene/cameras
image_pattern: "*.jpeg"

```

## How demo_render Parses the Configuration

When `demo_render` initializes, it loads the specified YAML file and extracts the `camera_path` value to locate extrinsic and intrinsic camera parameters. According to the repository's implementation, this path is expected to contain COLMAP-formatted camera files that define the trajectory used to render novel views. The `image_pattern` is combined with the `path` directory to generate the ordered list of frames, while optional fields like `depth_path` are resolved similarly if present.

## Summary

- **Required keys**: Every configuration must define `path`, `camera_path`, and `image_pattern` at the top level.
- **Source reference**: The canonical structure is demonstrated in [`benchmark/configs/datasets/tat.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/benchmark/configs/datasets/tat.yaml) within the Robbyant/lingbot-map repository.
- **Camera format**: The `camera_path` directory should contain COLMAP-compatible trajectory files.
- **Extensibility**: Optional fields `depth_path` and `mask_path` support multi-modal rendering pipelines.

## Frequently Asked Questions

### What file format should the camera trajectory files use?

The `camera_path` directory must contain COLMAP-formatted text files, specifically [`cameras.txt`](https://github.com/Robbyant/lingbot-map/blob/main/cameras.txt) for intrinsic parameters and [`images.txt`](https://github.com/Robbyant/lingbot-map/blob/main/images.txt) for extrinsic poses. The loader expects this standard format to reconstruct the camera trajectory for rendering.

### Can I use relative paths in the YAML configuration?

Yes, both absolute and relative paths are supported. Relative paths are resolved from the working directory where `demo_render` is executed. However, absolute paths are recommended for clarity and to avoid path resolution errors.

### Is the `image_pattern` field required if my images have different extensions?

Yes, `image_pattern` is mandatory and accepts a single glob pattern string. If your dataset contains mixed image formats (e.g., `.jpg` and `.png`), you should organize them into separate directories with distinct configuration files or standardize the extensions before rendering.

### Where should I place custom YAML configuration files for demo_render?

Place custom YAML files in the `benchmark/configs/datasets/` directory alongside existing examples like [`tat.yaml`](https://github.com/Robbyant/lingbot-map/blob/main/tat.yaml), or specify the absolute path to your YAML file when invoking `demo_render`. The loader does not enforce a specific location as long as the file path is correctly provided to the script.