企业级安全防护: 符合 ISO 27001 + SOC 2 Type I 标准。

Link to this sectionVirtual KITTI 2 深度数据集#

Virtual KITTI 2 (vKITTI2) 是对 KITTI 驾驶场景的逼真合成重建。它克隆了原始 KITTI 数据集中的 5 个序列,并在不同的天气和光照条件下重新渲染,提供了密集的逐像素真值。

作为户外驾驶合成数据集,vKITTI2 为稀疏的真实 KITTI LiDAR 返回数据提供了密集的对应物,使其成为训练单目 深度估计 模型时获取干净的户外驾驶几何数据的有用来源。

Link to this section主要特性#

  • 对 KITTI 驾驶场景的逼真 合成 重建。
  • 在不同天气和光照下渲染的 5 个克隆序列
  • 户外驾驶 环境。
  • 密集的 逐像素 真值(稀疏真实 KITTI LiDAR 的密集对应物)。
  • 深度范围 ~80 m
  • 为 Ultralytics 深度训练组合贡献了 42,520 张图像(25,780 张用于训练 / 16,740 张用于验证)。

Link to this section数据集结构#

Virtual KITTI 2 深度数据集分为两个子集:

  1. Train(训练集):25,780 张带有配对密集深度图的图像,用于训练。
  2. Val(验证集):16,740 张带有配对密集深度图的图像,用于训练期间的验证。

每张 RGB 图像都配有一个 .npy float32 深度图,以米为单位存储逐像素距离,并遵循 Ultralytics 深度数据集格式

Link to this section在 YOLO26-Depth 中的作用#

Virtual KITTI 2 是用于预训练 Ultralytics YOLO26-Depth 模型的大规模多数据集混合(~219 万张图像)中的 训练来源 之一。在此组合中,vKITTI2 为稀疏的真实 KITTI LiDAR 真值提供了密集的合成户外驾驶对应数据。

在此配置中没有独立的 vKITTI2 留出测试基准。相反,生成的模型会在标准的单目深度基准上进行评估:NYU Depth V2、KITTI、Make3D、ETH3D 和 iBims-1。

Link to this section数据集 YAML#

YAML(Yet Another Markup Language)文件用于定义数据集配置。它包含有关数据集路径、类别及其他相关信息。对于 Virtual KITTI 2,depth-vkitti2.yaml 文件定义了路径和单一的 depth 类别。

ultralytics/cfg/datasets/depth-vkitti2.yaml
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

# Virtual KITTI 2 dataset for monocular depth estimation — photorealistic synthetic outdoor driving, dense per-pixel depth
# Documentation: https://docs.ultralytics.com/datasets/depth/vkitti2
# Example usage: yolo depth train data=depth-vkitti2.yaml model=yolo26n-depth.pt
# parent
# ├── ultralytics
# └── datasets
#     └── depth-vkitti2  ← downloads here (15 GB archives, ~85 GB converted)
#         ├── images/{train,val}  # RGB images
#         └── depth/{train,val}   # paired *.npy, float32 meters (images/ -> depth/)
# If an interrupted download leaves a partial dataset, delete the depth-vkitti2 dir and re-run to rebuild it.

path: depth-vkitti2 # dataset root dir (relative to Ultralytics settings 'datasets_dir')
train: images/train # train images (relative to 'path') 25780 images
val: images/val # val images (relative to 'path') 16740 images
max_depth: 80 # (m) maximum valid depth; GT beyond this is excluded from val metrics

nc: 1
names:
  0: depth

channels: 3

# Download script/URL (optional)
download: |
  import shutil
  from pathlib import Path

  import cv2
  import numpy as np

  from ultralytics.utils import TQDM
  from ultralytics.utils.downloads import download

  # Download and extract the official RGB + depth tars (~15 GB), then convert: Scene20 -> val, all
  # other scenes -> train; depth PNGs are uint16 centimeters (sky = 655.35 m), clipped at 80 m
  dir = Path(yaml["path"])  # dataset root dir
  urls = [f"https://download.europe.naverlabs.com/virtual_kitti_2.0.3/vkitti_2.0.3_{s}.tar" for s in ("rgb", "depth")]
  download(urls, dir=dir / "source", delete=True)
  for split in ("train", "val"):
      (dir / "images" / split).mkdir(parents=True, exist_ok=True)
      (dir / "depth" / split).mkdir(parents=True, exist_ok=True)
  for im in TQDM(sorted((dir / "source").rglob("rgb_*.jpg")), desc="Converting"):
      scene, variation, camera = im.parts[-6], im.parts[-5], im.parts[-2]  # Scene01/clone/frames/rgb/Camera_0/rgb_00000.jpg
      split = "val" if scene == "Scene20" else "train"
      name = f"{scene}_{variation}_{camera}_{im.stem[4:]}"
      depth = cv2.imread(str(im.parents[2] / "depth" / camera / f"depth_{im.stem[4:]}.png"), cv2.IMREAD_ANYDEPTH)
      np.save(dir / "depth" / split / f"{name}.npy", (depth.astype(np.float32) / 100.0).clip(max=80))  # cm -> m
      im.replace(dir / "images" / split / f"{name}.jpg")
  shutil.rmtree(dir / "source")

Link to this section用法#

若要在图像尺寸为 640 的情况下在 Virtual KITTI 2 数据集上训练 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-vkitti2.yaml", epochs=100, imgsz=640)

Link to this section预训练模型#

YOLO26 深度系列(yolo26n-depth.ptyolo26s-depth.ptyolo26m-depth.ptyolo26l-depth.ptyolo26x-depth.pt)可从 v8.4.0 版本 自动下载,并已在 Virtual KITTI 2 所属的大规模多数据集混合数据上进行训练。

Link to this section引用与致谢#

如果你在研究或开发工作中使用了 Virtual KITTI 2 数据集,请引用以下论文:

引用
@article{cabon2020vkitti2,
      title={Virtual KITTI 2},
      author={Yohann Cabon and Naila Murray and Martin Humenberger},
      journal={arXiv preprint arXiv:2001.10773},
      year={2020}
}

我们要感谢 Virtual KITTI 2 的创建者,感谢他们向计算机视觉社区提供这一合成驾驶数据集。

贡献者

评论