LiaoShiqi97 / DSCM_fundus

1 stars 0 forks source link

Unable to find the dataset #4

Closed HarshaSatyavardhan closed 1 year ago

HarshaSatyavardhan commented 1 year ago

I tried to reproduce the results but i am receiving this error

  File "/usr/local/lib/python3.9/dist-packages/pytorch_lightning/trainer/trainer.py", line 444, in fit
    self.data_connector.prepare_data(model)
  File "/usr/local/lib/python3.9/dist-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 60, in prepare_data
    model.prepare_data()
  File "/content/DSCM_fundus/deepscm/experiments/medical/base_experiment.py", line 172, in prepare_data
    data_dir = self.hparams.data_train_dir if hasattr(self.hparams, 'data_dir') else '/mnt/alpha/diabetes/MS/data/images_original/'
  File "/usr/local/lib/python3.9/dist-packages/pytorch_lightning/utilities/parsing.py", line 185, in __getattr__
    raise AttributeError(f'Missing attribute "{key}"') from exp
AttributeError: Missing attribute "data_train_dir"

can you elaborate on the datasets you are using for training and from where you are downloading them or generating them

LiaoShiqi97 commented 1 year ago

Hi, HarshaSatyavardhan.

Thanks for you interest in my work. The dataset is from maastricht study(https://www.demaastrichtstudie.nl/research/data-guidelines, you can follow this link to apply for dataset)[1]. And there is some alternative dataset you might use as well, rfmid(https://ieee-dataport.org/open-access/retinal-fundus-multi-disease-image-dataset-rfmid) Hope this answers your question.

[1] Miranda T Schram, Simone JS Sep, Carla J van der Kallen, Pieter C Dagnelie, Annemarie Koster, Nicolaas Schaper, Ronald Henry, and Coen DA Stehouwer. The maastricht study: an extensive phenotyping study on determinants of type 2 diabetes, its complications and its comorbidities. European journal of epidemiology, 29(6):439–451, 2014. 31

HarshaSatyavardhan commented 1 year ago

Thanks, hey I was trying to use this on some custom dataset other than medical one like CelebA dataset. it's becoming very hard to follow the code base as I am new to both pyro and normalising flows. can you provide some information on how should I need to proceed.

LiaoShiqi97 commented 1 year ago

Hi HarshaSatyavardhan, Glad you contact me again. Firstly, I suggest you follow the paper Deep Structural Causal Models for Tractable Counterfactual Inference(https://arxiv.org/abs/2006.06485) and its code. It has accesible dataset with itself so you can play with it. Secondly, I recoomend three documents:1) the offical document (https://docs.pyro.ai/en/stable/distributions.html), 2) a demo for probabilistic programming(https://willcrichton.net/notes/probabilistic-programming-under-the-hood/), 3) an easy guide (https://willcrichton.net/notes/probabilistic-programming-under-the-hood/).

Hope these answer your question.