Link to this sectionTập dữ liệu độ sâu SUN RGB-D#
SUN RGB-D là một benchmark hiểu ngữ cảnh trong nhà thực tế được thu thập bằng bốn cảm biến RGB-D khác nhau: Intel RealSense, Asus Xtion, và Microsoft Kinect v1 và v2. Thiết kế đa cảm biến của nó tạo thành nguồn dữ liệu giá trị về độ đa dạng độ sâu trong nhà thực tế cho monocular depth estimation.
Link to this sectionTính năng chính#
- Được thu thập bằng bốn cảm biến RGB-D khác nhau (Intel RealSense, Asus Xtion, Microsoft Kinect v1 và v2), cung cấp sự đa dạng thực tế từ nhiều cảm biến.
- Bao phủ phạm vi rộng lớn các cảnh trong nhà thực tế cho nghiên cứu hiểu ngữ cảnh.
- Phạm vi độ sâu lên tới khoảng 10 m, điển hình cho việc thu thập dữ liệu RGB-D trong nhà của người tiêu dùng.
- Độ sâu ground truth từ cảm biến được căn chỉnh với các khung hình RGB.
- Đóng góp sự đa dạng trong nhà từ nhiều cảm biến thực tế vào hỗn hợp tiền huấn luyện độ sâu của Ultralytics.
Link to this sectionCấu trúc tập dữ liệu#
Tập dữ liệu độ sâu SUN RGB-D được chia thành hai tập con:
- Train: 9.245 hình ảnh kèm bản đồ độ sâu để huấn luyện.
- Val: 1.090 hình ảnh kèm bản đồ độ sâu để kiểm chứng trong quá trình huấn luyện model.
Mỗi mẫu bao gồm một ảnh RGB và một bản đồ độ sâu .npy float32 đi kèm lưu trữ khoảng cách theo từng pixel (đơn vị mét), tuân theo định dạng tập dữ liệu độ sâu của Ultralytics.
Link to this sectionVai trò trong YOLO26-Depth#
SUN RGB-D là nguồn huấn luyện trong hỗn hợp tiền huấn luyện đa tập dữ liệu YOLO26-Depth của Ultralytics với khoảng 2,19 triệu cặp hình ảnh–độ sâu. Nó đóng góp sự đa dạng trong nhà từ nhiều cảm biến thực tế, giúp model tiếp xúc với độ sâu được ghi lại qua nhiều thiết bị RGB-D tiêu dùng khác nhau. Các model thu được sẽ được đánh giá trên các benchmark tiêu chuẩn NYU, KITTI, Make3D, ETH3D, và iBims-1.
Link to this sectionYAML tập dữ liệu#
Một tệp YAML (Yet Another Markup Language) được sử dụng để xác định cấu hình tập dữ liệu. Nó chứa thông tin về đường dẫn, các lớp và các thông tin liên quan khác của tập dữ liệu.
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# SUN RGB-D dataset for monocular depth estimation — real indoor, multi-sensor RGB-D (RealSense/Xtion/Kinect), up to ~10 m
# Documentation: https://docs.ultralytics.com/datasets/depth/sunrgbd
# Example usage: yolo depth train data=depth-sunrgbd.yaml model=yolo26n-depth.pt
# parent
# ├── ultralytics
# └── datasets
# └── depth-sunrgbd ← downloads here (6.5 GB archive, ~14 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-sunrgbd dir and re-run to rebuild it.
path: depth-sunrgbd # dataset root dir (relative to Ultralytics settings 'datasets_dir')
train: images/train # train images (relative to 'path') 9245 images
val: images/val # val images (relative to 'path') 1090 images
nc: 1
names:
0: depth
channels: 3
# Download script/URL (optional)
download: |
import random
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 archive (~6.5 GB), then convert each of the 10335 scenes:
# refined depth_bfx PNGs decode via the SUN RGB-D bit-rotation (d>>3 | d<<13) to millimeters,
# clipped at 10 m; a deterministic random 1090-scene subset (seed 0) forms the val split
dir = Path(yaml["path"]) # dataset root dir
download(["https://rgbd.cs.princeton.edu/data/SUNRGBD.zip"], dir=dir / "source", delete=True, exist_ok=True)
for split in ("train", "val"):
(dir / "images" / split).mkdir(parents=True, exist_ok=True)
(dir / "depth" / split).mkdir(parents=True, exist_ok=True)
scenes = sorted(p.parent for p in (dir / "source" / "SUNRGBD").rglob("depth_bfx"))
names = ["_".join(s.relative_to(dir / "source" / "SUNRGBD").parts) for s in scenes]
val = set(random.Random(0).sample(names, k=1090))
for scene, name in TQDM(zip(scenes, names), total=len(scenes), desc="Converting"):
split = "val" if name in val else "train"
d = cv2.imread(str(next((scene / "depth_bfx").glob("*.png"))), cv2.IMREAD_ANYDEPTH)
d = (((d >> 3) | (d << 13)) / 1000.0).clip(max=10).astype(np.float32) # bit-rotated mm -> m
np.save(dir / "depth" / split / f"{name}.npy", d)
next((scene / "image").glob("*.jpg")).replace(dir / "images" / split / f"{name}.jpg")
shutil.rmtree(dir / "source")Link to this sectionCách sử dụng#
Để huấn luyện model YOLO26n-depth trên tập dữ liệu SUN RGB-D với kích thước hình ảnh là 640, bạn có thể sử dụng các đoạn mã sau. Để xem danh sách toàn diện các tham số khả dụng, hãy tham khảo trang Training của model.
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n-depth.pt") # load a pretrained depth model (recommended for training)
# Train the model
results = model.train(data="depth-sunrgbd.yaml", epochs=100, imgsz=640)Link to this sectionCác model đã được tiền huấn luyện#
Dòng model YOLO26 depth được huấn luyện trên hỗn hợp tiền huấn luyện độ sâu từ nhiều tập dữ liệu mà SUN RGB-D là một phần trong đó. Các model này tự động tải xuống từ bản phát hành mới nhất của Ultralytics, ví dụ YOLO26x-depth từ v8.4.0, và bao gồm nhiều kích thước cho các yêu cầu khác nhau về độ chính xác và tài nguyên.
Link to this sectionTrích dẫn và Ghi nhận#
Nếu bạn sử dụng tập dữ liệu SUN RGB-D trong nghiên cứu hoặc công việc phát triển của mình, vui lòng trích dẫn bài báo sau đây:
@inproceedings{song2015sunrgbd,
title={SUN RGB-D: A RGB-D Scene Understanding Benchmark Suite},
author={Song, Shuran and Lichtenberg, Samuel P. and Xiao, Jianxiong},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2015}
}Chúng tôi xin ghi nhận các tác giả đã tạo ra và duy trì tài nguyên giá trị này cho cộng đồng computer vision.