for paper "DINOv3-Guided Cross Fusion Framework for Semantic-aware CT generation from MRI and CBCT"
set the right configuration in './file_config' and run:
python train.py --gpu 0
python test.py --gpu 0
python evaluation.py --gpu 0
or run
python main.py --gpu 0这是一个用于医学图像翻译(image translation)的通用深度学习框架
本框架采用配置文件+模块化的形式运行 对于每一个自定义模型 需要自己编写配置文件(训练+测试),模型文件,网络文件,也可以通过配置文件调用已定义好的模型和网络
所有的数据集默认储存在'./file_dataset'中 实际路径以'.dataset.dataroot'指定
文件夹结构为
/dataset
├── trainA
│ ├── file1
│ ├── file2
│ └── ...
├── trainB
│ ├── file1
│ ├── file2
│ └── ...
├── validationA
│ ├── file3
│ ├── file4
│ └── ...
├── validationB
│ ├── file3
│ ├── file4
│ └── ...
├── testA
│ ├── file5
│ ├── file6
│ └── ...
├── testB
│ ├── file5
│ ├── file6
│ └── ...
其中 train数据是必须的 validation和test的B部分则根据实际情况填充
对于paired training train的两个文件夹下面的文件名必须一一对应 某一个文件只在一个模态存在将会导致训练出错 unpaired training 的情况 则不对两种模态的数据集之间的关系做任何约束
文件的格式可以是自然图像的一般格式 例如.png,.jpg等 也可以是医学图像格式的.nii和.nii.gz
mask在训练/测试/计算指标时均可能使用
mask的默认存放地点在'./file_dataset'中
model用于定义深度学习模型 其中包含了初始化/损失函数/优化器/可视化输出 等的定义 使用'.model.model_name'指定
model的储存位置为'./code_model' 所有自定义的model类需要继承'base_model.py'中的'BaseModel' 且储存在名为'modelname_model.py'的文件中
在'./code_model'已有以下模型
'pix2pix_model' 'cycleGAN_model' 'UnetPlusPlus_model' 'vanillaSL_model': 适用于所有不特殊(即在计算损失等方面没有特别的算法)的全监督配对图像生成任务的模型
模型的backbone定义在'./code_network'文件夹中 一个网络文件中可以包含多个网络模型 因此同时使用'.network.filename'和'.betwork.netG'指定具体的网络
框架 https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix 配置文件 https://github.com/Janspiry/Palette-Image-to-Image-Diffusion-Models mambaunet swinunet unet++ grad-CAM wtconv https://github.com/bgu-cs-vil/wtconv
pip install dominate==2.6.0
pip install pandas einops timm simpleitk
simpleitk==2.3.1
torch==1.8.1 torchvision==0.9.1
conda create -n mamba python==3.10 -y pip install torch==2.0.1 torchvision==0.15.2 pip install packaging pip install mamba-ssm==1.2.0.post1 pip install causal-conv1d==1.2.0.post2 pip install fvcore
https://github.com/ziyangwang007/Mamba-UNet
https://blog.csdn.net/qq_57433916/article/details/138139534
pip install dominate==2.6.0 simpleitk==2.3.1 torch torchvision