/ Модель

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

Параметры
403 млн
Лицензия
CC BY-NC-SA 4.0
Архитектура
videomae · dense
Базовая модель
videomae-large-finetuned-kinetics
Библиотека
transformers
Опубликована
19 ноя 2026

khoroos_action_videomae_large

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

VideoMAE Large для классификации поведения кур по коротким видеоклипам в системе анализа фермерских видео Khoroos.

31скачиваний за 30 дней0лайковвеса обновлены26 ноя 2026

Бенчмарки

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

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

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

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

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

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

Khoroos Action VideoMAE Large — модель VideoMAE Large, разработанная для набора инструментов Khoroos и дообученная на классификацию поведения отдельных кур на коротких видеоклипах. В основе лежит MCG-NJU/videomae-large-finetuned-kinetics; модель содержит 402,7 млн параметров и обучена на датасете ChickenAct из 15 250 клипов с 15 классами поведения, собранных на пяти фермах.

На вход подаются 16 RGB-кадров размером 224×224, равномерно выбранных по клипу; выход — вероятности 15 классов, включая кормление, питьё, отдых, ходьбу и взмахи крыльями. Модель предназначена для анализа поведения птиц в видео фермерских хозяйств и интеграции в Khoroos. Для репозитория указаны форматы Safetensors и ONNX; доступны варианты весов и вычислений FP32, BF16, FP16, INT8 и 4-бит. Лицензия CC BY-NC-SA 4.0 допускает использование на её условиях, включая ограничения на коммерческое применение.

На тестовом наборе из клипов всех пяти ферм заявлены accuracy 0,940 и macro-F1 0,920. На новых фермах качество может снижаться: в испытаниях с исключением одной фермы средний macro-F1 был примерно на 16 процентных пунктов ниже. Результаты получены с одним seed, а в данных могли остаться почти дублирующиеся клипы. Предсказания описывают поведение и сами по себе не являются оценкой благополучия животных.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

khoroos_action_videomae_large

VideoMAE Large fine-tuned to classify the behavior of an individual chicken in a short video clip. It is one of the action models trained for Khoroos, a toolkit for analyzing chicken behavior in farm video.

  • Base model: MCG-NJU/videomae-large-finetuned-kinetics (revision 0f6adcd), VideoMAE pretrained with masked autoencoding and fine-tuned on Kinetics-400.
  • Fine-tuning data: the ChickenAct dataset, 15,250 single-bird clips covering 15 behaviors on 5 farms.
  • Input: 16 RGB frames at 224×224 pixels.
  • Output: probabilities for the 15 behaviors below.

Results

Unseen farms (leave one farm out)

Each row is a separate model trained with one farm held out entirely and tested on that farm. This is the best estimate of performance on a farm the model has never seen. These checkpoints are not this export; this export is trained on all five farms. Farm IDs are those of the ChickenVerse paper (the released clip file names use different prefixes). F01 and F05 are research pens, F02 a commercial-scale research house, F03 a commercial broiler breeder farm and F04 a commercial broiler house. Macro-F1 averages the behaviors present on the held-out farm (F02 has no feeding clips). Pooled scores all held-out clips together.

Held-out farmMacro-F1AccuracyBalanced accuracy
F010.7940.8490.808
F020.8100.8590.813
F030.6750.7890.741
F040.7260.7760.779
F050.7740.8330.819
Mean ± SD0.756 ± 0.0550.821
Pooled0.8040.821

All-farm test set

This model was trained on about 80% of the clips from all five farms, selected on a 10% validation split (best validation macro-F1 0.926 at epoch 15), and tested on the remaining 10% (1529 clips).

AccuracyMacro-F1Balanced accuracyWeighted F1
0.9400.9200.9180.940
BehaviorPrecisionRecallF1Test clips
body_shaking0.9170.9430.93035
drinking0.9420.9560.949137
dust_bathing0.9460.9810.96454
feeding0.9700.9950.982193
head_scratching0.9360.8800.90750
litter_pecking0.8690.8490.85986
litter_scratching0.9810.8980.93859
pooping0.8850.8520.86827
preening0.9790.9580.968192
resting0.9590.9710.965242
running0.8440.8570.85063
standing0.8670.8180.84288
stretching0.9920.9920.992120
walking0.9170.9470.932151
wing_flapping0.8480.8750.86232

These scores may be slightly optimistic: the dataset contains some near-duplicate clips that were not removed before splitting. Use the unseen-farm scores to judge deployment on a new farm.

Available formats

Every format was evaluated on the same 1,529-clip all-farm test set. Agreement is the share of clips whose predicted behavior matches the FP32 PyTorch model. Times are model-only on an NVIDIA GB10 (DGX Spark; GPU, and its 20-core Arm CPU), excluding video decoding and preprocessing.

FileFormatSize (MB)Macro-F1AccuracyAgreementGPU ms/clip (batch 1)CPU ms/clip (batch 1)
model.safetensorsFP32 weights, FP32 compute (TF32 disabled)1,2160.9200.940100.0%134–
model.safetensorsFP32 weights, BF16 autocast (Khoroos default)1,2160.9200.940100.0%39–
model.fp16.safetensorsFP16 weights and compute6080.9200.940100.0%27–
onnx/model.onnxONNX FP321,2250.9200.940100.0%2562,087
onnx/model_fp16.onnxONNX FP16 weights and compute, FP32 inputs/outputs6140.9200.940100.0%733,004
onnx/model_int8.onnxONNX dynamic INT8 quantization (per-channel weights, MatMul)3120.9210.94099.6%6751,277
onnx/model_q4.onnxONNX 4-bit weight-only quantization (MatMulNBits, block 32, symmetric)2060.9190.93999.5%2351,455

Download only the files you need, for example:

hf download amirivojdan/khoroos_action_videomae_large config.json video_preprocessor_config.json onnx/model_int8.onnx

PyTorch FP16 on a GPU:

model = AutoModelForVideoClassification.from_pretrained(
    repo_id, variant="fp16", dtype=torch.float16
).to("cuda").eval()
inputs = processor([sample(video)], return_tensors="pt").to("cuda", torch.float16)

ONNX Runtime; the graph takes preprocessed pixel_values shaped (batch, 16, 3, 224, 224):

import onnxruntime as ort
from huggingface_hub import hf_hub_download

session = ort.InferenceSession(hf_hub_download(repo_id, "onnx/model_int8.onnx"))
pixel_values = processor([sample(video)], return_tensors="pt")["pixel_values"].numpy()
logits = session.run(None, {"pixel_values": pixel_values})[0]

Which file to use: on a GPU, model.fp16.safetensors with PyTorch is the fastest and matches FP32 accuracy; with ONNX Runtime, use onnx/model_fp16.onnx. On a CPU, use onnx/model_int8.onnx, or onnx/model_q4.onnx for the smallest download. The INT8 and 4-bit files are slow on GPUs, and the FP16 ONNX file is slow on CPUs.

Classes in output order

  1. body_shaking
  2. drinking
  3. dust_bathing
  4. feeding
  5. head_scratching
  6. litter_pecking
  7. litter_scratching
  8. pooping
  9. preening
  10. resting
  11. running
  12. standing
  13. stretching
  14. walking
  15. wing_flapping

Preprocessing

Inference must match training:

  1. Sample 16 frame indices uniformly across the clip, rounding numpy.linspace(0, n - 1, 16). If the clip has fewer than 16 frames, use every frame and repeat the last one.
  2. Resize the shorter side to 256 pixels, center-crop 224×224, scale to [0, 1] and normalize with ImageNet mean and standard deviation. The saved video processor does this step.

Usage

import numpy as np
import torch
from transformers import AutoModelForVideoClassification, AutoVideoProcessor

repo_id = "amirivojdan/khoroos_action_videomae_large"
processor = AutoVideoProcessor.from_pretrained(repo_id)
model = AutoModelForVideoClassification.from_pretrained(repo_id).eval()

def sample(video, num_frames=model.config.frames_per_clip):
    # video: uint8 tensor of shape (T, C, H, W)
    t = video.shape[0]
    if t >= num_frames:
        idx = np.round(np.linspace(0, t - 1, num_frames)).astype(int)
    else:
        idx = np.concatenate([np.arange(t), np.full(num_frames - t, t - 1)])
    return video[torch.as_tensor(idx)]

inputs = processor([sample(video)], return_tensors="pt")
with torch.inference_mode():
    probs = model(**inputs).logits.softmax(-1)[0]
print(model.config.id2label[int(probs.argmax())])

In Khoroos, select this model with --action-model videomae-large or KHOROOS_ACTION_MODEL=videomae-large; --action-format chooses the weight format. Khoroos downloads only that format and handles frame sampling and preprocessing.

Training

Full fine-tuning in BF16 on one NVIDIA GB10: AdamW, backbone learning rate 3e-05 (classifier ×10), weight decay 0.05, effective batch size 32, 15 epochs with 3 warmup epochs and cosine decay, gradient clipping at 1, seed 42. Augmentation: temporal jitter around the inference frame positions, random scale (about ±12.5%), random crop, horizontal flip and color jitter, applied identically across frames. No class weighting. The checkpoint with the best validation macro-F1 was kept. Data: 12,192 training, 1,529 validation and 1,529 test clips, stratified by farm and behavior. Activation checkpointing at 2 clips per step (16 accumulation steps); peak GPU memory 5.7 GiB. This fit took 9.6 h; the six fits of this size (all farms and five leave-one-farm-out) averaged 8.8 h.

Limitations

  • Trained on single-bird clips from five farms. Accuracy drops on farms not seen in training, by about 16 macro-F1 points on average in the leave-one-farm-out results.
  • Results come from one training seed.
  • Predictions describe behavior only. They are not welfare assessments.

License

Released under CC BY-NC-SA 4.0. The base VideoMAE checkpoint is CC BY-NC 4.0 and the ChickenVerse training data is CC BY-NC-SA 4.0. Non-commercial use only; adaptations must be shared under the same license.

Citation

@inproceedings{tong2022videomae,
  title     = {VideoMAE: Masked Autoencoders are Data-Efficient Learners for
               Self-Supervised Video Pre-Training},
  author    = {Tong, Zhan and Song, Yibing and Wang, Jue and Wang, Limin},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2022}
}

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

Класс архитектуры
VideoMAEForVideoClassification
Ревизия весов
9aafa26

0 моделей