Skip to content

Commit 8a68be8

Browse files
authored
Update README.md with description of trimming; adding collapsible sections.
1 parent ed0e64d commit 8a68be8

1 file changed

Lines changed: 17 additions & 20 deletions

File tree

‎README.md‎

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ python3 ./code/download_physics_iq_data.py
7575

7676
This section explains how to generate videos using the provided benchmark and save them in the required format. Follow the instructions below based on your model type:
7777

78-
#### 2.1 Image-to-Video (i2v) Models
78+
#### 2.1 Image-to-Video Models (I2V)
79+
80+
<details>
81+
<summary>I2V steps</summary>
7982

8083
1. **Input Requirements**:
8184
- **Initial Frame**: Use frames from `physics-iq-benchmark/switch-frames`.
@@ -89,9 +92,12 @@ This section explains how to generate videos using the provided benchmark and sa
8992
```
9093
- Refer to the `generated_video_name` column in `descriptions.csv` for file naming conventions.
9194
92-
---
95+
</details>
96+
97+
#### 2.2 Multiframe-to-Video Models (V2V)
9398
94-
#### 2.2 Multiframe-to-Video Models
99+
<details>
100+
<summary>V2V steps</summary>
95101
96102
1. **Input Requirements**:
97103
- **Conditioning Frames**:
@@ -108,38 +114,29 @@ This section explains how to generate videos using the provided benchmark and sa
108114
```
109115
- Refer to the `generated_video_name` column in `descriptions.csv` for file naming conventions.
110116
111-
---
117+
</details>
112118
113119
#### 2.3 Trim Generated Videos to 5 Seconds
114120
115-
⚠️ **IMPORTANT**: Before running the evaluation, you must trim all generated videos to **exactly 5 seconds**. Videos of any other duration will cause runtime errors.
121+
⚠️ **IMPORTANT**: Before running the evaluation, you must trim all generated videos to **exactly 5 seconds**. Videos of any other duration are incompatible with the benchmark. If you're running V2V (=multiframe-to-video), please make sure you're not including the 3s conditioning video, only the model-generated 5 seconds.
122+
123+
**Example command to trip your videos using ffmpeg:**
116124
117-
**Trim your videos using ffmpeg:**
125+
This example is based on cropping to the first 5 seconds which is useful for I2V; for V2V please adapt this command if the generated videos include the 3s conditioning part.
118126
```bash
119127
# Create output directory for trimmed videos
120128
mkdir -p generated_videos_5s
121129
122-
# Trim all videos to 5 seconds at 8 FPS
123-
# Adjust the `-r 8` parameter to match your desired FPS (8, 16, 24, or 30)
124-
130+
# Trim all videos to 5 seconds at desired frame rate
131+
# Adjust the `-r 24` parameter to match your desired FPS (e.g. 8, 16, 24, or 30)
125132
for v in generated_video_path/*.mp4; do
126133
ffmpeg -y -i "$v" \
127134
-t 5 \
128-
-r 8 \
129-
-c:v libx264 \
130-
-pix_fmt yuv420p \
135+
-r 24 \
131136
"generated_videos_5s/$(basename "$v")"
132137
done
133138
```
134139

135-
**Verify video duration, FPS, and frame count using ffprobe:**
136-
```bash
137-
ffprobe -v error -select_streams v:0 \
138-
-show_entries stream=duration,avg_frame_rate,nb_frames \
139-
-of default=nw=1 \
140-
generated_videos_5s/0001_*.mp4
141-
```
142-
143140
---
144141

145142
## Step B: Evaluating Generated Videos on Physics-IQ to Generate Benchmark Scores

0 commit comments

Comments
 (0)