Views
No views yet

| Module | Abbrev. | Role |
|---|---|---|
| Object-Trajectory Resampler | OTR | Aggregates all cross-frame tokens for one object into a global summary |
| Temporal-Windows Resampler | TWR | Compresses per-object tokens within each temporal window into a fixed set of latents |
<obj_traj_start> Object N: <|vision_start|>
[OTR: N latents]
<t1-t2> [TWR: N latents]
<t2-t3> [TWR: N latents]
...
<|vision_end|> <obj_traj_end>pip install transformers>=4.54.0 torch pycocotoolsqwen_vl_utils (e.g. .mp4)pycocotools format:1[
2 // frame 0
3 [{"size": [H, W], "counts": "..."}, {"size": [H, W], "counts": "..."}, ...],
4 // frame 1
5 [...]
6]example/2401075277_rle.json for a complete example.1python inference.py \
2 --model_path /path/to/vsg_release_model \
3 --video_path /path/to/video.mp4 \
4 --mask_path /path/to/masks.json \
5 --out_dir ./output| Argument | Default | Description |
|---|---|---|
--model_path | required | Path to this model directory |
--video_path | required | Input video file |
--mask_path | required | Per-object RLE mask JSON |
--out_dir | ./output | Directory to write output.txt |
--max_objects | 40 | Maximum number of objects to process per video |
1python inference.py \
2 --model_path . \
3 --video_path example/2401075277.mp4 \
4 --mask_path example/2401075277_rle.json \
5 --out_dir ./output1import torch
2from transformers import AutoProcessor, AutoTokenizer
3from modeling_traser import TRASER
4
5model_path = "/path/to/vsg_release_model"
6device = "cuda"
7
8model = TRASER.from_pretrained(model_path, torch_dtype=torch.bfloat16).to(device)
9processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-3B-Instruct")
10processor.tokenizer = AutoTokenizer.from_pretrained(model_path)inference.py: load masks → build object mask tensors → select_tokens → rearrange_token → model.generate.├── modeling_traser.py # TRASER model class
├── inference.py # End-to-end inference script
├── config.json # Model configuration
├── generation_config.json # Default generation hyperparameters
├── model-00001-of-00002.safetensors
├── model-00002-of-00002.safetensors
├── model.safetensors.index.json
├── tokenizer_config.json
├── vocab.json
├── merges.txt
├── added_tokens.json
├── special_tokens_map.json
├── chat_template.jinja
├── resampler_utils/
│ ├── token_selection.py # Mask-based visual token selection (coverage threshold)
│ └── token_arrangement.py # Token sequence rearrangement with OTR/TWR injection
├── qwen_vl_vsg_utils/ # Adapted Qwen-VL video processing utilities
├── static/
│ └── image.png # Architecture diagram
└── example/
├── 2401075277.mp4 # Example video
└── 2401075277_rle.json # Example RLE segmentation masks1@misc{gao2026syntheticvisualgenome2,
2 title={Synthetic Visual Genome 2: Extracting Large-scale Spatio-Temporal Scene Graphs from Videos},
3 author={Ziqi Gao and Jieyu Zhang and Wisdom Oluchi Ikezogwo and Jae Sung Park and Tario G. You and Daniel Ogbu and Chenhao Zheng and Weikai Huang and Yinuo Yang and Winson Han and Quan Kong and Rajat Saini and Ranjay Krishna},
4 year={2026},
5 eprint={2602.23543},
6 archivePrefix={arXiv},
7 primaryClass={cs.CV},
8 url={https://arxiv.org/abs/2602.23543},
9}