GithubHelp home page GithubHelp logo

freddd13 / music-separation-gui Goto Github PK

View Code? Open in Web Editor NEW
34.0 2.0 3.0 19.44 MB

Pack cuda environment for bytesep music separation and provide a simple gui.

Python 97.07% Batchfile 2.93%
ai music audio gui pytorch cuda separation separate vocal accompaniment

music-separation-gui's Introduction

Music Separation GUI

This repo provides a one-click install for bytedance's music_source_separation and an easy-to-use GUI. Users can deal with single or batch music separation easily under Windows. The installer in the release contains everything the program needs including cuda.

Installation

Prerequisites

  • An Nvidia graphic card with its driver installed (otherwises it will use CPU to infer)
  • Font Consolas

Installation Guide

Choose one of the following methods:

Method1. One click install (If you have no torch GPU environment):

Download the latest release.

To install, run install.cmd.

Wait the terminal to download and install packages. If you encounter a win32 dll import error, try to run the fix_win32_error.bat.

This may take some time, please be patient. If it is stuck for too long, please try to press "Enter" on your keyboard!!! (This problem may only occurs during the first opening.)

After the first installation, you can quickly start the program by running run.exe in the future. In fact, the install.cmd will provoke the run.exe. The former is to deal with torch packages, so there's no need to run it after the installation.

Method2. GUI only (If you have already got torch 1.7.1 GPU environment):

Please checkout [GUI only](#GUI only)

Usage

After installation, you can delete opt/package to free some space. Choose either single music or multiple ones to seperate and get vocal, accompaniment or both. When dealing with a batch of songs, you need to put them in one clean folder. Note that the output folder should NOT be inside the input folder. If you have your own model and yaml, please switch to the Settings tab and load your own ckpt and yaml.

Note

CPU or GPU is being used?

After press the run button, check out the console message. If it displays "using cuda for separation" and your GPU type, the GPU is being used. Otherwise it is CPU.

GUI only

It's recommended to use the installer. If you have already got torch 1.7.1's gpu environment installed on your Windows PC or just want to use the gui, you can clone this repo to use it in your environment.

If you don't have proper torch installed and want to manually install GUI, please first install torch gpu 1.7.1 using the following command.

conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 -c pytorch  # or use pip to install

Now you can install other things to use the GUI.

git clone [email protected]:Freddd13/music-seperation-gui.git
cd music-source-separator
pip install -r requirements.txt
python MainUI.py

Supported platforms

The GUI itself is cross-platformed, however, the packaging tool used here currently only supports windows. If you have proper torch environment installed, you can also use it under linux and mac. Remember the program has been only tested under windows. Besides, some code needs to be corrected to adapt other OS, for example, some os.system code with ".exe".

References

[1] Qiuqiang Kong, Yin Cao, Haohe Liu, Keunwoo Choi, Yuxuan Wang, Decoupling Magnitude and Phase Estimation with Deep ResUNet for Music Source Separation, International Society for Music Information Retrieval (ISMIR), 2021.

@inproceedings{kong2021decoupling,
  title={Decoupling Magnitude and Phase Estimation with Deep ResUNet for Music Source Separation.},
  author={Kong, Qiuqiang and Cao, Yin and Liu, Haohe and Choi, Keunwoo and Wang, Yuxuan },
  booktitle={ISMIR},
  year={2021},
  organization={Citeseer}
}

Acknowledgements

  • music_source_separation -- The original repo
  • QPT -- A python packaging tool that can pack cuda
  • QGUI -- An ultra lightweight desktop graphical framework below 100K

music-separation-gui's People

Contributors

freddd13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

music-separation-gui's Issues

What model is being used in your gui

Hello how are you? I would like to ask a question, what is the model that your GUI is using ResUNet143, ResUNet143 Subband or MobileNet Subband ? I noticed that the "ResUNet143" model offers better separation results, if possible, please inform att.

Request to update checkpoint models

Hello how are you? I ended up noticing that your ByteDance GUI is using the checkpoints models:

resunet143_subbtandtime_vocals_8.7dB500k_steps_v2.pth
resunet143_subbtandtime_accompaniment
16.4dB_500k_steps_v2.pth

However, the models that have the best performance in SDR is resunet143_ismir2021, with (8.9dB on Vocals) and (16.8dB on Accompaniment), would it be possible for you to make the substitution to include these better models?

I've been making some changes to the .yaml files trying to adapt them to your gui but the end result is the vocal or instrumental containing very loud noises, so no one better than you to make the other models compatible with your gui;

LINK CHECKPOINTS MODELS: https://zenodo.org/record/5513378
REPO: https://github.com/bytedance/music_source_separation/tree/kqq

I look forward to hearing from you, thank you.

Unexpected key(s) in state_dict: "istft.ola_window".

Describe the bug
I'm getting the following problem when trying to process, before it worked, now I'm getting this error what could it be?

LOG BUG:

Link to console: success.
08:09:14	GPU:  NVIDIA GeForce RTX 2060
08:09:14	Using cuda for separating ..
08:09:16	-----以下为异常信息-----
08:09:16	Traceback (most recent call last):
08:09:16	  File "C:\Users\lucas\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\qgui\base_tools.py", line 169, in new_func
    func(obj)
08:09:16	  File "C:\Program Files (x86)\Music_Separation_GUI_v002_amd64\Release\resources\MainUI.py", line 232, in run_single
    progress = self
08:09:16	  File "C:\Program Files (x86)\Music_Separation_GUI_v002_amd64\Release\resources\SepProcessor.py", line 142, in separate_file
    separator = build_separator(config_yaml, checkpoint_path, device)
08:09:16	  File "C:\Program Files (x86)\Music_Separation_GUI_v002_amd64\Release\resources\SepProcessor.py", line 70, in build_separator
    model.load_state_dict(checkpoint["model"])
08:09:16	  File "C:\Users\lucas\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\torch\nn\modules\module.py", line 1224, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
08:09:16	RuntimeError: Error(s) in loading state_dict for ResUNet143_Subbandtime:
	Missing key(s) in state_dict: "istft.reverse.weight", "istft.overlap_add.weight". 
	Unexpected key(s) in state_dict: "istft.ola_window". 
08:09:16	None
08:09:16	-----以上为异常信息-----


Expected behavior
Hope it works like it used to

Screenshots
Screenshot_1

Desktop (please complete the following information):

  • OS: Windows 10

Device information

  • graphic card: * RTX 2060
  • cpu: Intel core I7 10705H

Mat file appears to be empty

你好,我的软件页面可以打开,点击run出现以下错误,请问该如何解决
Link to console: success.
13:05:19 C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\torch\cuda_init_.py:52: UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx (Triggered internally at ..\c10\cuda\CUDAFunctions.cpp:100.)
return torch.C.cuda_getDeviceCount() > 0
13:05:19 Using cpu for separating ..
13:05:20 -----以下为异常信息-----
13:05:20 Traceback (most recent call last):
13:05:20 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\qgui\base_tools.py", line 169, in new_func
func(obj)
13:05:20 File "C:\Users\Administrator\Desktop\Release\resources\MainUI.py", line 232, in run_single
progress = self
13:05:20 File "C:\Users\Administrator\Desktop\Release\resources\SepProcessor.py", line 143, in separate_file
separator = build_separator(config_yaml, checkpoint_path, device)
13:05:20 File "C:\Users\Administrator\Desktop\Release\resources\SepProcessor.py", line 65, in build_separator
target_sources_num=target_sources_num,
13:05:20 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\bytesep\models\resunet_subbandtime.py", line 237, in init
project_root='bytesep/models/subband_tools/filters',
13:05:20 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\bytesep\models\subband_tools\pqmf.py", line 64, in init
data = load_mat2numpy(op.join(filters_dir, "f
" + self.name))
13:05:20 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\bytesep\models\subband_tools\pqmf.py", line 30, in load_mat2numpy
return loadmat(fname)
13:05:20 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\scipy\io\matlab\mio.py", line 225, in loadmat
MR, _ = mat_reader_factory(f, **kwargs)
13:05:20 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\scipy\io\matlab\mio.py", line 74, in mat_reader_factory
mjv, mnv = get_matfile_version(byte_stream)
13:05:20 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\scipy\io\matlab\miobase.py", line 214, in get_matfile_version
raise MatReadError("Mat file appears to be empty")
13:05:20 scipy.io.matlab.miobase.MatReadError: Mat file appears to be empty
13:05:20 None
13:05:20 -----以上为异常信息-----
13:06:18 Using cpu for separating ..
13:06:18 -----以下为异常信息-----
13:06:18 Traceback (most recent call last):
13:06:18 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\qgui\base_tools.py", line 169, in new_func
func(obj)
13:06:18 File "C:\Users\Administrator\Desktop\Release\resources\MainUI.py", line 232, in run_single
progress = self
13:06:18 File "C:\Users\Administrator\Desktop\Release\resources\SepProcessor.py", line 143, in separate_file
separator = build_separator(config_yaml, checkpoint_path, device)
13:06:18 File "C:\Users\Administrator\Desktop\Release\resources\SepProcessor.py", line 65, in build_separator
target_sources_num=target_sources_num,
13:06:18 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\bytesep\models\resunet_subbandtime.py", line 237, in init
project_root='bytesep/models/subband_tools/filters',
13:06:18 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\bytesep\models\subband_tools\pqmf.py", line 64, in init
data = load_mat2numpy(op.join(filters_dir, "f
" + self.name))
13:06:18 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\bytesep\models\subband_tools\pqmf.py", line 30, in load_mat2numpy
return loadmat(fname)
13:06:18 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\scipy\io\matlab\mio.py", line 225, in loadmat
MR, _ = mat_reader_factory(f, **kwargs)
13:06:18 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\scipy\io\matlab\mio.py", line 74, in mat_reader_factory
mjv, mnv = get_matfile_version(byte_stream)
13:06:18 File "C:\Users\Administrator\Desktop\Release\Python\Lib\site-packages\scipy\io\matlab\miobase.py", line 214, in get_matfile_version
raise MatReadError("Mat file appears to be empty")
13:06:18 scipy.io.matlab.miobase.MatReadError: Mat file appears to be empty
13:06:18 None
13:06:18 -----以上为异常信息-----

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.