Datasets:
Upload folder using huggingface_hub
Browse files
.gitattributes
CHANGED
|
@@ -58,3 +58,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
Scene-Decoupled-Video-Dataset.part_aa filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
Scene-Decoupled-Video-Dataset.part_ab filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
Scene-Decoupled-Video-Dataset.part_ac filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
Scene-Decoupled-Video-Dataset.part_ad filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
Scene-Decoupled-Video-Dataset.part_ae filter=lfs diff=lfs merge=lfs -text
|
Scene-Decoupled-Video-Dataset.part_aa
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec9a3cff8cc09751598a415a9539a515a990fb4b110e27976a29872bb92ca65e
|
| 3 |
+
size 42949672960
|
Scene-Decoupled-Video-Dataset.part_ab
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d24e5b5998d655bb9d287f95912de3a1f7872631c8fc397431ef955f23f0ebc
|
| 3 |
+
size 42949672960
|
Scene-Decoupled-Video-Dataset.part_ac
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:76a0853116a7e9887360ea0cfafa7ec5ed186a4149cf7b80f1437217dd621b2c
|
| 3 |
+
size 42949672960
|
Scene-Decoupled-Video-Dataset.part_ad
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:031acc67c0e964ac1bfd7c77dd58d2bdf2694db8eeb593daad6024a151ff8055
|
| 3 |
+
size 42949672960
|
Scene-Decoupled-Video-Dataset.part_ae
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a74f873d5dcea0c07331663b36ba6fdfe741e7d673f8e6e5f1c8fef773d4fc71
|
| 3 |
+
size 35741068577
|
extract_scene_from_panorama.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import numpy as np
|
| 3 |
+
from PIL import Image
|
| 4 |
+
from equilib import equi2pers
|
| 5 |
+
|
| 6 |
+
# --- Configuration ---
|
| 7 |
+
# Path to the input equirectangular (panorama) image
|
| 8 |
+
INPUT_IMAGE_PATH = "panorama/scene1_3x3_loc1_scene_AncientTempleEnv/scene1_3x3_loc1_scene_AncientTempleEnv_pano.jpeg"
|
| 9 |
+
# Directory where the output perspective frames will be saved
|
| 10 |
+
OUTPUT_DIR = "panorama/scene1_3x3_loc1_scene_AncientTempleEnv/extracted"
|
| 11 |
+
|
| 12 |
+
# Camera parameters
|
| 13 |
+
NUM_FRAMES = 20
|
| 14 |
+
HEIGHT = 384
|
| 15 |
+
WIDTH = 672
|
| 16 |
+
FOV_X = 90.0
|
| 17 |
+
|
| 18 |
+
def generate_perspective_frames():
|
| 19 |
+
"""
|
| 20 |
+
Extracts a sequence of perspective frames from an equirectangular image
|
| 21 |
+
by rotating the yaw angle.
|
| 22 |
+
"""
|
| 23 |
+
# 1. Prepare Output Directory
|
| 24 |
+
if not os.path.exists(OUTPUT_DIR):
|
| 25 |
+
os.makedirs(OUTPUT_DIR)
|
| 26 |
+
print(f"Created directory: {OUTPUT_DIR}")
|
| 27 |
+
|
| 28 |
+
# 2. Load and Preprocess Image
|
| 29 |
+
if not os.path.exists(INPUT_IMAGE_PATH):
|
| 30 |
+
print(f"Error: Input file not found at {INPUT_IMAGE_PATH}")
|
| 31 |
+
return
|
| 32 |
+
|
| 33 |
+
equi_img = Image.open(INPUT_IMAGE_PATH).convert("RGB")
|
| 34 |
+
equi_img_np = np.asarray(equi_img)
|
| 35 |
+
|
| 36 |
+
# equilib requires (C, H, W) format
|
| 37 |
+
equi_img_chw = np.transpose(equi_img_np, (2, 0, 1))
|
| 38 |
+
|
| 39 |
+
print(f"Successfully loaded: {INPUT_IMAGE_PATH}")
|
| 40 |
+
print(f"Generating {NUM_FRAMES} frames...")
|
| 41 |
+
|
| 42 |
+
# 3. Calculate Yaw Angles
|
| 43 |
+
yaw_angles = np.linspace(0, 2 * np.pi, num=NUM_FRAMES, endpoint=False)
|
| 44 |
+
|
| 45 |
+
# 4. Processing Loop
|
| 46 |
+
for i, yaw in enumerate(yaw_angles):
|
| 47 |
+
# Define rotation (in radians)
|
| 48 |
+
# pitch=0: horizontal view; roll=0: no tilt
|
| 49 |
+
rots = {
|
| 50 |
+
'roll': 0.0,
|
| 51 |
+
'pitch': 0.0,
|
| 52 |
+
'yaw': yaw,
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
# Transform equirectangular to perspective
|
| 56 |
+
pers_img_chw = equi2pers(
|
| 57 |
+
equi=equi_img_chw,
|
| 58 |
+
rots=rots,
|
| 59 |
+
height=HEIGHT,
|
| 60 |
+
width=WIDTH,
|
| 61 |
+
fov_x=FOV_X,
|
| 62 |
+
mode="bilinear",
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
+
# Convert back to (H, W, C) and uint8 for saving
|
| 66 |
+
pers_img_hwc = np.transpose(pers_img_chw, (1, 2, 0)).astype(np.uint8)
|
| 67 |
+
output_image = Image.fromarray(pers_img_hwc)
|
| 68 |
+
|
| 69 |
+
# Save the frame
|
| 70 |
+
filename = f"frame_{str(i).zfill(3)}.jpg"
|
| 71 |
+
save_path = os.path.join(OUTPUT_DIR, filename)
|
| 72 |
+
output_image.save(save_path)
|
| 73 |
+
|
| 74 |
+
print(f"Saved: {filename} | Yaw: {np.rad2deg(yaw):.2f}°")
|
| 75 |
+
|
| 76 |
+
print("\nProcessing complete. All frames generated successfully.")
|
| 77 |
+
|
| 78 |
+
if __name__ == "__main__":
|
| 79 |
+
generate_perspective_frames()
|
readme.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Scene-Decoupled Video Dataset
|
| 2 |
+
|
| 3 |
+
TL;DR: The Scene-Decoupled Video Dataset, introduced in CineScene, is a large-scale synthetic dataset for **video generation with decoupled scene**, which encompasses diverse scenes, subjects, and camera movements. This dataset contains camera trajectories, equirectangular panorama (scene image), and videos with/without dynamic subject. The data is organized into "With Human" (whuman) and "Without Human" (wohuman) categories, while panoramas are scene-decoupled and shared across both.
|
| 4 |
+
|
| 5 |
+
## 1. Directory Tree
|
| 6 |
+
|
| 7 |
+
```text
|
| 8 |
+
.
|
| 9 |
+
├── camera/ # Camera trajectories and metadata
|
| 10 |
+
│ ├── whuman/ # Sequences containing human characters
|
| 11 |
+
│ │ └── <scene_id>/ # e.g., scene1_3x3_loc1_scene_AncientTempleEnv/
|
| 12 |
+
│ │ └── <scene_id>_cam.json # Camera parameters
|
| 13 |
+
│ └── wohuman/ # Sequences with environment only
|
| 14 |
+
│ └── <scene_id>/
|
| 15 |
+
│ └── <scene_id>_cam.json
|
| 16 |
+
│
|
| 17 |
+
├── panorama/ # Scene-decoupled environment maps
|
| 18 |
+
│ └── <scene_id>/ # Shared between whuman and wohuman
|
| 19 |
+
│ └── <scene_id>_pano.jpeg # 360° Equirectangular panoramic image
|
| 20 |
+
│
|
| 21 |
+
└── video/ # Rendered video sequences (MP4)
|
| 22 |
+
├── whuman/ # Videos with human characters
|
| 23 |
+
│ └── <scene_id>/
|
| 24 |
+
│ ├── <scene_id>_01_24mm.mp4 # Sub-sequences (01, 02, etc.)
|
| 25 |
+
│ ├── <scene_id>_02_24mm.mp4
|
| 26 |
+
│ └── ...
|
| 27 |
+
└── wohuman/ # Videos without human characters
|
| 28 |
+
└── <scene_id>/
|
| 29 |
+
├── <scene_id>_01_24mm.mp4
|
| 30 |
+
├── ...
|
| 31 |
+
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
## 2. Dataset Statistics
|
| 37 |
+
|
| 38 |
+
* **Total Scale**: 46,816 videos.
|
| 39 |
+
* **Scenes**: 6,688 scenes (comprising 3,344 *whuman* and 3,344 *wohuman* scenes) across 35 high-quality 3D environments.
|
| 40 |
+
* **Trajectories**: 46,816 camera paths (7 distinct camera trajectories per scene).
|
| 41 |
+
* **Panorama**: 360° Equirectangular images for every scene, providing a complete background reference for scene conditioning.
|
| 42 |
+
|
| 43 |
+
| Property | Value |
|
| 44 |
+
| :--- | :--- |
|
| 45 |
+
| **Video Resolution** | 672 x 384 |
|
| 46 |
+
| **Frame Count** | 81 frames per video |
|
| 47 |
+
| **Frame Rate** | 15 FPS |
|
| 48 |
+
| **View Change Range** | Up to 75° |
|
| 49 |
+
| **Decoupled Scene** | 360° Equirectangular (Panorama) |
|
| 50 |
+
| **Panorama Resolution** | 2048 x 1024 |
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
## 3. Dataset Construction
|
| 54 |
+
|
| 55 |
+
We follow the asset collection pipeline established by **RecamMaster**, but introduce three significant enhancements to support more complex generative tasks:
|
| 56 |
+
|
| 57 |
+
1. **Decoupled Scenes**: We provide static 360° panoramic images (Equirectangular) for every scene. This allows for explicit background conditioning and facilitates novel view synthesis from any angle.
|
| 58 |
+
2. **Extended Camera Range**: Our dataset covers significantly larger view changes (approx. **75°**) compared to the 5–60° range provided in previous datasets [1].
|
| 59 |
+
3. **Paired Subject/Background Data**: Every scene includes both "with-subject" (*whuman*) and "background-only" (*wohuman*) video sequences. This paired data is ideal for training models on subject-background decoupling, motion transfer, and cinematic composition.
|
| 60 |
+
|
| 61 |
+
## 4. useful script
|
| 62 |
+
|
| 63 |
+
- download
|
| 64 |
+
|
| 65 |
+
```bash
|
| 66 |
+
sudo apt-get install git-lfs
|
| 67 |
+
git lfs install
|
| 68 |
+
git clone https://huggingface.co/datasets/KwaiVGI/Scene-Decoupled-Video-Dataset
|
| 69 |
+
cat Scene-Decoupled-Video-Dataset.part* > Scene-Decoupled-Video-Dataset.tar.gz
|
| 70 |
+
tar -xvf Scene-Decoupled-Video-Dataset.tar.gz
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
- camera visualization
|
| 74 |
+
|
| 75 |
+
To visualize the camera, please refer to [here.](https://huggingface.co/datasets/KlingTeam/MultiCamVideo-Dataset/blob/main/vis_cam.py)
|
| 76 |
+
|
| 77 |
+
- Perspective Projection
|
| 78 |
+
To extract perspective frames from the panoramic images:
|
| 79 |
+
|
| 80 |
+
```
|
| 81 |
+
python extract_scene_from_panorama.py
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
References
|
| 87 |
+
[1] Bai J, Xia M, Fu X, et al. Recammaster: Camera-controlled generative rendering from a single video[J]. arXiv preprint arXiv:2503.11647, 2025.
|