Implementation:Facebookresearch Habitat lab Dataset Registration
| Knowledge Sources | |
|---|---|
| Domains | Embodied_AI, Dataset_Management |
| Last Updated | 2026-02-15 00:00 GMT |
Overview
This module provides the make_dataset factory function and triggers registration of all built-in Habitat dataset types (PointNav, ObjectNav, VLN, Rearrange, EQA, ImageNav) at import time.
Description
The dataset registration module serves two purposes:
- Factory function --
make_dataset(id_dataset, **kwargs)looks up a dataset class by its string identifier from the Habitat registry and instantiates it with the provided keyword arguments. It logs the initialization and asserts that the dataset was found.
- Auto-registration -- At module import time, the module calls registration functions for all built-in dataset types:
_try_register_objectnavdatasetv1()-- ObjectNav dataset_try_register_instanceimagenavdatasetv1()-- Instance ImageNav dataset_try_register_mp3d_eqa_dataset()-- MP3D EQA dataset_try_register_pointnavdatasetv1()-- PointNav dataset_try_register_r2r_vln_dataset()-- R2R VLN dataset_try_register_rearrangedatasetv0()-- Rearrange dataset
Each registration function uses a try-register pattern that gracefully handles missing dependencies, allowing the module to load even if some dataset dependencies are not installed.
Usage
Import this module (or call make_dataset) to ensure all built-in datasets are registered. Use make_dataset to create dataset instances by name in training and evaluation scripts.
Code Reference
Source Location
- Repository: Facebookresearch_Habitat_lab
- File: habitat-lab/habitat/datasets/registration.py
- Lines: 1-30
Signature
def make_dataset(id_dataset, **kwargs):
Import
from habitat.datasets.registration import make_dataset
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| id_dataset | str | Yes | The registered identifier string for the dataset type (e.g., "PointNav-v1") |
| **kwargs | Any | No | Additional keyword arguments passed to the dataset constructor (e.g., config, split) |
Outputs
| Name | Type | Description |
|---|---|---|
| (return) | Dataset | An instantiated dataset object of the registered type |
Usage Examples
Basic Usage
from habitat.datasets.registration import make_dataset
# Create a PointNav dataset
dataset = make_dataset(
id_dataset="PointNav-v1",
config=config.habitat.dataset,
)
# Create an ObjectNav dataset
dataset = make_dataset(
id_dataset="ObjectNav-v1",
config=config.habitat.dataset,
)
# The function logs the initialization and asserts the dataset exists
# If the dataset ID is not registered, an AssertionError is raised