Spaces:
Running
Running
| """Task: Future Frame Prediction (scene-level).""" | |
| from __future__ import annotations | |
| from typing import Any, Dict | |
| from src.tasks.base import TaskPlugin | |
| def validate_scene(_scene_dir: str) -> None: | |
| return None | |
| def evaluate_scene(_scene_dir: str, _gt_scene: Any) -> Dict[str, float]: | |
| return {"psnr": 0.0, "ssim": 0.0, "lpips": 0.0, "pmf": 0.0} | |
| def load_gt_scene(scene_id: str, gt_dir: str) -> Any: | |
| return {"scene_id": scene_id, "gt_dir": gt_dir} | |
| TASK = TaskPlugin( | |
| name="task_future_prediction", | |
| display_name="Future Frame Prediction", | |
| description="Predict future frames from historical video frames. Evaluated with PSNR / SSIM / LPIPS / PMF.", | |
| expected_scene_layout=( | |
| "```\n" | |
| "<scene_id>.zip\n" | |
| "βββ CineCamera_0/\n" | |
| "β βββ rgb/\n" | |
| "β βββ 0075.jpg\n" | |
| "β βββ ...\n" | |
| "βββ CineCamera_1/\n" | |
| "β βββ rgb/\n" | |
| "βββ ... (must match the GT camera set except for CineCamera_Moving)\n" | |
| "\n" | |
| "The system generates a uid for each submission (the submission_id), and the Worker extracts the archive to\n" | |
| " /data/tmp_inference_output/<uid>/<benchmark>/<scene_id>_trajectory/\n" | |
| "Each camera must provide at least the second-half GT frames with matching filenames.\n" | |
| "```" | |
| ), | |
| validate_scene_fn=validate_scene, | |
| evaluate_scene_fn=evaluate_scene, | |
| load_gt_scene_fn=load_gt_scene, | |
| primary_metric="psnr", | |
| higher_is_better=True, | |
| leaderboard_columns=["psnr", "ssim", "lpips", "pmf"], | |
| ) | |