deezer / spleeter

Deezer source separation library including pretrained models.
https://research.deezer.com/projects/spleeter.html
MIT License
25.63k stars 2.81k forks source link

why 2stems training still need drums,bass and other but accompaniment.wav? #671

Open virginity-is-cool opened 2 years ago

virginity-is-cool commented 2 years ago

the training seems endless eventhough i set only 1 song. i use 2stems config and i tried to remove 'drums_path','bass_path','other_path' from the .csv file then the trainging won't start. so i added 'accompaniment_path' to the .csv file the training can get to start, but there's no record about loading accompaniment.wav. Although the instrument list only contains vocals and accompaniment, the training still loaded drums.wav bass.wav other.wav. It just ignore my accompaniment.wav file anyway.

my command: nvidia-docker run -v /media/danshafaker/软件专用/SpleeterGUI:/base researchdeezer/spleeter:3.7-gpu-2stems train -p /base/configs/2stems/base_config.json -d /base/xunlian

here're my configs

2021-10-20 01-10-28 的屏幕截图

{ "train_csv": "/base/configs/musdb_train.csv", "validation_csv": "/base/configs/musdb_validation.csv", "model_dir": "/base/2stems", "mix_name": "mix", "instrument_list": ["vocals", "accompaniment"], "sample_rate":44100, "frame_length":4096, "frame_step":1024, "T":512, "F":1024, "n_channels":2, "separation_exponent":2, "mask_extension":"zeros", "learning_rate": 1e-4, "batch_size":4, "training_cache":"/base/cache/training_cache", "validation_cache":"/base/cache/validation_cache", "train_max_steps": 1000000, "throttle_secs":300, "random_seed":0, "save_checkpoints_steps":150, "save_summary_steps":5, "model":{ "type":"unet.unet", "params":{} } }

traincsv mix_path,vocals_path,drums_path,bass_path,other_path,accompaniment_path,duration train/A Classic Education - NightOwl/mixture.wav,train/A Classic Education - NightOwl/vocals.wav,train/A Classic Education - NightOwl/drums.wav,train/A Classic Education - NightOwl/bass.wav,train/A Classic Education - NightOwl/other.wav,train/A Classic Education - NightOwl/accompaniment.wav,171.247166

validatecsv mix_path,vocals_path,drums_path,bass_path,other_path,accompaniment_path,duration train/ANiMAL - Rockshow/mixture.wav,train/ANiMAL - Rockshow/vocals.wav,train/ANiMAL - Rockshow/drums.wav,train/ANiMAL - Rockshow/bass.wav,train/ANiMAL - Rockshow/other.wav,train/ANiMAL - Rockshow/accompaniment.wav,165.511837

is it possible training the 2stems model only with the original song and the instrumental ?

romi1502 commented 2 years ago

Hi @lehend, you can train a 2stems model by providing the vocal track, the accompaniment track, and the mix track. You don't need to provide any other tracks in this case. Note that spleeter will only use the mix track (the name of which is specified by the field mix_name in the JSON config file) and the name of the instruments in instrument_list. So even if you have a drums_path column in your csv, spleeter should not load the drums audio files if "drums" is not in instrument_list. So my guess is that you used a wrong JSON file (with instrument_list set to the common 4 stems setup) while trying to launch your training.