Noise2Noise音频去噪项目使用教程
1. 项目的目录结构及介绍
Noise2Noise-audio_denoising_without_clean_training_data项目的目录结构如下:
Noise2Noise-audio_denoising_without_clean_training_data/
│
├── README.md
├── requirements.txt
├── datasets/
│ ├── UrbanSound8K/
│ └── Voice Bank + DEMAND/
├── weights/
├── Pretrained_Weights/
├── metrics.py
├── train.py
├── test.py
└── config.yaml
目录结构介绍
- README.md: 项目说明文件,包含项目的基本信息和使用指南。
- requirements.txt: 项目依赖包列表。
- datasets/: 存放训练和测试数据集的目录。
- UrbanSound8K/: 包含真实世界噪声样本的数据集。
- Voice Bank + DEMAND/: 包含语音样本的数据集。
- weights/: 训练过程中保存的模型权重文件。
- Pretrained_Weights/: 预训练模型权重文件。
- metrics.py: 计算模型性能指标的脚本。
- train.py: 训练模型的脚本。
- test.py: 测试模型的脚本。
- config.yaml: 项目配置文件。
2. 项目的启动文件介绍
train.py
train.py
是用于训练模型的主要脚本。启动训练的命令如下:
python train.py --config config.yaml
test.py
test.py
是用于测试模型的主要脚本。启动测试的命令如下:
python test.py --config config.yaml --weights Pretrained_Weights/model.pth
3. 项目的配置文件介绍
config.yaml
config.yaml
是项目的配置文件,包含训练和测试的各种参数设置。以下是配置文件的部分内容示例:
train:
batch_size: 32
epochs: 100
learning_rate: 0.001
noise_type: "UrbanSound8K"
test:
batch_size: 16
noise_type: "UrbanSound8K"
配置文件参数介绍
-
train: 训练相关参数
- batch_size: 训练批次大小。
- epochs: 训练迭代次数。
- learning_rate: 学习率。
- noise_type: 噪声类型,如 "UrbanSound8K" 或 "White Gaussian noise"。
-
test: 测试相关参数
- batch_size: 测试批次大小。
- noise_type: 噪声类型,如 "UrbanSound8K" 或 "White Gaussian noise"。
通过修改 config.yaml
文件中的参数,可以调整训练和测试的行为。