MCG-NJU/TimeLens2

TimeLens2: Generalist Video Temporal Grounding with Multimodal LLMs

131

stars

24

commits

Python

primary language

Jul 27, 2026

updated

README

TimeLens2 — Generalist video temporal grounding with multimodal LLMs

TimeLens2 Homepage TimeLens2 Paper on arXiv TimeLens2 Models & Data

Overview · Models and data · Codebase · Reproduction

Find the moments that matter.
TimeLens2 turns natural-language queries into precise, traceable evidence intervals on the video timeline.

TimeLens2 as a generalist video temporal-grounding model across seven benchmarks
One model family across seven temporal-grounding settings, from short indoor actions to long-form and egocentric video.


Overview

TimeLens2 is a generalist video temporal-grounding MLLM. Given a video and a natural-language description or question, it finds when the supporting visual evidence occurs and returns one or more temporal intervals. A single model handles short and long videos, single and repeated events, descriptive and question-form queries, and both third-person and egocentric footage through a unified generative interface.

ScopeTrainingOutput
Short and long videos · third-person and egocentric footageVerified SFT data · temporal-grounding GRPOOne or more precise temporal intervals

TimeLens2 treats temporal evidence as a set of intervals throughout training. Its supervised stage uses verified single- and multi-span annotations from TimeLens2-93K. Its GRPO stage combines temporal IoU with a matching-free temporal Wasserstein reward. The SFT, GRPO, and evaluation code are released in this repository.

Models and data

TimeLens2 uses two training stages. SFT learns evidence search and variable-cardinality interval generation; GRPO then calibrates the predicted intervals with temporal rewards.

ResourceTraining stageDescription
TimeLens2-2BSFT + GRPO2B checkpoint · 44.5 average mIoU
TimeLens2-4BSFT + GRPO4B checkpoint · 47.7 average mIoU
TimeLens2-8BSFT + GRPO8B checkpoint · 48.0 average mIoU
TimeLens2-2B-SFTSFT2B checkpoint for rollout generation and GRPO reproduction
TimeLens2-4B-SFTSFT4B checkpoint for rollout generation and GRPO reproduction
TimeLens2-8B-SFTSFT8B checkpoint for rollout generation and GRPO reproduction
TimeLens2-93KDataset23,793 videos · 93,232 temporal-grounding instances

The repository includes ready-to-use annotations and rollout data for the SFT and GRPO recipes. To reproduce the second stage, download the matching -SFT checkpoint and set it as MODEL_PATH for rollout generation or GRPO training. Video files are distributed separately through the linked Hugging Face dataset and must be downloaded before training. To use another framework for SFT or RL, download the public data and convert it to that framework's required format.

Codebase

The official training and evaluation code is organized around the three stages used in the project:

StagePurposeGuideMain entry points
sft/XTuner-based supervised fine-tuningSFT guidetrain_sft_4b.sh · train_sft_8b.sh
grpo/Off-policy rollout and GRPOGRPO guiderollout_timelens2.sh · train_grpo_4b.sh · train_grpo_8b.sh
evaluation/VLMEvalKit with the TimeLens2 grounding entryEvaluation guiderun_grounding.sh

Reproduction

  1. Prepare the videos. Download TimeLens2-93K, TimeLens-100K, and Ego4D-NLQ. The SFT and GRPO annotations are already included in this repository.
  2. Run supervised fine-tuning. Launch train_sft_4b.sh or train_sft_8b.sh.
  3. Prepare rollouts. Use the bundled results, or regenerate them with rollout_timelens2.sh. Its single configuration includes both timelens2-93k and timelens-100k.
  4. Run GRPO. Launch train_grpo_4b.sh or train_grpo_8b.sh. Both default to the bundled official rollout files for both sources.
  5. Evaluate. Run run_grounding.sh.

Each module has a focused README with installation, data layout, environment variables, and launch examples. Paths are configurable and may contain environment variables.

License and acknowledgements

The project is released under the Apache License 2.0. The SFT, evaluation, and GRPO modules contain code derived from InternLM/xtuner, open-compass/VLMEvalKit, and TencentARC/TimeLens, respectively. We thank their authors for open-sourcing these projects.

Citation

@misc{zhu2026timelens2,
      title={TimeLens2: Generalist Video Temporal Grounding with Multimodal LLMs},
      author={Yuhan Zhu and Changlian Ma and Xiangyu Zeng and Xinhao Li and Zhiqiu Zhang and Songze Li and Jun Zhang and Tianxiang Jiang and Yuandong Yang and Ziang Yan and Zikang Wang and Xinyu Chen and Haoran Chen and Shaowei Zhang and Limin Wang},
      year={2026},
      eprint={2607.17423},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2607.17423},
}

Contributors

zyuhan1999

24 commits

MCG-NJU/TimeLens2

TimeLens2: Generalist Video Temporal Grounding with Multimodal LLMs

131

stars

24

commits

Python

primary language

Jul 27, 2026

updated

README

TimeLens2 — Generalist video temporal grounding with multimodal LLMs

TimeLens2 Homepage TimeLens2 Paper on arXiv TimeLens2 Models & Data

Overview · Models and data · Codebase · Reproduction

Find the moments that matter.
TimeLens2 turns natural-language queries into precise, traceable evidence intervals on the video timeline.

TimeLens2 as a generalist video temporal-grounding model across seven benchmarks
One model family across seven temporal-grounding settings, from short indoor actions to long-form and egocentric video.


Overview

TimeLens2 is a generalist video temporal-grounding MLLM. Given a video and a natural-language description or question, it finds when the supporting visual evidence occurs and returns one or more temporal intervals. A single model handles short and long videos, single and repeated events, descriptive and question-form queries, and both third-person and egocentric footage through a unified generative interface.

ScopeTrainingOutput
Short and long videos · third-person and egocentric footageVerified SFT data · temporal-grounding GRPOOne or more precise temporal intervals

TimeLens2 treats temporal evidence as a set of intervals throughout training. Its supervised stage uses verified single- and multi-span annotations from TimeLens2-93K. Its GRPO stage combines temporal IoU with a matching-free temporal Wasserstein reward. The SFT, GRPO, and evaluation code are released in this repository.

Models and data

TimeLens2 uses two training stages. SFT learns evidence search and variable-cardinality interval generation; GRPO then calibrates the predicted intervals with temporal rewards.

ResourceTraining stageDescription
TimeLens2-2BSFT + GRPO2B checkpoint · 44.5 average mIoU
TimeLens2-4BSFT + GRPO4B checkpoint · 47.7 average mIoU
TimeLens2-8BSFT + GRPO8B checkpoint · 48.0 average mIoU
TimeLens2-2B-SFTSFT2B checkpoint for rollout generation and GRPO reproduction
TimeLens2-4B-SFTSFT4B checkpoint for rollout generation and GRPO reproduction
TimeLens2-8B-SFTSFT8B checkpoint for rollout generation and GRPO reproduction
TimeLens2-93KDataset23,793 videos · 93,232 temporal-grounding instances

The repository includes ready-to-use annotations and rollout data for the SFT and GRPO recipes. To reproduce the second stage, download the matching -SFT checkpoint and set it as MODEL_PATH for rollout generation or GRPO training. Video files are distributed separately through the linked Hugging Face dataset and must be downloaded before training. To use another framework for SFT or RL, download the public data and convert it to that framework's required format.

Codebase

The official training and evaluation code is organized around the three stages used in the project:

StagePurposeGuideMain entry points
sft/XTuner-based supervised fine-tuningSFT guidetrain_sft_4b.sh · train_sft_8b.sh
grpo/Off-policy rollout and GRPOGRPO guiderollout_timelens2.sh · train_grpo_4b.sh · train_grpo_8b.sh
evaluation/VLMEvalKit with the TimeLens2 grounding entryEvaluation guiderun_grounding.sh

Reproduction

  1. Prepare the videos. Download TimeLens2-93K, TimeLens-100K, and Ego4D-NLQ. The SFT and GRPO annotations are already included in this repository.
  2. Run supervised fine-tuning. Launch train_sft_4b.sh or train_sft_8b.sh.
  3. Prepare rollouts. Use the bundled results, or regenerate them with rollout_timelens2.sh. Its single configuration includes both timelens2-93k and timelens-100k.
  4. Run GRPO. Launch train_grpo_4b.sh or train_grpo_8b.sh. Both default to the bundled official rollout files for both sources.
  5. Evaluate. Run run_grounding.sh.

Each module has a focused README with installation, data layout, environment variables, and launch examples. Paths are configurable and may contain environment variables.

License and acknowledgements

The project is released under the Apache License 2.0. The SFT, evaluation, and GRPO modules contain code derived from InternLM/xtuner, open-compass/VLMEvalKit, and TencentARC/TimeLens, respectively. We thank their authors for open-sourcing these projects.

Citation

@misc{zhu2026timelens2,
      title={TimeLens2: Generalist Video Temporal Grounding with Multimodal LLMs},
      author={Yuhan Zhu and Changlian Ma and Xiangyu Zeng and Xinhao Li and Zhiqiu Zhang and Songze Li and Jun Zhang and Tianxiang Jiang and Yuandong Yang and Ziang Yan and Zikang Wang and Xinyu Chen and Haoran Chen and Shaowei Zhang and Limin Wang},
      year={2026},
      eprint={2607.17423},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2607.17423},
}

Contributors

zyuhan1999

24 commits

Languages

Python

99.6%