MedMNIST & MedIMeta
收藏资源简介:
MedMNIST和MedIMeta是用于医学图像分析的数据集,包含了多种医学图像数据,如乳腺图像和器官图像。这些数据集用于训练和评估Conditional Variational Autoencoders (CVAEs),以生成隐私保护的合成特征向量,增加数据多样性和模型鲁棒性。
MedMNIST and MedIMeta are datasets for medical image analysis, which contain various types of medical imaging data such as mammographic images and organ images. These datasets are used to train and evaluate Conditional Variational Autoencoders (CVAEs) to generate privacy-preserving synthetic feature vectors, thereby enhancing data diversity and model robustness.
数据集概述
数据集描述
该数据集是通过使用条件变分自编码器(CVAE)在从大型预训练视觉基础模型中提取的特征向量上训练得到的。这些特征向量捕捉了局部和上下文信息,同时降低了维度。CVAE能够忠实地捕捉给定数据分布的嵌入空间,生成多样、尊重隐私且潜在无限的合成特征向量。
数据集创建流程
-
预处理:
- 使用预训练模型提取特征嵌入和相应标签。
- 存储特征嵌入和标签。
-
训练CVAE:
- 使用提取的特征嵌入训练CVAE,以捕捉训练分布,条件是相应的类别标签。
-
生成合成特征向量:
- 通过CVAE的冻结解码器,动态生成新的合成特征向量,条件是类别标签。
数据集使用
创建数据库
bash python create_db.py --dataset [dataset] --backbone [backbone]
数据库存储在assets/database/[train|val|test].npz。
匿名化
bash
python anonymize.py --dataset [dataset]
--anonymizer [kSAME|cvae]
--k [k, set if anonymizer == kSAME]
--seed [random seed, set if anonymizer == cvae]
匿名化数据库存储在assets/database/train_[anonymizer_id].npz。
训练和评估
bash python probing.py --dataset [dataset] --anonymizer [identity|kSAME|cvae] --k [k, set if anonymizer == kSAME] --seed [random seed] --output_root [where to store output logs]
对于噪声测试嵌入,使用以下命令: bash
for kSAME
python probing_noise.py --dataset [dataset]
--anonymizer [kSAME]
--k [k]
--seed [random seed]
--sigma [standard deviation of the injected noise]
--output_root [where to store output logs]
bash
for CVAE - online data generation
python probing_noise_cvae.py --dataset [dataset]
--anonymizer [cvae-online]
--variance [sampling variance of CVAE]
--seed [random seed]
--sigma [standard deviation of the injected noise]
--output_root [where to store output logs]




