Ir para o conteúdo
ModelListadosExterno
Browse files

HORnet

This repository contains the checkpoints for HORNet, introduced in the paper HORNet: Task-Guided Frame Selection for Video Question Answering with Vision-Language Models.

TipoOtherVersãoRevision 2f6c866Cnota

Fonte do modelo

Tipo
Other
Tamanho do arquivo
223 MB
Versão
vRevision 2f6c866
Atualizado
24 de out. de 2026
Downloads
0
Fonte
Hugging Face

Descrição da fonte

HORnet: Task-Guided Frame Selection for Video Question Answering

This repository contains the checkpoints for HORNet, introduced in the paper HORNet: Task-Guided Frame Selection for Video Question Answering with Vision-Language Models.

GitHub

HORnet is a reinforcement learning-based frame selection system for efficient video understanding. It uses Group Relative Policy Optimization (GRPO) to train a policy network that intelligently selects the most informative frames from videos, achieving up to 99% frame reduction and 93% faster processing with competitive accuracy on video question answering tasks.

Model Description

HORnet learns to select a subset of frames from videos that maximize downstream task performance. The system consists of:

  • Frame Selector: A lightweight policy network (<1M parameters) trained with GRPO that outputs frame selection probabilities.
  • Video Encoder: TimeSformer encoder for extracting spatio-temporal visual features.
  • VLM Integration: Designed to be paired with Vision-Language Models like Qwen3-VL.

Key Features

  • Massive Efficiency Gains: Reduces frames by up to 99% (from 3000+ to 8 frames) with 74-93% faster VLM processing.
  • Competitive Accuracy: Maintains or slightly improves accuracy on short videos (MSVD: +1.7%), with optimized performance on temporal reasoning tasks.
  • GRPO Training: Group-based policy optimization for stable RL training, outperforming standard SFT and competitive with PPO.
  • Parameter Efficient: Only trains the frame selector while keeping the VLM frozen.

Available Checkpoints

CheckpointTraining SchemeUse CaseSize
checkpoints/long/checkpoint-0.1500.ptLong videos (256 frames)Main model for general evaluation224MB
checkpoints/long/checkpoint-0.250.ptLong videosMultiple-choice QA evaluation224MB
checkpoints/short/checkpoint-0.550.ptShort videos (32 frames)MSVD-QA, VLM ablation224MB

Quick Start

The following snippet shows how to initialize the HORnet policy with a VLM. Note that this requires the VisionGRPOPolicy class from the official repository.

import torch
from transformers import Qwen2VLForConditionalGeneration, AutoProcessor

# Load VLM (e.g., Qwen3-VL)
qwen_model = Qwen2VLForConditionalGeneration.from_pretrained(
    "Qwen/Qwen3-VL-2B-Instruct",
    torch_dtype=torch.bfloat16,
    device_map="auto"
)
qwen_processor = AutoProcessor.from_pretrained("Qwen/Qwen3-VL-2B-Instruct")

# Load HORnet frame selector
from model import VisionGRPOPolicy

model = VisionGRPOPolicy(
    encoder_name=None,  # Uses TimeSformer
    feat_dim=768,
    action_dim=1,
    qwen_model=qwen_model,
    qwen_processor=qwen_processor
).to("cuda")

# Load checkpoint
checkpoint = torch.load("checkpoints/long/checkpoint-0.1500.pt", map_location="cpu")
model.load_state_dict(checkpoint, strict=False)
model.eval()

Performance

Open-Ended QA Results

DatasetModelF1-Lev ↑Qwen Proc. (s) ↓Avg. Frames ↓
MSVDQwen3-VL-2B (Baseline)0.34830.2811.65
MSVDHORNet+Qwen3-VL-2B0.3543 (+1.7%)0.10 (↓64%)4.00 (↓66%)
MSRVTTQwen3-VL-2B (Baseline)0.32090.5847.52
MSRVTTHORNet+Qwen3-VL-2B0.3029 (-5.6%)0.09 (↓84%)4.00 (↓92%)

Multiple-Choice QA Results

DatasetModelAccuracy (%) ↑Qwen Proc. (s) ↓Avg. Frames ↓
VideoMMEQwen3-VL-2B (Baseline)68.302.533066.73
VideoMMEHORNet+Qwen3-VL-2B52.10 (-16.2%)0.18 (↓93%)8.00 (↓99%)
ActivityNetQAQwen3-VL-2B (Baseline)75.002.373152.49
ActivityNetQAHORNet+Qwen3-VL-2B68.80 (-6.2%)0.17 (↓93%)8.00 (↓99%)

Training Data

HORnet was trained on a combination of three video QA datasets, totaling 341,877 QA pairs across 17,350 videos:

  • MSVD-QA: Short videos (avg 9.6s)
  • MSRVTT-QA: Short videos (avg 15.5s)
  • NExT-QA: Long videos (avg 43.7s)

Citation

@article{bai2026hornet,
  title={HORNet: Task-Guided Frame Selection for Video Question Answering with Vision-Language Models},
  author={Xiangyu Bai*, Bishoy Galoaa*, and Sarah Ostadabbas},
  journal={arXiv preprint arXiv:2603.18850},
  year={2026}
}

Fontes

1 fonte
Hugging FacePrimárioVersão 2f6c866ff7c49e1a5ada71f9b0a133bb7a1845bc
huggingface.co/bishoygaloaa/HORnet/tree/2f6c866ff7c49e1a5ada71f9b0a133bb7a1845bc

Verificado 24 de out.

Download files

Artefatos de modelo

3 artefatos

checkpoints/long/checkpoint-0.1500.pt

pt · 223 MB · SHA-256 e74e3522e103…687a · Hugging Face

Download file

checkpoints/long/checkpoint-0.250.pt

pt · 223 MB · SHA-256 6bdc64db45e3…50c9 · Hugging Face

Download file

checkpoints/short/checkpoint-0.550.pt

pt · 223 MB · SHA-256 f07fb55b518a…39c0 · Hugging Face

Download file

Trechos de fonte

3 trechos

--- library_name: transformers license: mit pipeline_tag: video-text-to-text tags: - video-understanding - frame-selection - reinforcement-learning - vision-language-models - video-qa - qwen3-vl --- # HORnet: Task-Guided Frame Selection for Video Question Answering This repository contains the checkpoints for **HORNet**, introduced in the paper [HORNet: Task-Guided Frame Selection for Video Question Answering with Vision-Language Models](https://huggingface.co/papers/2603.18850). [![GitHub](https://img.shields.io/badge/GitHub-Repository-black)](https://github.com/ostadabbas/HORNet) **HORnet** is a reinforcement learning-based frame selection system for efficient video understanding. It uses Group Relative Policy Optimization (GRPO) to train a policy network that intelligently selects the most informative frames from videos, achieving **up to 99% frame reduction** and **93% faster processing** with competitive accuracy on video question answering tasks. ## Model Description HORnet learns to select a subset of frames from videos that maximize downstream task performance. The system consists of: - **Frame Selector**: A lightweight policy network (<1M parameters) trained with GRPO that outputs frame selection probabilities. - **Video Encoder**: TimeSformer encoder for extracting spatio-temporal visual features. - **VLM Integration**: Designed to be paired with Vision-Language Models like Qwen3-VL. ## Key Features - **Massive Efficiency Gains**: Reduces frames by up to 99% (from 3000+ to 8 frames) with 74-93% faster VLM processing. - **Competitive Accuracy**: Maintains or slightly improves accuracy on short videos (MSVD: +1.7%), with optimized performance on temporal reasoning tasks. - **GRPO Training**: Group-based policy optimization for stable RL training, outperforming standard SFT and competitive with PPO. - **Parameter Efficient**: Only trains the frame selector while keeping the VLM frozen. ## Available Checkpoints | Checkpoint | Training Scheme | Use Case | Size | |------------|----------------|----------|------| | `checkpoints/long/checkpoint-0.1500.pt` | Long videos (256 frames) | **Main model** for general evaluation | 224MB | | `checkpoints/long/checkpoint-0.250.pt` | Long videos | Multiple-choice QA evaluation | 224MB | | `checkpoints/short/checkpoint-0.550.pt` | Short videos (32 frames) | MSVD-QA, VLM ablation | 224MB | ## Quick Start...

Source context: 0 downloads · 1 likes · Pipeline video-text-to-text · Library transformers · Repo bishoygaloaa/HORnet

Source context: 0 downloads · 0 likes · Pipeline video-text-to-text · Library transformers · Repo bishoygaloaa/HORnet