Code Monkey home page Code Monkey logo

deepfreq's Introduction

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.

deepfreq's People

Contributors

gizacard avatar sreyas-mohan avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.