/ Модель

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

Параметры
18,9 млн
Лицензия
Apache 2.0
Архитектура
hubert · dense
Базовая модель
distilhubert
Опубликована
19 мар 2024

distilhubert-finetuned-baby_cry

Классификация текстаТекст → label3 профессии

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

174скачиваний за 30 дней1лайквеса обновлены7 мая 2026

Бенчмарки

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

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

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

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

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

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

Модель AmeerHesham — дообученная DistilHuBERT для классификации детского плача по аудиозаписи. Она относит плач младенца к одной из пяти категорий, связанных с возможной причиной дискомфорта; в карточке перечислены боль в животе, необходимость отрыгнуть и общий дискомфорт. Модель содержит 18,9 млн параметров и принимает аудио, рассчитанное на обработку с частотой 16 кГц. Она создана на основе ntu-spml/distilhubert и обучена на наборе Nooon/Donate_a_cry.

Модель предназначена для вспомогательного использования родителями и опекунами, а также для интеграции в приложения мониторинга младенцев и исследовательские проекты. Обучение на одном наборе данных может ограничивать переносимость на записи с другими микрофонами, в шумной обстановке и для разных групп младенцев. Очень короткие записи и аудио длиннее 10 секунд могут давать менее надёжные результаты. Модель не является медицинским устройством и не заменяет консультацию педиатра. Лицензия — Apache-2.0.

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

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

Ограничения

Модель обучена на одном наборе данных, поэтому качество может снижаться при фоновом шуме, низком качестве записи или отличающихся условиях и демографии. Короткие клипы менее 1–2 секунд и записи длиннее 10 секунд могут давать менее надёжные результаты; модель не предназначена для медицинской диагностики.

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

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

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

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

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

Открыть на Hugging Face

distilhubert-finetuned-Donate_a_cry-v3

This model is a fine-tuned version of ntu-spml/distilhubert on the Nooon/Donate_a_cry dataset for baby cry classification — detecting the reason behind an infant's cry from raw audio.


Model Description

This model classifies baby cry audio recordings into 5 categories representing common infant distress signals:

Label IDLabel NameDescription
0belly_painCry indicating abdominal pain
1burpingCry indicating need to burp
2discomfortCry indicating general discomfort
3hungryCry indicating hunger
4tiredCry indicating tiredness/sleepiness

The model uses DistilHuBERT, a distilled version of HuBERT (Hidden-Unit BERT), which is a self-supervised speech representation model. It was fine-tuned end-to-end on balanced baby cry audio data to learn acoustic patterns associated with each cry type.


Intended Uses & Limitations

✅ Intended Uses

  • Assisting parents and caregivers in understanding the cause of infant crying
  • Integration into baby monitor applications or smart home systems
  • Academic research in infant vocal expression and affective computing
  • Part of a broader infant health monitoring pipeline (e.g., combined with postpartum depression detection)

⚠️ Limitations

  • The model was trained on a single dataset (Donate_a_cry), which may not cover all acoustic environments, microphone types, or infant demographics
  • Performance may degrade with background noise or low-quality microphone recordings
  • The model is not a medical device and should not replace professional pediatric advice
  • Very short clips (under 1–2 seconds) or clips longer than 10 seconds may produce less reliable predictions
  • The model was trained on 16 kHz audio; input at different sampling rates will be automatically resampled by the feature extractor

Training and Evaluation Data

Dataset: Nooon/Donate_a_cry

The Donate_a_cry dataset contains real infant cry recordings labeled across 5 categories. The original dataset has class imbalance, which was addressed before training.

Preprocessing & Balancing Strategy

The raw dataset was preprocessed and balanced using the following pipeline:

  1. Padding / Truncation — All audio arrays were normalized to a fixed length of 16,000 × 10 = 160,000 samples (10 seconds at 16 kHz) using zero-padding for shorter clips and truncation for longer ones.
  2. SMOTE (Synthetic Minority Over-sampling Technique) — Applied to the flattened audio feature arrays to generate synthetic samples for under-represented classes, producing a fully balanced training set.
  3. Train/Test Split — The balanced dataset was split into 80% training / 20% evaluation using a fixed seed of 42 for reproducibility.
  4. Feature Extraction — The AutoFeatureExtractor from DistilHuBERT was applied with:
    • Sampling rate: 16,000 Hz
    • Max duration: 10 seconds
    • Normalization: enabled
    • Attention mask: returned
    • Dropout on features, hidden states, and projections for regularization

Training Procedure

Architecture

  • Base model: ntu-spml/distilhubert
  • Classification head: Linear layer with 5 output classes
  • Dropout settings applied at feature extraction:
    • attention_dropout = 0.5
    • hidden_dropout = 0.5
    • final_dropout = 0.5
    • feat_proj_dropout = 0.5
    • mask_time_prob = 0.05 (SpecAugment-style masking)

Training Hyperparameters

HyperparameterValue
learning_rate0.001
train_batch_size16
eval_batch_size16
num_train_epochs10
seed42
optimizerAdam (β₁=0.9, β₂=0.999, ε=1e-8)
lr_scheduler_typeLinear
lr_scheduler_warmup_ratio0.1
gradient_accumulation_steps1
early_stopping_patience3 epochs
best_model_metricaccuracy

Regularization & Stability

  • Early stopping with patience of 3 epochs was applied to prevent overfitting
  • Model checkpoints were saved each epoch; the best checkpoint (by eval accuracy) was loaded at the end

Framework Versions

LibraryVersion
Transformers4.41.2
PyTorch2.1.2
Datasets2.19.2
Tokenizers0.19.1
imbalanced-learn(SMOTE)

Evaluation

The model was evaluated on a held-out 20% split of the SMOTE-balanced dataset. The following metrics were computed:

  • Accuracy — overall correctness across all 5 classes
  • Weighted F1-score — harmonic mean of precision and recall, weighted by class support
  • Weighted Precision — weighted average precision per class
  • Weighted Recall — weighted average recall per class
  • Confusion Matrix — per-class breakdown of predictions vs. true labels
  • ROC Curves — one-vs-rest AUC for each of the 5 classes

How to Use

Using the Pipeline API (recommended)

from transformers import pipeline

pipe = pipeline("audio-classification", model="AmeerHesham/distilhubert-finetuned-baby_cry")

# Pass a local audio file or URL
result = pipe("baby_cry_sample.wav")
print(result)
# Example output: [{'score': 0.82, 'label': 'hungry'}, ...]

Loading the Model Directly

from transformers import AutoProcessor, AutoModelForAudioClassification
import torch

processor = AutoProcessor.from_pretrained("AmeerHesham/distilhubert-finetuned-baby_cry")
model = AutoModelForAudioClassification.from_pretrained("AmeerHesham/distilhubert-finetuned-baby_cry")

# Load your audio (must be 16kHz)
import librosa
audio, sr = librosa.load("baby_cry_sample.wav", sr=16000)

inputs = processor(audio, sampling_rate=sr, return_tensors="pt")
with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_id = logits.argmax().item()
print(model.config.id2label[predicted_class_id])

Label Mapping

id2label = {
    '0': 'belly_pain',
    '1': 'burping',
    '2': 'discomfort',
    '3': 'hungry',
    '4': 'tired'
}

Citation

If you use this model in your research or application, please cite the base model and dataset:

@misc{distilhubert-baby-cry,
  author    = {Amir Hesham},
  title     = {DistilHuBERT Fine-tuned for Baby Cry Classification},
  year      = {2024},
  publisher = {HuggingFace},
  url       = {https://huggingface.co/AmeerHesham/distilhubert-finetuned-baby_cry}
}

Related Work

This model was developed as part of the Bambino graduation project — a mobile application for pregnant mothers and infants that integrates:

  • 🍼 Baby cry classification (this model) — detecting infant needs from audio
  • 🧠 Postpartum depression detection — supporting maternal mental health monitoring

Model developed by AmeerHesham

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

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

GPU в ailist

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

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

Для архитектуры hubert нет загрузчика под задачу text-classification.

Класс архитектуры
HubertForSequenceClassification
Ревизия весов
7b9a770

0 моделей