Metadata-Version: 2.5
Name: m3l-toolkit
Version: 2026.10.1
Summary: Multimodal Machine Listening Toolkit
Project-URL: Home, https://ybando.jp
Author-email: Yoshiaki Bando <y.bando@aist.go.jp>
License: MIT License
        
        Copyright (c) 2025 National Institute of Advanced Industrial Science and Technology (AIST), Japan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
License-File: LICENSE-BEATS
License-File: LICENSE-PYTORCH
Requires-Dist: aiaccel>=2026.10.2
Requires-Dist: einops
Requires-Dist: gradio>=6.14.0
Requires-Dist: hydra-core
Requires-Dist: kornia
Requires-Dist: librosa
Requires-Dist: lightning
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: omegaconf>=2.4.0
Requires-Dist: pyyaml
Requires-Dist: resampy
Requires-Dist: rich
Requires-Dist: rotary-embedding-torch>=0.8.9
Requires-Dist: scipy
Requires-Dist: seaborn
Requires-Dist: sed-scores-eval
Requires-Dist: soundfile
Requires-Dist: timm
Requires-Dist: torch
Requires-Dist: torchaudio
Requires-Dist: torchmetrics
Requires-Dist: torchvision
Requires-Dist: transformers
Description-Content-Type: text/markdown

<div align="center"><img src="https://raw.githubusercontent.com/b-sigpro/m3l/master/docs/image/logo_m3l.png" height="140"/></div>

<div align="center">
    <img src="https://img.shields.io/github/license/b-sigpro/m3l.svg" />
    <img src="https://img.shields.io/badge/Python-3.10%2B-blue" />
    <a href="https://m3l-toolkit.readthedocs.io/en/latest/index.html">
    <a href="https://pixi.sh/">
        <img src="https://img.shields.io/badge/Pixi-managed-yellow" alt="Pixi" />
    </a>
    <a href="https://m3l-toolkit.readthedocs.io/en/latest/index.html">
        <img src="https://app.readthedocs.org/projects/m3l-toolkit/badge/?version=latest" />
    </a>
</div>

# M3L: Multi-Modal Machine Listening Toolkit

M3L is a research toolkit for multi-modal machine listening, including audio representation learning, sound event detection, and reproducible experiment recipes.

## Key features

- **Reproducible recipes** – End-to-end pipelines document every stage (data prep, training, inference, evaluation) for reproducible studies.
- **HPC ready** – Recipes and Makefiles are tuned for ABCI, TSUBAME, and other clusters, yet remain runnable on a single workstation.
- **Highly modular** – Lightning tasks, common datasets, models, and utilities are built to swap components and run ablations with minimal friction.

## Getting started

For inference or use as a Python dependency, install M3L from GitHub:

```bash
pip install m3l-toolkit
```

For development, use [Pixi](https://pixi.sh/) to manage the project environment.

```bash
git clone git@github.com:b-sigpro/m3l.git
cd m3l
pixi install
pixi run pre-commit install
```

> [!NOTE]
> The Pixi workspace currently supports Linux (`linux-64`), with a GPU-oriented default environment and a CPU environment for CI.

## Recipes

Example experiment recipes are available under `recipes/`:

- **[DESED](recipes/desed/)** – Sound event detection using the DESED dataset.
- **[URBAN-SED](recipes/urban-sed/)** – Sound event detection using synthetic urban soundscapes.
- **[AudioSet](recipes/audioset/)** – Audio tagging, sound event detection, and audio-visual learning.

Dataset preparation and experiment execution require the corresponding datasets and recipe-specific configuration.

> [!NOTE]
> These recipes are currently under maintenance.

## License

M3L is licensed under the [MIT License](LICENSE), except for the following files and directories, which are subject to their own licenses and copyright notices:

- [`m3l/common/nn/transformer.py`](m3l/common/nn/transformer.py) – `TransformerEncoderLayer` and `TransformerDecoderLayer` adapted from [PyTorch](https://github.com/pytorch/pytorch), licensed under [MIT AND BSD-3-Clause](LICENSE-PYTORCH).
- [`m3l/third/beats/`](m3l/third/beats/) – [BEATs](https://github.com/microsoft/unilm/blob/master/beats/README.md), licensed under its own [MIT](LICENSE-BEATS).

Please refer to the linked license files before reusing or redistributing these components.

## Acknowledgement

- Part of this software was developed in a project commissioned by the New Energy and Industrial Technology Development Organization (NEDO).
- Part of this software was developed by using ABCI 3.0 provided by AIST and AIST Solutions.
- Part of this software was developed by using the TSUBAME4.0 supercomputer at Institute of Science Tokyo.
