ffs_stereo4d
收藏FFS Stereo4D 数据集概述
基本信息
- 数据集名称:FFS Stereo4D
- 许可证:CC BY-NC 4.0
- 任务类别:深度估计
- 标签:立体匹配、视差、stereo4d、foundationstereo
- 数据规模:100K < n < 1M
数据集描述
该数据集包含用于立体匹配的视差图,这些视差图是使用 FoundationStereo 从 Stereo4D 数据集生成的。
数据集结构
数据存储在 data/train/ 目录下,包含:
metadata.csv文件- 多个 ZIP 文件(例如
0000000.zip、0000001.zip...0000025.zip),每个 ZIP 文件包含 50,000 张图像。
数据文件详情
- 视差图像:每个 ZIP 文件包含 PNG 格式的视差文件,文件命名格式为
{vid_id}_frame_{frame_idx:06d}.png。- 图像格式:3 通道 uint8,分辨率为 784×784 的 PNG 文件。
- 编码方式:每个像素的视差值通过
disp = (R * 255*255 + G * 255 + B) / 1000.0解码。 - 参考解码脚本:https://github.com/NVlabs/FoundationStereo/blob/master/scripts/vis_dataset.py
- 元数据文件:
metadata.csv文件将每张视差图像链接回其源 YouTube 视频,并通过zip_file列指示图像所在的 ZIP 文件。
元数据列说明
| 列名 | 描述 |
|---|---|
file_name |
视差图像文件名(位于 ZIP 文件内) |
zip_file |
包含此图像的 ZIP 文件 |
vid_id |
片段标识符(与 .npz 校准文件匹配) |
frame_idx |
校正后立体输出中的帧索引 |
youtube_video_id |
源 360 视频的 YouTube 视频 ID |
timestamp_us |
原始视频中的时间戳(微秒) |
timestamp_sec |
时间戳(秒) |
video_frame_index |
原始视频中的估计帧号 |
fps |
源视频的帧率 |
获取源 RGB 帧
该数据集仅包含视差图。由于视频版权原因,用户需自行下载对应的左右 RGB 立体图像对。恢复步骤如下:
- 使用 stereo4d toolkit 根据
youtube_video_id下载 YouTube 视频。 - 定位到
timestamp_sec(或video_frame_index)以找到源帧。 - 使用 Stereo4D 校准
.npz文件进行等距柱面投影校正,以获得左右透视图像。
生成流程
- 源数据:来自 Stereo4D 数据集的 YouTube 360 视频。
- 校正:等距柱面帧被校正并裁剪为 1024×1024 的透视立体图像对。
- 视差估计:FoundationStereo 以 784×784 的分辨率(对 1024×1024 输入按
scale=0.765625缩放)计算密集视差。
相机参数
校正后的立体图像对以 1024×1024 生成,采用以下针孔相机模型:
| 参数 | 值(1024×1024 校正后) | 值(784×784 视差) | 公式 |
|---|---|---|---|
| HFOV | 60° | 60° | output_hfov in batch_rectify.py |
| Baseline | 0.063 m | 0.063 m | VR180 相机的假定瞳距 |
| fx, fy | 886.8 px | 678.8 px | size * 0.5 / tan(0.5 * HFOV * pi/180) |
| cx, cy | 512 px | 392 px | 图像中心 |
深度计算公式为:depth = fx * baseline / disparity。
由于视差是在 784×784 分辨率下计算的(缩放因子为 784/1024 = 0.765625),因此在将视差转换为深度时,请使用 784×784 的相机参数: python import numpy as np hfov = 60 # 度 baseline = 0.063 # 米 imw = 784 fx = imw * 0.5 / np.tan(0.5 * np.radians(hfov)) # 678.8 px depth = fx * baseline / disparity
引用
如果使用此数据集,请考虑引用: bibtex @article{wen2026fastfoundationstereo, title={Fast-FoundationStereo: Real-Time Zero-Shot Stereo Matching}, author={Bowen Wen and Shaurya Dewan and Stan Birchfield}, journal={CVPR}, year={2026} } @article{wen2025foundationstereo, title={FoundationStereo: Zero-Shot Stereo Matching}, author={Wen, Bowen and Trepte, Matthew and Aribido, Joseph and Kautz, Jan and Birchfield, Stan and Wan, Yao}, journal={CVPR}, year={2025} } @inproceedings{jin2025stereo4d, title={{Stereo4D: Learning How Things Move in 3D from Internet Stereo Videos}}, author={Jin, Linyi and Tucker, Richard and Li, Zhengqi and Fouhey, David and Snavely, Noah and Holynski, Aleksander}, booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, year={2025}, }



