video stringclasses 2
values |
|---|
video_0122 |
video_0069 |
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
SalTempto — Saliency Eye-Tracking Dataset (Example Subset)
Note: This repository contains a small example subset of the full SalTempto
video_saliencydataset (3 of 224 videos) for testing and development purposes. The 3 preview videos were drawn by uniform random sampling from the training and validation splits of the full dataset (2 from train, 1 from validation); the test split is not represented. The full dataset is available atanonymous-neurips-submission/video_saliency.
A video eye-tracking dataset of naturalistic video stimuli with gaze recordings from multiple subjects, designed for training and evaluating visual saliency models.
Dataset Overview
This example subset
| Videos | 3 (1920×1080, ~30 fps) |
| Train / Val | 2 / 1 |
| Total gaze recordings | 22 (across all videos and subjects) |
| Subjects per video | Train: 3 · Val: 16 |
Full dataset
| Videos | 224 (1920×1080, ~30 fps) |
| Train / Val / Test | 204 / 10 / 10 |
| Subjects per video | Train: 1–3 (mean ≈ 2.5) · Val: 15–16 · Test: held out |
Gaze recordings for the test split are intentionally held out as a hidden benchmark — only the test video stimuli are public.
Repository Structure
video_saliency/
├── dataloader.py # PyTorch dataset and dataloader
├── data/
│ ├── train_videos.csv # List of training video IDs
│ ├── val_videos.csv # List of validation video IDs
│ ├── videos/ # MP4 stimulus videos
│ └── eyetracking/ # Per-video gaze recordings
│ └── video_XXXX/
│ └── video_XXXX_subject_Y.csv
Eyetracking Data Format
Each video_XXXX_subject_Y.csv file contains raw gaze samples at ~500 Hz with the following columns:
| Column | Description |
|---|---|
time |
Timestamp in milliseconds |
left_x, left_y |
Left eye gaze position in pixels (1920×1080) |
left_p |
Left eye pupil size |
right_x, right_y |
Right eye gaze position in pixels |
right_p |
Right eye pupil size |
seconds |
Tracker timestamp in seconds (= time / 1000) |
timestamp_start |
Seconds elapsed since video onset (first row of each CSV is 0.0) |
frames |
Corresponding video frame index (fractional) |
Missing gaze samples (e.g. blinks, lost tracking) are encoded as empty cells in the CSV (≈3.6% of left-eye and ≈4.7% of right-eye coordinates across the full dataset). Out-of-screen fixations are not separately marked but can be identified by coordinates outside the valid range (x ≤ 0 or x ≥ 1920, y ≤ 0 or y ≥ 1080). The dataloader filters both cases automatically.
Installation
pip install torch decord pandas numpy
Or with uv:
uv add torch decord pandas numpy
Usage
from dataloader import EyeTrackingDataset
# Instantiate — paths are auto-derived from data_dir
dataset = EyeTrackingDataset(
data_dir="data",
split="train", # "train", "val", or "test"
use_gpu=False,
)
# Load an entire video (returns all frames)
video, fixations = dataset[0]
# video: Tensor (num_frames, 3, H, W), float32 in [0, 1]
# fixations: Tensor (num_frames, max_fixations, 2), padded with -1
# max_fixations = max gaze samples in any frame (≈500 Hz / 30 fps × n_subjects)
# Load a frame range
video, fixations = dataset[(0, 10, 40)] # video 0, frames 10–40
# Negative indexing: last 50 frames
video, fixations = dataset[(0, -50, None)]
DataLoader with batching
from torch.utils.data import DataLoader
from dataloader import EyeTrackingDataset, EyeTrackingCollator
class ClipDataset(EyeTrackingDataset):
def __getitem__(self, idx):
return super().__getitem__((idx, 0, 30)) # 30-frame clips
dataset = ClipDataset(data_dir="data", split="train", use_gpu=False)
loader = DataLoader(dataset, batch_size=4, collate_fn=EyeTrackingCollator())
for videos, fixations, lengths in loader:
# videos: (B, max_frames, 3, H, W)
# fixations: (B, max_frames, max_fixations, 2)
# lengths: (B,) actual frame counts per clip
break
Parameters
| Parameter | Default | Description |
|---|---|---|
data_dir |
required | Path to the data/ directory |
split |
"train" |
One of "train", "val", "test" |
use_gpu |
True |
GPU-accelerated video decoding via Decord |
gpu_id |
0 |
GPU device index |
subject_mode |
"combined" |
"combined" for all subjects, or "subject_N" for a single subject |
cumulative_fixations |
False |
If True, return all fixations from frame 0 up to end_frame |
video_dir |
data_dir/videos |
Override video directory |
csv_base_dir |
data_dir/eyetracking |
Override eyetracking directory |
- Downloads last month
- 76