ffs_stereo4d
收藏资源简介:
FFS Stereo4D是一个用于立体匹配任务的视差图数据集,基于Stereo4D数据集并通过FoundationStereo生成。数据集包含784×784分辨率的3通道uint8 PNG格式视差图像,编码方式为`disp = (R * 255*255 + G * 255 + B) / 1000.0`。数据规模在10万到100万之间,以zip文件形式组织,每个zip包含50,000张图像。数据集还提供了metadata.csv文件,链接每张视差图像到其来源的YouTube视频,包含视频ID、时间戳、帧索引等元数据。由于版权限制,数据集仅包含视差图,用户需自行下载原始RGB帧。该数据集适用于立体匹配、深度估计等计算机视觉任务,并提供了详细的相机参数和深度计算公式。
FFS Stereo4D is a disparity map dataset for stereo matching tasks, developed based on the Stereo4D dataset and generated via FoundationStereo. The dataset contains 3-channel uint8 PNG format disparity images with a resolution of 784 × 784, encoded using the formula `disp = (R * 255*255 + G * 255 + B) / 1000.0`. The dataset has a scale ranging from 100,000 to 1,000,000 samples, and is organized in zip archive files, with each zip containing 50,000 images. The dataset also provides a metadata.csv file that links each disparity image to its source YouTube video, including metadata such as video ID, timestamp, frame index, etc. Due to copyright constraints, the dataset only includes disparity maps, and users are required to download the original RGB frames independently. This dataset is suitable for computer vision tasks such as stereo matching and depth estimation, and provides detailed camera parameters and depth calculation formulas.
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}, }



