ai-med / DiaMond

Official pytorch implementation of Paper - DiaMond: Dementia Diagnosis with Multi-Modal Vision Transformers Using MRI and PET - WACV 2025
GNU General Public License v3.0
7 stars 1 forks source link

data #1

Open tantantan007 opened 1 week ago

tantantan007 commented 1 week ago

打扰,能说明一下数据怎么制作吗,或者上传数据的代码,我手上有nii的配对数据,还有一个问题,两个单模态的数据经过linear层后,regbn之前,特征尺寸变成多少了呢,似乎regbn处理三维或者二维数据显存要求很大

Yiiitong commented 2 days ago

Hi,

Thanks for the questions. For the creation of hdf5 dataset, you can refer to the official tutorial here: https://docs.h5py.org/en/stable/high/dataset.html, so that the data follow a hierarchical format with its ID as the group name, including the following entries:

After the linear layer and before RegBN, the dimension of the features for the individual modality becomes 128 for 2-class classification, and 192 for 3-class classification. RegBN indeed requires large memory for processing whole 2D/3D input, thus we use it on the latent features in the late stage to save memory.