/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
pytorch
Опубликована
22 авг 2026

OvDSGG

Поиск объектовИзображение → bounding_boxes3 профессии
0скачиваний за 30 дней0лайковвеса обновлены22 авг 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

OvDSGG анализирует видео и строит динамические графы сцен с объектами и отношениями, в том числе для категорий, не виденных при обучении.

OvDSGG — модель генерации динамических графов сцен с открытым словарём, представленная jhelsby и принятая на воркшоп ECCV 2026 Contextus. Она объединяет пространственный экстрактор признаков OvSGTR с временным модулем маршрутизации OED, чтобы находить объекты и отношения между ними в последовательностях сцен.

Модель предназначена для анализа видео Action Genome: она формирует графы сцен, включающие объекты и предикаты, и поддерживает выявление категорий, не встречавшихся при обучении. Для открытого словаря обучение проводится на базовых категориях, составляющих около 70% классов объектов и предикатов; остальные категории используются для оценки. Репозиторий содержит пространственные и временные контрольные точки для открытого и закрытого наборов категорий, а также варианты абляций.

В README описаны обучение и оценка на Action Genome; реализация построена на PyTorch и зависит от OvSGTR, для работы репозитория требуется Python 3.9. В метаданных указан pipeline object-detection, поэтому каталогизация отражает обнаружение объектов; генерация связей графа сцен — специализированная возможность модели. Контрольные точки и конфигурации опубликованы на Hugging Face. Лицензия — Apache-2.0.

Сценарии применения

  • обнаружение объектов в кадрах видео Action Genome
  • построение графов отношений между объектами в видеопоследовательности
  • поиск ранее не встречавшихся категорий объектов
  • распознавание ранее не встречавшихся отношений между объектами
  • оценка динамических графов сцен на базовых и новых категориях

Ограничения

Обучение и оценка описаны для датасета Action Genome, а запуск репозитория требует Python 3.9 и зависимостей OvSGTR. README не приводит численных результатов качества модели.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

OvDSGG Readme

arXiv

Accepted at the ECCV 2026 Contextus Workshop. Read the paper on arXiv.

An open-vocabulary dynamic scene graph generation model (DSGG) that integrates the closed-set DSGG OED with the open-vocabulary scene graph generation model (SGG) OvSGTR. We use OvSGTR as the spatial feature extractor and feed its outputs into OED's temporal routing module.

The open-vocabulary setting was benchmarked against an open-vocabulary adaptation of OED and a version of OvSGTR adapted for DSGG.

Contents

Setup

You must use Python 3.9 for this repo to work, due to the dependencies of OvSGTR, which this repo is built upon.

conda create -n myenv python=3.9
conda activate myenv
./install.sh

Prepare Data

We use the dataset Action Genome to train and evaluate OvDSGG. Please process the downloaded dataset with the Toolkit and put the processed annotation files with COCO style into annotations folder. The directories of the dataset should look like:

|-- action_genome
    |-- annotations   # gt annotations
        |-- ag_train_coco_style.json
        |-- ag_test_coco_style.json
        |-- ...
    |-- frames        # sampled frames
    |-- videos        # original videos

Zero-Shot Recall (zR@K) for Action Genome is calculated using the file datasets/ov_zeroshot_triplet.pytorch, in this repo. This file was generated using the following script:

python tools/generate_ag_zeroshot.py --ann_file data/action_genome/annotations/ag_train_coco_style.json

Train

We train the spatial module first, then the temporal module on the best spatial checkpoint.

Closed-set training

To run closed-set training, run these commands in order:

1. Spatial Training

Prior to training, download the pretrained OvSGTR closed-set SGG Swin-T checkpoint from HuggingFace and save it to ./checkpoints/vg-swint-full.pth.

python scripts/train_spatial_sgdet_ovdsgg_closed_set.py

2. Temporal Training

python scripts/train_temporal_sgdet_ovdsgg_closed_set.py

Open-vocabulary training

To run open-vocabulary training, run these commands in order:

1. Spatial Training

Prior to training, download the pretrained OvSGTR OvD+R-SGG Swin-T checkpoint from HuggingFace and save it to ./checkpoints/vg-ovdr-swint.pth.

python scripts/train_spatial_sgdet_ovdsgg_ovdr.py

2. Temporal Training

python scripts/train_temporal_sgdet_ovdsgg_ovdr.py

Ablations

Our baseline derives object pair predictions and predicate classifications directly from isolated query representations, without interaction modules. To train the baseline, run these commands:

Closed-set Baseline

python scripts/train_ablation_baseline_sgdet_ovdsgg_closed_set.py

Open-vocabulary Baseline

python scripts/train_ablation_baseline_sgdet_ovdsgg_ovdr.py

Evaluate

Closed-set evaluation

To evaluate closed-set models, run these commands:

1. Spatial Evaluation

python scripts/eval_spatial_sgdet_ovdsgg_closed_set.py

2. Temporal Evaluation

python scripts/eval_temporal_sgdet_ovdsgg_closed_set.py

Open-vocabulary evaluation

To evaluate open-vocabulary models, run these commands:

1. Spatial Evaluation

python scripts/eval_spatial_sgdet_ovdsgg_ovdr.py

2. Temporal Evaluation

python scripts/eval_temporal_sgdet_ovdsgg_ovdr.py

Ablation evaluation

To evaluate the ablation baseline models, run these commands:

Closed-set Baseline

python scripts/eval_ablation_baseline_sgdet_ovdsgg_closed_set.py

Open-vocabulary Baseline

python scripts/eval_ablation_baseline_sgdet_ovdsgg_ovdr.py

Checkpoints

The trained OvDSGG checkpoints are available from Hugging Face and Google Drive:

  • Hugging Face: jhelsby/OvDSGG - includes checkpoints and matching config files
  • Google Drive: link

To download the Hugging Face checkpoints directly into the expected local paths, run:

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="jhelsby/OvDSGG",
    local_dir=".",
    allow_patterns=["exps/*/checkpoint.pth", "config/*.py"],
)

If downloading from Google Drive manually, place each checkpoint file at the corresponding default path:

  • Spatial Open-Vocabulary: exps/spatial_sgdet_ovdsgg_ovdr/checkpoint.pth
  • Temporal Open-Vocabulary: exps/temporal_sgdet_ovdsgg_ovdr/checkpoint.pth
  • Spatial Closed-Set: exps/spatial_sgdet_ovdsgg_closed_set/checkpoint.pth
  • Temporal Closed-Set: exps/temporal_sgdet_ovdsgg_closed_set/checkpoint.pth
  • Ablation Open-Vocabulary: exps/ablation_baseline_ovdr/checkpoint.pth
  • Ablation Closed-Set: exps/ablation_baseline_closed_set/checkpoint.pth

Open-Vocabulary Data Split

To test open-vocabulary capabilities of OvDSGG, we train on only 70% of the categories in Action Genome. The rest are only seen during evaluation. To do this, we split the categories into Base (seen during training) and Novel (unseen during training)

The open-vocabulary training split is hardcoded in datasets/ag.py, and has been chosen such that:

  • ~70% of objects are in Base (25 out of 36, 69.4%).
  • ~70% of predicates are in Base (18 out of 26, 69.2%).
  • Common and rare categories are balanced across Base and Novel sets.
  • None of the Novel categories were seen by the pretrained open-vocabulary OvSGTR/GroundingDINO checkpoint.

See PRs #12 and #13 for details. To generate the split yourself, run:

python tools/propose_ag_split.py

Key Losses and Metrics

Metric / LossTypeDescription
lossTotal LossWeighted sum of all scaled losses minimized by the optimizer.
loss_obj_ceObject LossCross Entropy loss for object classification.
loss_obj_bboxObject LossL1 error for object bounding box center and size.
loss_obj_giouObject LossGeneralized IoU loss for object bounding box overlap.
loss_sub_bboxSubject LossL1 error for subject bounding box center and size.
loss_sub_giouSubject LossGeneralized IoU loss for subject bounding box overlap.
loss_attn_ceRelation LossLoss for classifying the "attention" or main interaction.
loss_spatial_ceRelation LossLoss for classifying spatial relationships (e.g., "in front of").
loss_contacting_ceRelation LossLoss for classifying contacting relationships (e.g., "holding").
obj_class_error_unscaledKey MetricThe raw percentage of objects misclassified (Error Rate %).

References

Please note that most of the code in this repository was adapted from OED and OvSGTR. We thank the authors for their excellent work.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch · object-detection

Нельзя запустить

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
2ce877c

0 моделей