If you use any part of this code for your work, we ask that you include the following citation:
@article{masuyama2025sudafield,
title = {{SuDaField}: {Subject}- and Dataset-Aware Neural Field for {HRTF} Modeling},
author = {Masuyama, Yoshiki and Wichern, Gordon and Germain, Fran\c{c}ois G. and Ick, Christopher and {Le Roux}, Jonathan},
journal = {IEEE Open Journal of Signal Processing},
year = 2025
}
- Environment setup
- Visualization of Converted HRTF
- LAP Task 1 experiment
- Contributing
- Copyright and license
This code has been tested using python 3.11
on Linux.
Necessary dependencies can be installed using the included requirements.txt
.
We provide visualization.sh to convert an HRTF from the SONICOM dataset as if it was measured in the HUTUBS environment by using a pre-trained SuDaField.
A figure with the original and converted HRTFs, the top row of Figure 6 in the paper, will be saved in exp/lap-task1/magitd-subjectdataset-subject0-dataset1-pretrained/results_itd_pred
. We note that the HRTF and checkpoint are included via Git LFS, and the checkpoint was obtained by training after refactoring.
We provide run.sh to train SuDaField on the dataset used in the LAP challenge Task 1 and perform its Stage 2 evaluation. We are not able to support Stage 1 evaluation at this time, as it requires core MATLAB and additional toolboxes.
-
Stage 0: Preprocessing
- Before the experiment, you need to download
lap-task1-hrtfs.zip
, as linked in the official challenge repository. Then, the dataset parent folderlap-task1-hrtfs
should be renamed and moved todata/lap-task1-original
. - Stage 0 preprocesses the LAP Task 1 data. The preprocessed data will be saved to
data/lap-task1-processed
by running
python -m sudafield.preprocess.preprocess_datasets \ data/lap-task1-original \ data/lap-task1-processed \ data/meta/lap-task1-meta.csv \ --max_workers NUM_WORKERS
- The path to each preprocessed data will be then summarized in
exp/lap-task1/dataset-split/pretrain.yaml
by running
python -m sudafield.preprocess.prepare_pretrain_yaml \ data/meta/lap-task1-split.yaml \ exp/lap-task1 \ data/meta/lap-task1-meta.csv \ data/meta/lap-task1-npzs.csv
- Before the experiment, you need to download
-
Stage 1: Training
- SuDaField is trained on the 80 subjects from the LAP Task 1 data.
- This repository supports natively
mag-subjectdataset-subject0-dataset1
andmagitd-subjectdataset-subject0-dataset1
asMODEL
. - The model
MODEL
can be trained by running
python -m sudafield.pretrain exp/lap-task1/MODEL
-
Stage 2: Evaluation
- HRTFs of the 80 subjects are converted as if they were measured in a reference environment, where we set HUTUBS as the reference.
- If you train a SuDaField that predicts both HRTF magnitude and ITD, the predicted ITDs are used for computing the time-domain HRIRs. Then, the challenge scores for the converted HRIRs are calculated using the official script
lap-task1
by running
python -m sudafield.evaluation_itd_predict exp/lap-task1/MODEL data/lap-task1-original lap-task1 exp/lap-task1/MODEL/results_itd_pred
- On the other hand, to use the original ITDs with a SuDaField predicting only HRTF magnitude, run
python -m sudafield.evaluation_original_itd exp/lap-task1/MODEL data/lap-task1-original lap-task1 exp/lap-task1/MODEL/results_original_itd
- The score that appears in the command line corresponds to the score in the rightmost column of Table 1 in the paper. We note that the performance may vary from the results reported in the paper depending on your specific environment.
See CONTRIBUTING.md for our policy on contributions.
Released under AGPL-3.0-or-later
license, as found in the LICENSE.md file.
All files, except as noted below:
Copyright (c) 2025 Mitsubishi Electric Research Laboratories (MERL)
SPDX-License-Identifier: AGPL-3.0-or-later
The HRTF example:
data/lap-task1-example/sonicom/P0001_FreeFieldComp_96kHz.sofa
was taken from the official dataset for LAP challenge Task 1 and is originally from the SONICOM dataset (license included in LICENSES/MIT.md):
Copyright (c) 2025 Poole, Katarina C. and Meyer, Julie and Martin, Vincent and Daugintis, Rapolas and Marggraf-Turley, Nils and Webb, Jack and Pirard, Ludovic and La Magna, Nicola and Turvey, Oliver and Picinali, Lorenzo
The SONICOM datset is under the MIT license according to Section 3.1 of the following paper:
@InProceedings{poole2025sonicom,
author = {Poole, Katarina C. and Meyer, Julie and Martin, Vincent and Daugintis, Rapolas and Marggraf-Turley, Nils and Webb, Jack and Pirard, Ludovic and La Magna, Nicola and Turvey, Oliver and Picinali, Lorenzo},
title = {The Extended {SONICOM} {HRTF} Dataset and Spatial Audio Metrics Toolbox},
booktitle = {Proc. Forum Acusticum},
year = 2025,
month = jun
}