Skip to content

Repository files navigation

ScanFocus

Official implementation of ScanFocus: A Coarse-to-Fine Framework for Spatio-Temporal Video Grounding (ECCV 2026).

ScanFocus is a coarse-to-fine STVG framework that decouples long-video grounding into a global spatio-temporal scan and a local boundary focus. The coarse stage efficiently scans sparse frames to produce a rough spatio-temporal tube, while the refinement stage densely samples around coarse temporal boundaries and uses semantic-guided temporal aggregation to recover fine-grained boundary cues.

[Paper] [Code]

Architecture

ScanFocus architecture

The framework contains two stages:

  • Global ST Scan: a unified vision-language encoder and semantic-motion fusion encoder align appearance, language, and motion features on sparsely sampled frames.
  • Local Boundary Focus: dense boundary sampling around the coarse start/end predictions feeds a semantic-guided temporal aggregator and refine decoders for precise timestamp localization.

News

  • ScanFocus has been accepted by ECCV 2026.
  • This repository is being prepared for public release.

Results

Main SOTA comparisons reported in the paper.

HC-STVGv1

Method m_tIoU m_vIoU [email protected] [email protected]
STVGBert - 20.4 29.4 11.3
TubeDETR 43.7 32.4 49.8 23.5
STCAT 49.4 35.1 57.7 30.1
SGFDN 46.9 35.8 56.3 37.1
STVGFormer - 36.9 62.2 34.8
VG-DINO - 38.3 62.5 36.1
CG-STVG 52.8 38.4 61.5 36.3
TA-STVG 53.0 39.1 63.1 36.8
ScanFocus (Ours) 55.5 41.8 67.5 42.2

HC-STVGv2

Method m_tIoU m_vIoU [email protected] [email protected]
PCC - 30.0 - -
2D-Tan - 30.4 50.4 18.8
MMN - 30.3 49.0 25.6
TubeDETR 53.9 36.4 58.8 30.6
STVGFormer 58.1 38.7 65.5 33.8
VG-DINO - 39.9 67.1 34.5
CG-STVG 60.0 39.5 64.5 36.3
TA-STVG 60.4 40.2 65.8 36.7
ScanFocus (Ours) 62.4 41.7 68.4 39.3

VidSTG

Method Dec. m_tIoU Dec. m_vIoU Dec. [email protected] Dec. [email protected] Int. m_tIoU Int. m_vIoU Int. [email protected] Int. [email protected]
STGRN 48.5 19.8 25.8 14.6 47.0 18.3 21.1 12.8
OMRN 50.7 23.1 32.6 16.4 49.2 20.6 28.4 14.1
STGVT - 21.6 29.8 18.9 - - - -
STVGBert - 24.0 30.9 18.4 - 22.5 26.0 16.0
TubeDETR 48.1 30.4 42.5 28.2 46.9 25.7 35.7 23.2
SGFDN 45.1 28.3 41.7 29.1 44.8 25.8 36.9 23.9
STVGFormer - 33.7 47.2 32.8 - 28.5 39.9 26.2
STCAT 50.8 33.1 46.2 32.6 49.7 28.2 39.2 26.6
CG-STVG 51.4 34.0 47.7 33.1 49.9 29.0 40.5 27.5
TA-STVG 51.7 34.4 48.2 33.5 50.2 29.5 41.5 28.0
SpaceVLLM-7B 47.7 27.4 39.1 26.2 48.5 25.4 35.9 22.2
ASTG 45.6 29.2 40.3 27.8 - - - -
ScanFocus (Ours) 53.3 36.5 50.6 36.0 51.4 30.7 42.5 29.4

Installation

The code has been tested with PyTorch 2.0.1 and CUDA 11.7.

conda create -n scanfocus python=3.8 -y
conda activate scanfocus
pip install -r requirements.txt

This project uses mmcv.ops.MultiScaleDeformableAttention; please install an MMCV version compatible with your PyTorch/CUDA setup if it is not already available in your environment.

Data Preparation

Prepare datasets under data/:

data/
  hc-stvg/
    all_images/
    annos/
    data_cache/
  hc-stvg2/
    all_images/
    annos/
    data_cache/
  vidstg/
    videos/ or all_images/
    vstg_annos/
    sent_annos/
    data_cache/

For HC-STVG training in this release, frames are expected at:

data/hc-stvg/all_images

If your data is stored elsewhere, update DATA_DIR and DATASET.FRAME_DIR in the corresponding file under experiments/.

Pretrained Weights

Prepare the following pretrained weights:

pretrain_weights/GRES/beit3_base_patch16_224.zip
model_zoo/vit_b_k710_dl_from_giant.pth

For BEiT-3 weights, please follow the official BEiT-3 repository. For VideoMAE-style video backbones, please refer to the official VideoMAE and VideoMAEv2 repositories. If you place checkpoints at different paths, update the corresponding entries in experiments/*.yaml.

Training

HC-STVG coarse stage

The coarse-stage configuration is:

experiments/hcstvg_coarse.yaml

Run:

bash scripts/train_hcstvg_coarse.sh

By default, the coarse checkpoint is saved under:

work-dir/hc-stvg/experiments/coarse_sota/

HC-STVG refine stage

The refine-stage configuration is:

experiments/hcstvg-refine.yaml

Edit COARSE_CKPT in scripts/train_hcstvg_refine.sh to point to the trained coarse checkpoint, then run:

bash scripts/train_hcstvg_refine.sh

By default, the refine checkpoint is saved under:

work-dir/hc-stvg/experiments/refine_sota/

Evaluation

Set MODEL.WEIGHT to a trained ScanFocus checkpoint and run:

bash scripts/test.sh MODEL.WEIGHT path/to/model.pth

You can also call the evaluation entry directly:

python -m torch.distributed.launch \
  --nproc_per_node=4 \
  scripts/test_net_refine.py \
  --config-file experiments/hcstvg-refine.yaml \
  MODEL.WEIGHT path/to/model.pth

Citation

If this project is useful for your research, please consider citing ScanFocus:

@inproceedings{chen2026scanfocus,
  title={ScanFocus: A Coarse-to-Fine Framework for Spatio-Temporal Video Grounding},
  author={Chen, Kai and Dai, Ming and Cheng, Wenxuan and Yang, Wankou},
  booktitle={European Conference on Computer Vision},
  year={2026}
}

Acknowledgement

This codebase builds on common components from prior STVG and vision-language grounding projects. We thank the authors of HC-STVG, VidSTG, CG-STVG, BEiT-3, VideoMAE, and related open-source projects.

About

official implementation of ScanFocus [ECCV2026]

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages