TartanAir 深度数据集#
TartanAir 是一个在 AirSim 模拟器中生成的大规模合成数据集。它旨在突破视觉 SLAM 的极限,涵盖室内、室外、城市和自然场景等多种环境,以及季节、天气和光照变化,还有各种具有挑战性的条件。
由于 TartanAir 在模拟环境中渲染,因此它能够为这些多样化场景提供密集深度真值,成为训练单目深度估计模型时获取环境多样性和远距离几何信息的重要来源。
主要特性#
- 在 AirSim 模拟器中生成的合成数据。
- 多样化的室内和室外环境(城市、自然),包含季节、天气和光照变化,以及各种具有挑战性的条件。
- 所有场景均提供密集深度真值。
- 深度范围达到约 80 m。
- 为 Ultralytics 深度训练混合数据集贡献 61,470 张图像(55,660 张训练图像 / 5,810 张验证图像)。
数据集结构#
TartanAir 深度数据集分为两个子集:
- 训练集:55,660 张图像,每张图像都配有对应的密集深度图,用于训练。
- 验证集:5,810 张图像,每张图像都配有对应的密集深度图,用于训练期间的验证。
每张 RGB 图像都配有一个经过缩放的 uint16 深度 PNG,单位为每米 256 个单位(depth_scale: 256),并遵循 Ultralytics 深度数据集格式。该格式以 3.90625 mm 的分辨率表示完整的 80 m 范围。
获取数据#
TartanAir 不支持自动下载——数据由 CMU 的 AirLab 分发(有关条款,请参阅数据集页面),并使用 tartanair_tools 脚本下载:
git clone https://github.com/castacks/tartanair_tools && cd tartanair_tools
python download_training.py --output-dir ./data --rgb --depth --only-left --unzip深度数据已以米为单位存储为 float32 .npy(depth_left/*_left_depth.npy 位于 image_left/*_left.png 旁边),因此转换只需重新排列数据并将天空区域设为无效(天空被渲染为极远距离;发布的混合数据集会将距离裁剪到 80 m,以匹配数据集 YAML)。TartanAir 未提供官方验证集划分——请留出一个或多个环境作为验证集。转换为 Ultralytics 深度数据集格式的参考代码:
import shutil
from pathlib import Path
import numpy as np
from ultralytics.data.utils import save_depth_png
VAL_ENVS = {"neighborhood"} # environments held out for validation
src, dst = Path("data"), Path("datasets/depth-tartanair")
for depth_file in sorted(src.rglob("depth_left/*_left_depth.npy")):
env, traj = depth_file.parts[-5], depth_file.parts[-3]
out = "val" if env.lower() in VAL_ENVS else "train"
(dst / f"images/{out}").mkdir(parents=True, exist_ok=True)
(dst / f"depth/{out}").mkdir(parents=True, exist_ok=True)
depth = np.load(depth_file)
depth[depth > 80.0] = 0.0 # sky/extreme range → 0 = invalid
frame = depth_file.name.replace("_depth.npy", "") # e.g. 000000_left
name = f"{env}_{traj}_{frame}"
save_depth_png(dst / f"depth/{out}/{name}.png", depth, scale=256)
shutil.copy(depth_file.parents[1] / "image_left" / f"{frame}.png", dst / f"images/{out}/{name}.png")在 YOLO26-Depth 中的作用#
TartanAir 是用于预训练 Ultralytics YOLO26-Depth 模型的广泛多数据集混合数据(约 2.19M 张图像)中的一个训练来源。在该混合数据中,TartanAir 提供了合成环境多样性和远距离室外几何信息,可与室内及真实世界数据源形成互补。
在此设置中,没有单独的 TartanAir 留出基准测试。相反,最终模型会在标准单目深度基准上进行评估:NYU Depth V2、KITTI、Make3D、ETH3D 和 iBims-1。
数据集 YAML#
使用 YAML 文件来定义数据集配置。它包含有关数据集路径、类别和其他相关信息的信息。对于 TartanAir,depth-tartanair.yaml 文件定义了路径和单个 depth 类别。
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# TartanAir dataset for monocular depth estimation — synthetic indoor + outdoor (AirSim), dense depth up to ~80 m
# Documentation: https://docs.ultralytics.com/datasets/depth/tartanair
# Example usage: yolo depth train data=depth-tartanair.yaml model=yolo26n-depth.pt
# No autodownload — obtain the source data (see docs) and arrange it as below.
# parent
# ├── ultralytics
# └── datasets
# └── depth-tartanair
# ├── images/{train,val} # RGB images
# └── depth/{train,val} # paired 16-bit *.png depth maps (images/ -> depth/)
path: depth-tartanair # dataset root dir (relative to Ultralytics settings 'datasets_dir')
train: images/train # train images (relative to 'path') 55660 images
val: images/val # val images (relative to 'path') 5810 images
max_depth: 80 # (m) maximum valid depth; GT beyond this is excluded from val metrics
nc: 1
names:
0: depth
channels: 3
depth_scale: 256 # PNG value 256 = 1 meter; represents the 80 m outdoor range使用方法#
要使用图像大小 640 在 TartanAir 数据集上训练 YOLO26n-Depth 模型,可以使用以下代码片段。有关可用参数的完整列表,请参阅模型训练页面。
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n-depth.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data="depth-tartanair.yaml", epochs=100, imgsz=640)预训练模型#
YOLO26 深度系列(yolo26n-depth.pt、yolo26s-depth.pt、yolo26m-depth.pt、yolo26l-depth.pt、yolo26x-depth.pt)会从 Ultralytics 发布版本自动下载,并基于包含 TartanAir 的广泛多数据集混合数据进行训练。在 Ultralytics Platform 上探索 YOLO26x-depth。
引用和致谢#
如果你在研究或开发工作中使用 TartanAir 数据集,请引用以下论文:
@inproceedings{wang2020tartanair,
title={TartanAir: A Dataset to Push the Limits of Visual SLAM},
author={Wenshan Wang and Delong Zhu and Xiangwei Wang and Yaoyu Hu and Yuheng Qiu and Chen Wang and Yafei Hu and Ashish Kapoor and Sebastian Scherer},
booktitle={IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
year={2020}
}我们感谢 TartanAir 的创建者为计算机视觉社区提供了这一多样化的合成数据集。
常见问题#
TartanAir 是在 AirSim 模拟器中渲染的大型合成数据集,最初旨在测试视觉 SLAM。它涵盖了不同季节、天气和光照条件下的室内、室外、城市和自然环境,并为 YOLO26-Depth 训练集贡献了 61,470 张图像(55,660 张用于训练,5,810 张用于验证),其密集深度可达约 80 米。
TartanAir 没有自动下载功能。使用 tartanair_tools 脚本获取 RGB 和深度数据,然后使用
depth_scale: 256将以米为单位的 float32.npy深度转换为 uint16 PNG,并将超过 80 米的天空像素裁剪为0。如获取数据所示,保留一个或多个环境用于验证。