note:以下两个工作均为使用CNNDetection的训练基本框架下修改,具体网络在network文件下进行自己修改完成。
第一项工作(ForgeryNIR)
一、Cross-Modality Knowledge Distillation (CMKD)
1.使用方法
安装包
- install Pytorch (pytorch.org)
pip install -r requirements.txt
(1) 数据准备
下载好需要的数据集,按照如下方式进行组织
ForgeryNIR
|--train
|--ForgeryNIR-std
|--0_real
|--cyclegan
|--progan
|--stylegan
|--stylegan2
|--ForgeryNIR-rand
...
|--ForgeryNIR-mix
...
|--test
|--ForgeryNIR-std
|--0_real
|--cyclegan
|--progan
|--stylegan
|--stylegan2
...
|--val
|--ForgeryNIR-std
|--0_real
|--cyclegan
|--progan
|--stylegan
|--stylegan2
...
(2) 训练模型
我们使用 checkpoints/[model_name]/model_epoch_best.pth
作为我们训练的最优模型。
- 首先我们需要使用可见光数据集(这里用的wildDeepfake)预训练一个教师模型并保