Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yoyololicon/hrtf-ilp
HRTF time-of-arrival and phase estimation.
https://github.com/yoyololicon/hrtf-ilp
head-related-transfer-function interaural-time-difference phase-unwrapping spatial-audio time-of-arrival
Last synced: about 1 month ago
JSON representation
HRTF time-of-arrival and phase estimation.
- Host: GitHub
- URL: https://github.com/yoyololicon/hrtf-ilp
- Owner: yoyololicon
- License: mit
- Created: 2023-09-02T20:23:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-14T08:49:58.000Z (6 months ago)
- Last Synced: 2024-05-14T09:55:45.863Z (6 months ago)
- Topics: head-related-transfer-function, interaural-time-difference, phase-unwrapping, spatial-audio, time-of-arrival
- Language: Jupyter Notebook
- Homepage:
- Size: 11.8 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Time-of-arrival estimation and phase unwrapping of HRTF with integer linear programming
Source code of the papers [_Time-of-arrival estimation and phase unwrapping of head-related transfer functions with integer linear programming_](https://arxiv.org/abs/2405.06804) (AES Convention 156) and [_Arbitrarily sampled signal reconstruction using relative difference features_](pdf/gsp_paper.pdf) (GSP Workshop 2024).
## Getting started
Please install the required packages by running the following command.
You'll need to have Python >=3.11 installed on your system.
```bash
pip install -r requirements.txt
```## Preprocessing
Given a single HRTF sofa file, `preprocess.py` will compute its TOAs using 36 different configurations we stated in the paper and store the results into a folder.
```bash
python preprocess.py input.sofa output_folder --toa-weight 0.1 --oversampling 10
```
Here, `--toa-weight` controls the value of $\lambda$ and $w_{\delta, i}$ of exponential weighting in the paper.
The output npz files has the format of `{edgeslist/ilp/l2}_toa_{True/False}_cross_{True/False}_{angle/dot/none}.npz`.
They corresponds to the terms in the paper as follows:| Name | Name in ther paper |
|:------:|:--------------------:|
| edgeslist | EDGY |
| ilp | SIMP |
| l2 | LS |
| toa_True | w/ Min. |
| toa_False | w/o Min. |
| cross_True | w/ Cross |
| cross_False | w/o Cross |
| angle | EXP |
| dot | CORR |
| none | NONE |## Experiments
### ITD/aligned-HRIRs reconstruction
Please create a folder named `processed` and put the preprocessed directories in it.
Then, execute the notebook [eval](eval.ipynb) to evaluate the estimated TOAs.### Noise robustness
Please execute the notebook [noise-robust](noise-robust.ipynb) to see the results.
The notebook includes the code to generate Figure 2 in the paper.
Changing the sofa file to the one you want to test will generate the results for the given HRTF.### Phase unwrapping
Please execute the notebook [phase-unwrapping](phase-unwrapping.ipynb) to see the results.
The notebook includes the code to generate Figure 4 and 5 in the paper.
The notebook uses [kamui](https://github.com/yoyololicon/kamui) for ILP-based unwrapping.## Citation
If you use our work in your research, please cite it with the following BibTex entry:
```bibtex
@misc{ycy2024hrtf,
title={Time-of-arrival Estimation and Phase Unwrapping of Head-related Transfer Functions With Integer Linear Programming},
author={Chin-Yun Yu and Johan Pauwels and György Fazekas},
year={2024},
eprint={2405.06804},
archivePrefix={arXiv},
primaryClass={cs.SD}
}
```