Link to this sectionVirtual KITTI 2 深度データセット#
Virtual KITTI 2 (vKITTI2) は、KITTIの運転シーンをフォトリアリスティックに再現した合成データセットです。元のKITTIデータセットの5つのシーケンスをクローンし、さまざまな天候や照明条件下で再レンダリングすることで、高密度な画素単位のグラウンドトゥルースを提供します。
vKITTI2は屋外運転の合成データセットとして、実際のKITTIにおける疎なLiDARデータに対する高密度な補完データを提供します。これにより、単眼depth estimationモデルをトレーニングするためのクリーンな屋外運転ジオメトリの有用なソースとなります。
Link to this section主な特徴#
- KITTI運転シーンのフォトリアリスティックな合成再現。
- さまざまな天候や照明下でレンダリングされた5つのクローンシーケンス。
- 屋外運転環境。
- 高密度な画素単位のグラウンドトゥルース(実際のKITTI LiDARの疎なデータに対する高密度な補完)。
- 深度範囲 ~80 m。
- Ultralyticsの深度トレーニングミックスに対して42,520枚の画像(トレーニング用25,780枚、検証用16,740枚)を提供。
Link to this sectionデータセットの構造#
Virtual KITTI 2 深度データセットは、以下の2つのサブセットに分割されています。
- Train: トレーニング用の高密度深度マップがペアになった25,780枚の画像。
- Val: トレーニング中の検証用の高密度深度マップがペアになった16,740枚の画像。
各RGB画像は、メートル単位のピクセル距離を格納した.npy形式のfloat32デプスマップとペアになっており、Ultralyticsデプスデータセットフォーマットに従います。
Link to this sectionYOLO26-Depthにおける役割#
Virtual KITTI 2は、Ultralytics YOLO26-Depthモデルの事前トレーニングに使用される広範なマルチデータセット混合(約219万枚の画像)におけるトレーニングソースの1つです。この混合データセットの中で、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 🚀 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モデルをトレーニングするには、以下のコードスニペットを使用できます。利用可能な引数の詳細なリストについては、モデルのTrainingページを参照してください。
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.pt、yolo26s-depth.pt、yolo26m-depth.pt、yolo26l-depth.pt、yolo26x-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の開発者に感謝いたします。