miccio-dk / itsadive_hybrid_structural_model

A structural model for HRTF individualization combining measured, synthesized, and selected components.
MIT License
14 stars 3 forks source link
3d-audio deep-learning hrtf hrtf-individualization machine-learning sound-and-music-computing spatial-audio

Contributors Forks Stargazers Issues MIT License Twitter Facebook


Logo

Hybrid Structural Model for HRTF individualization

Table of Contents

  1. About
  2. Getting Started
  3. Usage
  4. License
  5. Citation
  6. Contact
  7. References

About

This repository includes the code for a hybrid structural HRTF model combining measured, synthesised, and selected components [1]. In particular, its three components are:

The model, implemented in MATLAB/Python, directly outputs a SOFA file.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

To run this project you'll need a copy of Python 3.x (3.7 or later recommended) and MATLAB. If you want to use the generated SOFA file with Steam Audio, it is recommended to use MATLAB 2016. See this issue for more details.

Make sure to download and install the following MATLAB toolboxes:

Furthermore, you'll need a copy of the HUTUBS [4] dataset, which can be found here (file HRIRs.zip).

Finally, it is recommended to install the necessary Python dependencies within a virtualenv or using conda. In the latter case, make sure to install pip within your Conda environment first.

Installation

  1. Clone the repo
    git clone git@github.com:miccio-dk/itsadive_hybrid_structural_model.git
  2. Install Python packages
    cd ./itsadive_hybrid_structural_model/python
    pip install -r requirements.txt

Usage

In order to generate an individualized HRTF set from user's data, follow these steps.

Anthropometric data collection

PRTF generation

From within the python/ directory, run the following command:

python ear_to_prtf.py configs/edges_median.json /path/to/pinna_contours.png --nfft 512 --output_path /path/to/prtf.mat

For more info regarding further arguments and options:

python ear_to_prtf.py --help

HRTF generation

Open MATLAB and call generateHrtfSet() with the following arguments:

License

Distributed under the MIT License. See LICENSE for more information.

Citation

If you use this code in a scientific publication, please reference the following works [1,2]:

@inproceedings{micciniHybridApproachStructural2021,
    title = {A hybrid approach to structural modeling of individualized {HRTFs}},
    booktitle = {2021 {IEEE} {Conference} on {Virtual} {Reality} and {3D} {User} {Interfaces} {Abstracts} and {Workshops} ({VRW} 2021)},
    author = {Miccini, R. and Spagnol, S.},
    month = mar,
    year = {2021}
}

@misc{spagnolVikingHRTFDataset2020,
    title = {The {Viking} {HRTF} dataset v2},
    url = {https://zenodo.org/record/4160401},
    publisher = {Zenodo},
    author = {Spagnol, Simone and Miccini, Riccardo and Unnthorsson, Runar},
    month = oct,
    year = {2020},
    doi = {10.5281/zenodo.4160401},
    note = {type: dataset},
}

Contact

Simone Spagnol - @itsadive - ssp (@) create.aau.dk

Project Link: https://itsadive.create.aau.dk

References

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No. 797850.