c3vdv2-SfM / README.md
SmartWhatt's picture
Add configs/data_files globs for nested parquet structure
4f0cfa6 verified
metadata
license: cc-by-4.0
task_categories:
  - depth-estimation
language:
  - en
tags:
  - endoscopy
  - colonoscopy
  - depth
  - pose
  - medical
dataset_info:
  features:
    - name: dataset_name
      dtype: string
    - name: sequence
      dtype: string
    - name: frame_idx
      dtype: int32
    - name: frame_idx_prev
      dtype: int32
    - name: frame_idx_curr
      dtype: int32
    - name: frame_idx_next
      dtype: int32
    - name: rgb_prev
      dtype: image
    - name: rgb_curr
      dtype: image
    - name: rgb_next
      dtype: image
    - name: depth
      dtype: image
    - name: occlusion
      dtype: image
    - name: pose_curr2prev
      sequence: float64
    - name: pose_curr2next
      sequence: float64
    - name: K
      sequence: float32
    - name: has_depth
      dtype: bool
    - name: has_occlusion
      dtype: bool
    - name: has_pose
      dtype: bool
    - name: source_fps
      dtype: float32
    - name: target_fps
      dtype: float32
    - name: frame_stride
      dtype: int32
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train/**/*.parquet
      - split: val
        path: data/val/**/*.parquet
      - split: test
        path: data/test/**/*.parquet

C3VDv2 — Colonoscopy 3D Video Dataset v2

This dataset is a re-packaged version of C3VDv2 originally published by Johns Hopkins University, distributed under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.

Original dataset DOI: https://doi.org/10.7281/T1/JC64MK Dataset archive: https://archive.data.jhu.edu/dataset.xhtml?persistentId=doi:10.7281/T1/JC64MK

Attribution

This re-packaged version was created to facilitate streaming access. The original data and all intellectual property rights belong to the original authors and Johns Hopkins University. When using this dataset, you must comply with the CC BY 4.0 license terms, which require attribution to the original creators.

Please cite the original work (check the dataset page above for the full citation):

@dataset{c3vdv2,
  title  = {C3VDv2: Colonoscopy 3D Video Dataset v2},
  doi    = {10.7281/T1/JC64MK},
  url    = {https://archive.data.jhu.edu/dataset.xhtml?persistentId=doi:10.7281/T1/JC64MK},
  publisher = {Johns Hopkins University Data Archive},
}

Re-packaging

Raw omnidirectional fisheye frames (1350×1080) are converted to undistorted perspective crops (512×512) using the Scaramuzza camera model from camera_intrinsics.txt. Each Parquet row is one training sample:

column dtype description
sequence string sequence name, e.g. c1_ascending_t1_v1
frame_idx int32 centre frame index
frame_idx_prev/curr/next int32 original frame indices in the triplet
rgb_prev image undistorted 512×512 PNG (HF Image feature)
rgb_curr image undistorted 512×512 PNG (HF Image feature)
rgb_next image undistorted 512×512 PNG (HF Image feature)
depth image 16-bit PNG, 512×512, uint16 value → metres: val / 65535 * 0.1
occlusion image 8-bit PNG, 512×512, 255 = occluded, 0 = clear
pose_curr2prev list[float64] 16-value row-major 4×4 relative pose
pose_curr2next list[float64] 16-value row-major 4×4 relative pose
K list[float32] 9-value row-major 3×3 normalised camera intrinsics
has_depth/has_occlusion/has_pose bool supervised label availability flags
frame_stride int32 original-frame stride between triplet neighbours

Splits

split trials description
train t1, t2 two trajectories per region
val t4 held-out trajectory
test t3 held-out trajectory

Usage

from datasets import load_dataset
import numpy as np
from PIL import Image
import io

ds = load_dataset("SmartWhatt/c3vdv2-SfM", split="train", streaming=True)

for row in ds:
    rgb   = np.array(row["rgb_curr"])                                    # 512×512×3 uint8
    depth = np.array(row["depth"]).astype(np.float32) / 65535.0 * 0.1  # 512×512 metres
    occ   = np.array(row["occlusion"]) > 0                              # 512×512 bool mask
    T_curr2prev = np.array(row["pose_curr2prev"]).reshape(4, 4)
    K = np.array(row["K"]).reshape(3, 3)