If you want to use Demucs for the MDX challenge, please follow the instructions hereafter
Follow the instructions from the main README in order to setup Demucs using Anaconda. You will need the full setup up for training, including soundstretch.
Download MusDB-HQ to some folder and unzip it.
Train Demucs (you might need to change the batch size depending on the number of GPUs available). It seems 48 channels is enough to get the best performance on MusDB-HQ, and training will faster and less memory demanding. In any case, the 64 channels versions is timing out on the challenge.
./run.py --channels=48 --batch_size 64 --musdb=PATH_TO_MUSDB --is_wav [EXTRA_FLAGS]
Once the training is completed, a new model file will be exported in models/
.
You can look at the SDR on the MusDB dataset using python result_table.py
.
If you want to export a model before training is complete, use the following command:
python -m demucs [ALL EXACT TRAINING FLAGS] --save_model
You can also pass the --half
flag, in order to save weights in half precision. This will divide the model size by 2 and won't impact SDR.
Once this is done, you can partially evaluate a model with
./run.py --test NAME_OF_MODEL.th --musdb=PATH_TO_MUSDB --is_wav
Note: NAME_OF_MODEL.th
is given relative to the models folder (given by --models
, defaults to models/
), so don't include it in the name.
If you want to quickly test idea, I would recommend training a 16 kHz model, and testing if things work there or not, before training the full 44kHz model. You can train one of those with
./run.py --channels=32 --samplerate 16000 --samples 160000 --data_stride 16000 --depth=5 --batch_size 64 --repitch=0 --musdb=PATH_TO_MUSDB --is_wav [EXTRA_FLAGS]
(repitch must be turned off, because things will break at 16kHz).
- Git clone the Music Demixing Challenge - Starter Kit - Demucs Edition.
- Inside the starter kit, create a
models/
folder and copy over the trained model from the Demucs repo (renaming it for instancemy_model.th
) - Inside the
test_demuc.py
file, change the functionprediction_setup
: comment the loading of the pre-trained model, and uncomment the code to load your own model. - Edit the file
aicrowd.json
with your username. - Install git-lfs. Then run
git lfs install
git add models/
git add -u .
git commit -m "My Demucs submission"
- Follow the submission instructions.
Best of luck 🤞