# APOAI 2026 Audio Event Detection

Note: This task will be evaluated in an environment based on the `ioai3.6` image. Participants should select `ioai3.6` as the training image.

## 1. Task Description

Audio Event Detection (AED) holds profound significance as it transforms passive sound into active, machine-understandable awareness, effectively giving listening devices a contextual sense of the world. Unlike simple sound recognition, AED pinpoints and classifies specific acoustic occurrences—such as a gunshot, a baby’s cry, breaking glass, or a cough—within an audio stream, enabling systems to react to what is happening rather than merely recording noise. Its impact spans critical safety, where the instant detection of aggression or distress sounds in urban spaces can trigger rapid response even when cameras are obstructed; to healthcare, where fall or abnormal breathing sounds empower non-intrusive elderly monitoring and telemedicine. In environmental conservation, automated identification of animal calls or chainsaw noises helps combat poaching and illegal logging around the clock. Industrial settings benefit through predictive maintenance, as the early sensing of hissing gas leaks or anomalous engine knocks prevents catastrophic failures. Moreover, AED fuels smarter multimedia archiving, making vast audio libraries searchable by content, and supports inclusive technology through richer auditory scene analysis for the hearing impaired. Ultimately, AED bridges the gap between hearing and perception, making auditory intelligence a cornerstone of safer cities, more responsive homes, and resilient ecosystems.

For this task you are given a **3-second** audio clip at 16 kHz (simulating real phone call scenarios: often containing speech + background noise + occasional acoustic events), predict its event class label. This is a **single-label classification** task: each audio clip belongs to exactly one class.

The eight event classes represent common acoustic events in telephony environments, with some events (cough, sneeze, laughter, cry) carrying higher practical importance than others.



## 2. Classes

### High-weight classes (weight = 2.0)

| Class | Description |
|---|---|
| `cough` | Coughing sound |
| `sneeze` | Sneezing sound |
| `laughter` | Human laughter |
| `cry` | Crying or sobbing sounds |

### Low-weight classes (weight = 1.0)

| Class | Description |
|---|---|
| `dog_bark` | Dog barking |
| `siren` | Siren / alarm |
| `noise` | Generic noise (traffic, construction, crowd, etc.) |
| `none` | No target event (may contain speech or silence / low noise) |



## 3. Dataset

### 3.1 Data Splits

| Split | Samples |
|---|---|
| Train | 24,000 |
| Validation | 4,000 |
| Test | 4,000 |
| **Total** | **32,000** |

### 3.2 Class Distribution

| Class | Train | Val | Test |
|---|---|---|---|
| cough | 3,326 | 541 | 570 |
| sneeze | 2,858 | 457 | 459 |
| laughter | 3,329 | 554 | 574 |
| cry | 2,444 | 443 | 419 |
| dog_bark | 2,345 | 367 | 444 |
| siren | 2,417 | 398 | 398 |
| noise | 3,739 | 614 | 583 |
| none | 3,542 | 626 | 553 |

### 3.3 Audio Specifications

| Parameter | Value |
|---|---|
| Sample Rate | 16,000 Hz |
| Duration | 3.0 s |
| Samples per clip | 48,000 |
| Format | WAV (float32) |

### 3.4 Pre-computed Features

Pre-computed **log-mel spectrograms** are provided as `.npy` files in the `train/` directory. The corresponding labels are in `train.csv` (columns: `filename, label`).

![mel](https://bohrium-ioai-test.oss-cn-zhangjiakou.aliyuncs.com/article/76719/01c8cf35316a405e9f0a3e9f34741e62/9dc9e79e-0ba2-40a5-9b7e-f6ecd035291f.png)

| Parameter | Value |
|---|---|
| Mel bins (`n_mels`) | 64 |
| FFT size (`n_fft`) | 1,024 |
| Hop length | 160 (10 ms) |
| Spectrogram shape | `[64, 300]` |
| Log transform | `log10(max(S, 1e-10))` |

The validation and test sets are not directly accessible during development. They will be available only in the evaluation environment through environment variables. Please refer to the Baseline (see the Baseline on the top) notebook for details.

### 3.5 Training Data Access

Training data can be accessed directly:

- **Mel spectrograms:** `/bohr/train-wsd9/v2/train/*.npy`
- **Labels:** `/bohr/train-wsd9/v2/train.csv`

Example rows from `train.csv`:

| id | split | label | wav_path | mel_path | speech_included | event_only | none_silence | event_path | event_offset | event_snr_db | bg_path | bg_snr_db |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| train_000000 | train | siren | .../train_000000.wav | .../train_000000.npy | 1 | 0 | 0 | .../esc_0000.wav | 17870 | -3.696 | .../0159.wav | 4.373 |
| train_000001 | train | dog_bark | .../train_000001.wav | .../train_000001.npy | 0 | 1 | 0 | .../esc_0037.wav | 18231 | — | — | — |

For classification, the key columns are `id` (sample identifier), `label` (target class), and `mel_path` (pre-computed spectrogram file).

---

## 4. Task

Implement an audio event classifier that predicts the event class for each 3-second audio clip.

Please use the pre-computed log-mel spectrograms as input. There is no need to compute STFT from raw audio.



## 5. Submission

Participants must submit a notebook named `submission.ipynb` containing both the training process and the prediction process.

### 5.1 Input and Output

- **Input:** Pre-computed log-mel spectrograms (`.npy` files) + `train.csv` for train process, and validation and test data, which are not accessible during development but will be available when the notebook is submitted. Please refer to the Baseline (see the Baseline on the top) notebook for the required access method.)
- **Output:** A zip file named `submission.zip` containing:
  - `submission_val.json` — predictions for the validation set
  - `submission_test.json` — predictions for the test set

Both JSON files should have the format `{"sample_id": "predicted_label", ...}`.

### 5.2 File Structure

Please refer to the Baseline (see the Baseline on the top) notebook for the complete file structure.

### 5.3 Submission JSON Format

Both `submission_val.json` and `submission_test.json` should be a flat JSON object mapping sample IDs to predicted labels:

```json
{
    "sample_001": "cough",
    "sample_002": "sneeze",
    "sample_003": "none"
}
```

- Keys: sample identifiers (e.g., filenames without extension)
- Values: one of the 8 class labels (`cough`, `sneeze`, `laughter`, `cry`, `dog_bark`, `siren`, `noise`, `none`)

---

## 6. Score

### 6.1 Metric: Weighted Macro-F1

The final score is a weighted average of the per-class F1-scores across all 8 classes.

For each class $i$, compute the F1-score $F1_i$, then compute the weighted average:

$$\text{Score} = \frac{\sum_i w_i \cdot F1_i}{\sum_i w_i}$$

Where the class weights are:

| Classes | Weight $w_i$ |
|---|---|
| cough, sneeze, laughter, cry | 2.0 |
| dog_bark, siren, noise, none | 1.0 |

This weighting explicitly incentivizes participants to **prioritize high-value events**.

### 6.2 F1-score Definition

For each class $i$:

$$\text{Precision}_i = \frac{TP_i}{TP_i + FP_i}, \quad \text{Recall}_i = \frac{TP_i}{TP_i + FN_i}$$

$$F1_i = 2 \times \frac{\text{Precision}_i \times \text{Recall}_i}{\text{Precision}_i + \text{Recall}_i}$$

When $\text{Precision}_i + \text{Recall}_i = 0$, define $F1_i = 0$.

### 6.3 Public vs Private Leaderboard

- **Public leaderboard (A):** validation set score
- **Private leaderboard (B):** test set score (revealed after competition ends)

## 7. Restrictions

- Pretrained model weights are not allowed, including weights pretrained on ImageNet or any other external dataset;
- External large language model APIs, such as GPT or Claude, may not be used for prediction, feature generation, data labeling, or model ensembling;
- Training + inference must complete within 25 minutes on a Tesla L20 GPU.

## 8. Baseline and Reference Scores

The baseline score on Leaderboard B is: 0.5886

The reference score achieved by the scientific committee on Leaderboard B is: 0.7030

## 9. Acknowledgement

 We thank Li Yulin from Microsoft for providing the topic and data.