Skip to content

7embl4/source-separation

Repository files navigation

Source Separation

AboutInstallationDemoPretrained weightsTrainingInferenceFor developersCreditsLicense

About

This repository contains Source Separation Homework from HSE DLA.

Prerequisites

Installation pesq and pystoi with pip requires a C Compiler. You can use either gcc or MSVC. Nevertheless if you are using conda, you can install these packages separately:

conda install -c conda-forge pesq pystoi

Installation

Installation may depend on your task. The general steps are the following:

  1. (Optional) Create and activate new environment using conda or venv (+pyenv).

    a. conda version:

    conda create -n project_env python=3.12
    conda activate project_env

    b. venv (+pyenv) version:

    ~/.pyenv/versions/python3.12/bin/python3 -m venv project_env
    source project_env/bin/activate
  2. Install all required packages

    pip install -r requirements.txt
  3. Install pre-commit:

    pre-commit install

Demo

You can see demo usage here.

Pretrained weights

Use huggingface-cli to download weights from HuggingFace:

huggingface-cli download artem1085715/convtasnet --local-dir "saved/convtasnet"

Or download it manualy and put to saved/convtasnet in root dir

Training

To train a model, run the following command:

python3 train.py -cn=CONFIG_NAME HYDRA_CONFIG_ARGUMENTS

Where CONFIG_NAME is a config from src/configs and HYDRA_CONFIG_ARGUMENTS are optional arguments.

Inference

To run inference (evaluate the model or save predictions):

python3 inference.py HYDRA_CONFIG_ARGUMENTS

For Developers

Instalation

Follow installation guide provided above.

Tasks

Follow this rules:

  1. New branch for each task. Branch name should be like YourName/ShortTaskDescription
  2. Use short, but meaningful commit names. For example, Add new model, Fix bug in metrics, Update requirements.txt
  3. For task submission make a Pull Request, if needed, provide a simple description to your work

Experiments

For your experiments use Hydra-options as mush as possible. For example, if want to train a different model with different training parameters (such as optimizer, scheduler or any of it), do not edit train.py, just use:

python train.py -cn=YOUR_TRAIN_CONFIG

Credits

This repository is based on a heavily modified fork of pytorch-template and asr_project_template repositories.

License

License

About

Source Separation Homework Of HSE DLA Course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages