What Datasets Are Supported for Training and Evaluation in LingBot-Map?
LingBot-Map provides a unified dataset framework supporting ten benchmarks—including KITTI Odometry, TUM RGB-D, 7-Scenes, and ETH3D—through a pluggable BaseDataset architecture that enables seamless training and evaluation via YAML configuration.
LingBot-Map, from the Robbyant/lingbot-map repository, implements a modular dataset ecosystem designed for robotics and computer vision research. The framework standardizes how training and evaluation data is ingested, allowing researchers to swap between indoor RGB-D sequences, outdoor odometry benchmarks, and synthetic datasets without modifying core pipeline code.
The BaseDataset Abstraction
All supported datasets inherit from BaseDataset, defined in benchmark/dataset/base.py. This abstraction enforces a uniform API that decouples data loading from mapping algorithms.
The base class requires four core methods:
get_scenes()– Returns a list of scene identifiers (e.g., sequence IDs or video names).get_frame_list(scene)– Returns integer-indexed frame IDs for a specific scene.load_frame_data(scene, frame_id)– Loads RGB images, poses, intrinsics, and depth for a single frame.load_global_data(scene)– Optional method for per-scene data such as global point clouds.
All loaders optionally support COLMAP-based pose and intrinsics extraction and on-the-fly video frame extraction, implemented primarily in the GeneralDataset class.
Supported Training and Evaluation Datasets
LingBot-Map ships with ten pre-built dataset loaders located in benchmark/datasets/. Each loader is automatically discoverable via the ConfigManager in benchmark/benchmark/core/config.py when a matching YAML file is placed in configs/datasets/.
The following datasets are supported for training and evaluation:
- GeneralDataset (
benchmark/datasets/general.py) – Handles arbitrary image folders or video files for quick experiments. - KittiDataset (
benchmark/datasets/kitti.py) – Loads the KITTI Odometry benchmark for outdoor SLAM and visual odometry. - VbrDataset (
benchmark/datasets/vbr.py) – Supports the Vision Benchmark in Rome (VBR) indoor RGB sequences with TUM-style trajectories. - TumDataset (
benchmark/datasets/tum.py) – Implements the classic TUM RGB-D Freiburg indoor dataset. - SevenScenesDataset (
benchmark/datasets/seven_scenes.py) – Loads small-scale indoor RGB-D scenes used for relocalization tasks. - TntDataset (
benchmark/datasets/tnt.py) – Supports the Trajectory-Net-T large-scale outdoor RGB-D dataset with SfM-reconstructed poses. - OxfordSpirtesDataset (
benchmark/datasets/oxford_spires.py) – Handles aerial-style RGB-D sequences collected over Oxford. - NeuralRgbdDataset (
benchmark/datasets/neural_rgbd.py) – Loads synthetic RGB-D data generated by neural rendering pipelines. - Eth3dDataset (
benchmark/datasets/eth3d.py) – Imports high-precision indoor and outdoor multi-view data from ETH3D. - DroidWDataset (
benchmark/datasets/droid_w.py) – Processes visual odometry sequences recorded on a handheld rig.
How to Load Datasets in LingBot-Map
Direct Python Instantiation
You can instantiate any dataset directly by importing its class and providing the root data path. The following example demonstrates loading KITTI sequences:
from benchmark.datasets.kitti import KittiDataset
# Initialize the KITTI dataset
kitti = KittiDataset(
raw_data_root="/data/kitti_odometry",
sequences=["00", "01"], # Optional whitelist of sequences
target_size=[640, 480], # Optional resizing (must be multiples of 14)
)
# Iterate through frames
scene = kitti.get_scenes()[0] # e.g., "00"
for frame_id in kitti.get_frame_list(scene):
data = kitti.load_frame_data(scene, frame_id)
rgb = data["rgb"] # H×W×3 uint8 array
pose = data.get("pose") # 4×4 float32 transformation matrix
intrinsics = data["intrinsics"] # [fx, fy, cx, cy]
# Feed (rgb, pose, intrinsics) into your mapping pipeline
Configuration-Driven Loading
The typical workflow uses ConfigManager to resolve dataset configurations from YAML files. This approach is used by the benchmark runner in benchmark/run.py:
from benchmark.benchmark.core.config import ConfigManager
from pathlib import Path
# Load base configuration
cfg = ConfigManager(Path("configs/base.yaml"))
# Resolve specific dataset configuration
ds_cfg = cfg.get_dataset_config("kitti")
# Returns: {"dataset_class": "kitti", "params": {...}, ...}
# Dynamically import and instantiate
module = __import__(f"benchmark.datasets.{ds_cfg['dataset_class']}", fromlist=["*"])
DatasetCls = getattr(module, f"{ds_cfg['dataset_class'].title()}Dataset")
dataset = DatasetCls(**ds_cfg["params"])
The configuration file configs/base.yaml lists active datasets under the datasets key, where each entry corresponds to a YAML file in configs/datasets/:
# configs/base.yaml
workspace: /tmp/lingbot-workspace
datasets:
- kitti # Refers to configs/datasets/kitti.yaml
- tum_rgbd # Refers to configs/datasets/tum_rgbd.yaml
methods:
- lingbot_map
Extending the Framework with Custom Datasets
Adding a new dataset requires two files: a YAML configuration and a Python loader that inherits from BaseDataset. The framework automatically discovers the new dataset when placed in the correct directories.
Create a configuration file:
# configs/datasets/my_custom.yaml
dataset: my_custom # Must match the Python module name
_use_colmap: true
load_img_size: 640
Implement the loader:
# benchmark/datasets/my_custom.py
from benchmark.dataset.base import BaseDataset
class MyCustomDataset(BaseDataset):
def get_scenes(self):
return ["scene_1", "scene_2"]
def get_frame_list(self, scene):
# Return list of frame indices
return list(range(100))
def load_frame_data(self, scene, frame_id):
# Load and return RGB, pose, intrinsics
return {"rgb": ..., "pose": ..., "intrinsics": ...}
After placing these files in the repository, the ConfigManager automatically registers the dataset for training and evaluation.
Summary
- LingBot-Map supports ten built-in datasets ranging from outdoor odometry (KITTI) to indoor RGB-D (TUM, 7-Scenes, ETH3D) and synthetic data (Neural-RGB-D).
- All datasets implement the
BaseDatasetinterface inbenchmark/dataset/base.py, providing standardized methods likeget_scenes()andload_frame_data(). - The
ConfigManagerinbenchmark/benchmark/core/config.pyhandles automatic discovery and instantiation via YAML configurations inconfigs/datasets/. - Researchers can add custom datasets by creating a Python loader inheriting from
BaseDatasetand a corresponding YAML config file.
Frequently Asked Questions
How do I configure a dataset for evaluation in LingBot-Map?
Add the dataset name to the datasets list in configs/base.yaml, ensuring a matching YAML file exists in configs/datasets/. The ConfigManager validates the configuration and instantiates the corresponding loader class when you run benchmark/run.py.
What is the difference between GeneralDataset and specialized loaders?
GeneralDataset in benchmark/datasets/general.py provides a flexible loader for arbitrary image folders or video files with optional COLMAP pose extraction. Specialized loaders like KittiDataset or TumDataset implement dataset-specific parsing logic for ground-truth trajectories and calibration files, offering higher accuracy for benchmark evaluation.
Does LingBot-Map support custom video files for training?
Yes. The GeneralDataset class supports on-the-fly video frame extraction, allowing you to point the configuration to a video file or folder of images. It optionally extracts poses using COLMAP if ground-truth data is unavailable.
Where are dataset configurations stored in the repository?
Dataset YAML configurations reside in configs/datasets/, while the Python loader implementations are located in benchmark/datasets/. The base configuration in configs/base.yaml defines which datasets are active for a specific training or evaluation run.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →