cchen-cc / SIFA

[TMI'20, AAAI'19] Synergistic Image and Feature Adaptation
249 stars 70 forks source link

Prepocessed Abdominal Data #51

Closed YaoZhang93 closed 2 years ago

YaoZhang93 commented 2 years ago

Hi Cheng,

Thanks for your great work. I am following your work but failed to make the experiments on abdominal organ segmentation in your paper. Could you please kindly release the preprocessed abdominal data?

Best, Yao

cchen-cc commented 2 years ago

Hi, you can find the preprocessed abdominal data here https://drive.google.com/file/d/1C6UzEeHIxjZpeo0FIEU9uaHFtQx-LT-R/view?usp=sharing .

dongdongtong commented 2 years ago

Hi, Cheng,

Thanks for your kindly dataset sharing. I have two questions below. 1) I found the val.txt contains the abdominal test cases (i.e., CT 1/9/30/32/33/39 and MRT2 1/13/32/38/). Does it mean that you evaluate your 2D adapted models using the average 2D Dice of the augmented axial slices in the val.txt other than the average 3D Dice of 3D nii.gz files like the cardiac evaluation? 2) I want to convert your .tfrecords files to numpy arrays but I do not know the settings of decomp_feature like below. Could you plz show me the dataloader.py to load the tfrecords of the abdominal dataset, which will help me a lot for converting data format: https://github.com/cchen-cc/SIFA/blob/be5b792ecb7ed85f533bbb91223a7278e969b12d/data_loader.py#L10-L23

Best, Dong

dongdongtong commented 2 years ago

Hi, Cheng,

Thanks for your kindly dataset sharing. I have two questions below.

  1. I found the val.txt contains the abdominal test cases (i.e., CT 1/9/30/32/33/39 and MRT2 1/13/32/38/). Does it mean that you evaluate your 2D adapted models using the average 2D Dice of the augmented axial slices in the val.txt other than the average 3D Dice of 3D nii.gz files like the cardiac evaluation?
  2. I want to convert your .tfrecords files to numpy arrays but I do not know the settings of decomp_feature like below. Could you plz show me the dataloader.py to load the tfrecords of the abdominal dataset, which will help me a lot for converting data format: https://github.com/cchen-cc/SIFA/blob/be5b792ecb7ed85f533bbb91223a7278e969b12d/data_loader.py#L10-L23

Best, Dong

For the 2) question, I finally found the decomp_feature is:

decomp_feature = {
        'dsize_dim0': tf.FixedLenFeature([], tf.int64),  # 256
        'dsize_dim1': tf.FixedLenFeature([], tf.int64),  # 256
        'data': tf.FixedLenFeature([], tf.string),
        'label': tf.FixedLenFeature([], tf.string)
    }
EnQing626 commented 1 year ago

@dongdongtong Hi dong. Can I ask how you convert .tfrecords files to numpy arrays? I'm currently using tfrecord in pytorch to read them, but I can't successfully read "data_vol" as an image. Thank you very much.

dongdongtong commented 1 year ago

@EnQing626 It's been a long time. If you are familiar with the IO of tensorflow1.x, you can just use the following features to extract the numpy.ndarray data or you can just simulate the style of the dataloader. It needs only a little modification and the transformation will be done.

decomp_feature = {
        'dsize_dim0': tf.FixedLenFeature([], tf.int64),  # 256
        'dsize_dim1': tf.FixedLenFeature([], tf.int64),  # 256
        'data': tf.FixedLenFeature([], tf.string),
        'label': tf.FixedLenFeature([], tf.string)
    }
EnQing626 commented 1 year ago

@dongdongtong Many thanks for your help, I tried to use tensorflow 1.4.0 as you suggested and got numpy.ndarray. Thanks a lot!