Skip to content

Code, Pre-trained Models and some materials accompanying "Data-driven Estimation of Sinusoid Frequencies"

Notifications You must be signed in to change notification settings

st0nedB/DeepFreq

 
 

Repository files navigation

Code and Pretrained Networks from
"Data-driven Estimation of Sinusoid Frequencies"

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.

Code and Pre-trained Models

Please refer to requirements.txt for required packages.

pre-trained models

The directory pretrained_models contains the pretained models of DeepFreq.

Example code for using Pre-Trained models

In example_notebook.ipynb, DeepFreq is applied to different signals and the results are visualized.

Train

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

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 test data

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.

About

Code, Pre-trained Models and some materials accompanying "Data-driven Estimation of Sinusoid Frequencies"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 60.3%
  • Jupyter Notebook 35.2%
  • Python 4.2%
  • MATLAB 0.3%