/ Модель

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

Лицензия
MIT
Библиотека
pytorch
Опубликована
30 июл 2026

densfilm-crowdfix

Классификация видеоВидео → label3 профессии

DensFiLM анализирует видеоклипы с толпами и предсказывает области зрительного внимания с учётом плотности толпы.

7скачиваний за 30 дней0лайковвеса обновлены30 июл 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

DensFiLM — модель видео-салиентности для сцен с толпами, разработанная Анисом Ур Рахманом из CSC – IT Center for Science Ltd. Она основана на Video Swin Transformer Swin3D-S и использует FiLM-слой, который учитывает категорию плотности толпы для перенастройки пространственно-временных признаков. Модель принимает клипы из 8 последовательных кадров размером 224×384 и выделяет области, на которые люди с большей вероятностью будут смотреть.

Модель предназначена для анализа зрительного внимания в разреженных, плотных и перегруженных толпах; сигнал плотности может вычисляться самой моделью, поэтому отдельная разметка плотности при применении не требуется. В тесте CrowdFix авторы сообщают улучшение NSS и CC по сравнению с опубликованным результатом ACL-Net. Веса обучены на 3 189 клипах CrowdFix с основой, предварительно обученной на Kinetics-400; дополнительные FiLM-слои, эмбеддинг плотности и декодер добавляют около 100 тысяч параметров.

Проверка проводилась только на CrowdFix. Перенос на другие наборы данных и обычные видеосцены не проверен; при оценке с удалением общего центрального смещения качество снижается, что указывает на сохранение компонента центрального приора. Репозиторий распространяется по лицензии MIT.

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

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

Ограничения

Модель обучена и оценивалась только на CrowdFix; перенос на другие наборы данных и видеосцены без толп не проверен. Для входа требуется клип из 8 кадров размером 224×384, а результаты сохраняют компонент центрального приора.

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

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

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

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

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

Открыть на Hugging Face

DensFiLM — Density-Conditioned Video Saliency for Crowd Scenes

DensFiLM is a Video Swin Transformer (Swin3D-S) augmented with a FiLM layer at the encoder bottleneck. A 64-dimensional learnable crowd-density embedding is projected to per-channel scale–shift parameters (γ, β) ∈ ℝ⁷⁶⁸ that recalibrate the most semantically abstract spatiotemporal feature map before decoding — at a cost of only ~100K additional parameters (<0.2% of backbone weights).

The motivation: as crowd density rises, human fixation strategy shifts categorically — from tracking individual pedestrians, to reading collective motion structure (flow lanes, merge boundaries), to localising scene-level landmarks against density gradients. Existing video saliency models treat all densities uniformly.

Results on CrowdFix

5,356-clip CrowdFix test set. DensFiLM rows are mean ± std over 4 seeds; baselines are as published in the 2019 CrowdFix benchmark paper.

ModelAUC-J ↑AUC-B ↑NSS ↑CC ↑KL ↓SIM ↑
SAM0.777–0.8940.325––
DeepVS0.788–0.9850.401––
ACL-Net (2019)0.817–1.2500.450––
Swin3D-S, unconditioned0.8060.8101.3130.4761.1330.424
DensFiLM (oracle label)0.820 ±0.0010.825 ±0.0011.434 ±0.0070.517 ±0.0021.068 ±0.0040.449 ±0.003
DensFiLM (predicted label)0.8210.8251.4380.5181.0670.451

This surpasses ACL-Net — the sole published CrowdFix benchmark since 2019 — by +14.7% NSS and +14.9% CC.

Notably, replacing the ground-truth density label with the model's own density head prediction gives identical performance (ΔNSS ≤ 0.001), so the conditioning signal is self-derived at inference and no density annotation is needed.

Usage

import torch
from models.densfilm_hub import DensFiLM

model = DensFiLM.from_pretrained("aniskhan25/densfilm-crowdfix").eval()

# (B, 3, T, H, W) — 8 frames at 224x384, ImageNet-normalised
clip = torch.randn(1, 3, 8, 224, 384)

with torch.no_grad():
    saliency, density_logits = model(clip)      # density self-derived

# saliency: (1, 1, 224, 384) in [0, 1]
# density_logits: (1, 3) over SP / DF / DC
print(saliency.shape, density_logits.argmax(-1))

To condition on a known density category instead:

density = torch.tensor([2])                     # 0=SP, 1=DF, 2=DC
saliency, _ = model(clip, density)

Preprocessing

Frames must be resized to 224×384 and ImageNet-normalised (mean [0.485, 0.456, 0.406], std [0.229, 0.224, 0.225]), stacked into clips of 8 consecutive frames as (B, 3, T, H, W).

import torch
import torchvision.transforms.functional as TF

MEAN = torch.tensor([0.485, 0.456, 0.406]).view(3, 1, 1)
STD  = torch.tensor([0.229, 0.224, 0.225]).view(3, 1, 1)

def preprocess(frames):                          # list of 8 PIL images
    t = torch.stack([TF.to_tensor(TF.resize(f, [224, 384], antialias=True))
                     for f in frames])           # (T, 3, H, W)
    t = (t - MEAN) / STD
    return t.permute(1, 0, 2, 3).unsqueeze(0)    # (1, 3, T, H, W)

Density categories

LabelCodeMeaning
0SPSparse — individual pedestrian trajectories dominate fixation
1DFDense Flow — collective motion structure, flow lanes, merge boundaries
2DCDense Congested — scene-level semantic landmarks against density gradients

Training

Trained on CrowdFix (3,189 training clips) from a Kinetics-400-pretrained Swin3D-S backbone; FiLM layers, density embedding and decoder initialise fresh.

SettingValue
Epochs150, early stopping patience 20
OptimiserAdamW, weight decay 1e-4, cosine annealing
LR1e-4 (backbone 0.1×), 20 frozen-backbone warmup epochs
Batch size2 per GPU × 8 GCDs
Clip8 frames at 224×384
Hardware8× AMD MI250X GCDs on LUMI

Reported figures are mean ± std over 4 seeds. This checkpoint is a single seed, so its individual metrics will sit within the quoted std rather than exactly on the mean.

Limitations

  • Trained and evaluated only on CrowdFix; generalisation to non-crowd video saliency is untested. Domain shift to other crowd datasets is unmeasured.
  • 3,189 training clips place the model firmly in the regularisation-dominated regime. The paper's ablations show that adding capacity (3D temporal decoder, learned social-force prior) collapses NSS to roughly the unconditioned baseline (~1.313).
  • Explicit optical flow is redundant: a RAFT dual-stream variant lands within seed variance (NSS 1.437 vs 1.434 ± 0.007), as Swin3D-S's shifted-window attention already captures the motion signal.
  • Debiased evaluation (subtracting mean training fixation density to remove shared centre-prior alignment) drops DensFiLM to AUC-J 0.765 / NSS 1.188. The unconditioned backbone loses 45% of its NSS while DensFiLM loses only 17% — density conditioning substitutes genuine structure for centre prior, but a centre-prior component remains.
  • Fixed input geometry: 8 frames at 224×384. Other resolutions are untested.

Citation

@article{rahman2026densfilm,
  title   = {Density-Conditioned Video Saliency for Crowd Scenes via
             Feature-wise Linear Modulation},
  author  = {Rahman, Anis Ur},
  journal = {arXiv preprint arXiv:2607.25465},
  year    = {2026}
}

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

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

GPU в ailist

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

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

Архитектура ? неизвестна transformers в образе рантайма.

Ревизия весов
c257441

0 моделей