--- title: UEmo-D1 emoji: 🎭 colorFrom: blue colorTo: red sdk: gradio sdk_version: 6.17.3 app_file: app.py short_description: Unified multimodal emotion recognition decision model python_version: "3.12" startup_duration_timeout: 1h --- # 🎭 UEmo-D1 β€” Unified Multimodal Emotion Recognition A demo of **UEmo-D1**, an efficient and calibrated decision model for unified multimodal emotion recognition, built on [`Qwen/Qwen2.5-Omni-3B`](https://huggingface.co/Qwen/Qwen2.5-Omni-3B). - **Weights:** [`wudq/UEmo-D1`](https://huggingface.co/wudq/UEmo-D1) - **Code:** [`wdqqdw/UEmo-D1`](https://github.com/wdqqdw/UEmo-D1) - **Paper:** [huggingface.co/papers/2611.24481](https://huggingface.co/papers/2611.24481) ## What it does You give the model an **instruction**, a list of **candidate answers** (1–26 alternatives, labelled A, B, C …) and a **target** β€” text, image, audio, or video+audio β€” and it returns: 1. the chosen option letter + text, and 2. the model's **calibrated probability distribution over all options**. Unlike a plain generative answer, the decision is taken from a dedicated bidirectional-prefix / causal-answer attention pass over the option letters, and the probabilities are tempered by the checkpoint's calibrated temperature (`softmax(logits / 1.0790077648040843)`), so the confidence scores are meant to be read as calibrated. ## Example assets | Asset | Source | Licence | |---|---|---| | `amused.wav`, `angry.wav`, `surprised.wav` | [Thorsten-Voice TV-44kHz-Full](https://huggingface.co/datasets/Thorsten-Voice/TV-44kHz-Full) (subset `TV-2021.06-Emotional`) β€” German emotional speech by Thorsten MΓΌller | **CC0-1.0** | | `woman_sad.jpg`, `girl_with_dog.jpg`, `2_women_arguing.mp4`, `elderly_woman_laughing.mp4` | [linoyts/repo-to-space-example-inputs](https://huggingface.co/datasets/linoyts/repo-to-space-example-inputs) / [linoyts/repo-to-space-example-videos](https://huggingface.co/datasets/linoyts/repo-to-space-example-videos) | **CC0-1.0** | The video examples carry no audio track; the app supplies matched silence for the video's audio slot (the reference pipeline requires audio aligned with every video clip). ## Implementation notes `app.py` is a 1:1 port of the authors' own `inference.py` from the model repo β€” identical media preprocessing (`smart_resize` to 224Β²-max, 0.5 s frame sampling, 16 kHz mono audio), identical processor call (`use_audio_in_video=True`, `fps=2.0`, the same `min_pixels`/`max_pixels`), identical calibrated softmax β€” with the file-path I/O replaced by in-memory Gradio inputs. ### Dependency pins (both are forced, not cosmetic) 1. **`transformers==4.57.1`** β€” `uemo_integration.install()` sha256-verifies transformers' `models/qwen2_5_omni/modeling_qwen2_5_omni.py` against `830855078d0c0b159a47041f8942949fd1a6efd39c62127c1387cc3b84058fa3` and raises `ValueError('Installed model source differs from reviewed source')` otherwise. That hash matches transformers `4.57.0`–`4.57.6` only (all `5.x` differ), and every `4.57.x` requires `huggingface-hub<1.0`. 2. **`sdk_version: 6.17.3` + `huggingface-hub==0.35.3`** β€” gradio `>= 6.18.0` requires `huggingface-hub>=1.2.0`, which contradicts pin (1). Gradio `6.17.3` requires `huggingface-hub<2.0,>=0.33.5`, which intersects `4.57.1`'s `>=0.34.0,<1.0` at `0.35.x`. The model card independently prescribes `huggingface_hub==0.35.3`. 3. **`torch==2.8.0` / `torchvision==0.23.0`** β€” the versions the model repo's own `requirements.txt` validates, and the matching `pt28-cu128-cp312` prebuilt FlashAttention-2 wheel for the ZeroGPU Blackwell (sm_120) runtime. ## Licence The base model is released under the **Qwen Research Licence** (non-commercial), so this demo inherits it.