This repository contains information, code and models from the paper Data-driven Estimation of Sinusoid Frequencies by Gautier Izacard, Sreyas Mohan and Carlos Fernandez-Granda. Please visit the project webpage here.
Please refer to requirements.txt
for required packages.
The directory pretrained_models
contains the pretained models of DeepFreq.
In example_notebook.ipynb
, DeepFreq is applied to different signals and the results are visualized.
train.py
provides the code for training a model from scratch. An example usage of the script with some options is given below:
python train.py \
--n_training 200000 \
--n_epochs_fr 200 \
--n_epochs_fc 100 \
--output_dir /checkpoint/experiment_name \
Please refer to the argparse
module in train.py
for additional training options.
test.py
provides the script to bechmark the performance of DeepFreq against several baselines. An example usage of the script is provided below.
python test.py \
--data_dir test_dataset/ \
--output_dir results/ \
--fr_path pretrained_models/DeepFreq/frequency_representation_module.pth \
--fc_path pretrained_models/DeepFreq/frequency_counting_module.pth \
--psnet_path pretrained_models/PSnet/psnet.pth \
--psnet_fc_path pretrained_models/PSnet/frequency_counting_psnet.pth \
--overwrite
The implementation of CBLasso is based on the code available here. CBLasso takes a long time to run, therefore, the result of running CBLasso on test_dataset
is precomputed and provided in test_dataset/cblasso_results
. Performance of CBLasso is obtained with run_cblasso.py
, it requires to install CVX and MATLAB for Python.
generate_dataset.py
provides the code to generate data. An example usage is shown below:
python generate_dataset.py \
--output_dir my_testset/ \
--n_test 1000 \
--signal_dimension 50 \
--minimum_separation 1. \
--dB 0 5 10 15 20 25 30 35 40 45 50 \
The particular instance of test data used in the original paper is available in the test_dataset
.
If you find this repository useful, please consider citing the following works:
[1] G. Izacard, S. Mohan, C. Fernandez-Granda Data-Driven Estimation of Sinusoid Frequencies
@inproceedings{izacard2019deepfreq,
title={Data-Driven Estimation of Sinusoid Frequencies},
author={Izacard, Gautier and Mohan, Sreyas and Fernandez-Granda, Carlos},
booktitle = {Advances in Neural Information Processing Systems},
year = {2019}
pages = {5127--5137},
volume = {32},
url = {https://proceedings.neurips.cc/paper/2019/file/d0010a6f34908640a4a6da2389772a78-Paper.pdf},
}
[2] G. Izacard, B. Bernstein, C. Fernandez-Granda A Learning-based Framework for Line-spectra Super-resolution
@inproceedings{izacard2019learning
title={A Learning-based Framework for Line-spectra Super-resolution},
author={Izacard, Gautier and Bernstein, Brett and Fernandez-Granda, Carlos},
booktitle={IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
year={2019},
pages={3632-3636},
doi={10.1109/ICASSP.2019.8682882}
}