文章目录
- 一、环境搭建
- 二、数据集准备
- 报错
-
- (1)soundfile.LibsndfileError: Error opening 'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\tmps0ogpyqy.wav': System error.
- (2)FileNotFoundError: [WinError 2] 系统找不到指定的文件。
- (3)TypeError: beat_track() takes 0 positional arguments but 1 positional argument (and 2 keyword-only arguments) were given
- (4)TypeError: chroma_cqt() takes 0 positional arguments but 1 positional argument (and 1 keyword-only argument) were given
- (5)numpy.core._exceptions._ArrayMemoryError: Unable to allocate 1.11 GiB for an array with shape (54134, 1377) and data type complex128
- (6)UserWarning:The version_base parameter is not specified.
- (7)FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
- (8)torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 562.00 MiB (GPU 0; 15.99 GiB total capacity; 14.06 GiB already allocated; 0 bytes free; 14.72 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
- (9)WARNING:__main__:Model 81de367c has less epoch than expected (8 / 360)
- 写在最后
这是一个音频提取、分离的项目
一、环境搭建
(1)新建虚拟环境,并进入
conda create -n demucs python=3.8
activate demucs
(2)安装pyTorch
到pyTorch官网选择对应配置
这个是我的配置
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
(3)进入代码文件夹,批量安装包
d:
cd D:\data\cqZhang\demucs-3
pip install -r requirements.txt
(4)安装其他需要的包
pip install librosa
二、数据集准备
(1)下载数据集
使用Musdb HQ 数据集
获取路径有:
https://zenodo.org/record/3338373
https://www.kaggle.com/datasets/ayu055/musdb18hq
数据集可以放在“\checkpoint\defossez\datasets\musdbhq”路径下,
这与代码原来的位置应该是一致的
(2)修改配置参数
- The
dset.musdb
key insideconf/config.yaml
. - The variable
MUSDB_PATH
insidetools/automix.py
.
我本来使用的是相对路径,但是他貌似找不到,后来改成绝对路径
其他的路径也一样,如果找不到,就要改成绝对路径
(3)创建微调数据集
原来的命令是export NUMBA_NUM_THREADS=1; python3 -m tools.automix
,但它是linux上的命令,
将其改为set NUMBA_NUM_THREADS=1 && python -m tools.automix
运行结束会在项目目录下产生tmp文件夹,里面有新的数据集
修改 conf/config.yaml
.中的 dset.musdb
修改 conf/dset/auto_mus.yaml
中的 dset.wav
( OUTPATH
)
(4)解压outputs.tar.gz
tar xvf outputs.tar.gz
三、训练
训练有三种命令
我只尝试了第二种
(1)默认,cpu
dora info -f 81de367c
this will show the hyper-parameter used by a specific XP.
Be careful some overrides might present twice, and the right most one will give you the right value for it.
这将显示特定XP使用的超参数。
请注意,有些覆盖可能会出现两次,最正确的一次将为您提供正确的值。