amiralansary / rl-medical

Deep Reinforcement Learning (DRL) agents applied to medical images
Apache License 2.0
177 stars 69 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'list_of_test_filenames.txt' #1

Closed crypdick closed 6 years ago

crypdick commented 6 years ago

Hi, I think this is a really cool project and I'm trying to use it in my research. I am trying to reproduce your results but I run into trouble because I don't have the training data:

 ~/bin/tensorpack-medical/examples/LandmarkDetection/DQN   master ●  python DQN.py --algo DQN --gpu 0
WARN: gym.spaces.Box autodetected dtype as <class 'numpy.uint8'>. Please provide explicit dtype.
Traceback (most recent call last):
  File "DQN.py", line 205, in <module>
    screen_dims=IMAGE_SIZE)
  File "/home/ubuntu/bin/tensorpack-medical/examples/LandmarkDetection/DQN/medical.py", line 157, in __init__
    self.files = filesListFetalUSLandmark(directory,files_list)
  File "/home/ubuntu/bin/tensorpack-medical/examples/LandmarkDetection/DQN/sampleTrain.py", line 321, in __init__
    self.files_list = [line.split('\n')[0] for line in open(files_list)]
FileNotFoundError: [Errno 2] No such file or directory: 'list_of_test_filenames.txt'

Where can I get the dataset? I see in your paper that you cite another paper's dataset, but I did not see a link to that dataset anywhere in that paper, either.

crypdick commented 6 years ago

Same issue with AutomaticViewPlanning:

  File "/home/ubuntu/bin/tensorpack-medical/examples/AutomaticViewPlanning/DQN/sampleTrain.py", line 244, in __init__
    self.files_list = [line.split('\n')[0] for line in open(files_list)]
FileNotFoundError: [Errno 2] No such file or directory: 'list_of_test_filenames.txt'
amiralansary commented 6 years ago

sampleTrain.py was written specifically for the data used for the paper. It is easy to read and can be modified for any other data. I will modify it to be more generic for any list files.

When I will have some time, I will also add a pre-trained model on some public data and test subjects to visualise an agent playing.

crypdick commented 6 years ago

@amiralansary ah, ok. So your dataset is not public?

amiralansary commented 6 years ago

The fetal ultrasound data are not public. The MR brain data are public from ADNi datasets http://adni.loni.usc.eduprotocols/ For my experiments, they were pre-processed and reorganised in specific directories. This can be done for any other medical data. I will make these data readers more generic and easier to modify in the near future. Meanwhile I will probably upload a pre-trained model and few sample images from the ADNI database that can be used for playing the agents.

crypdick commented 6 years ago

A handful of pre-processed training example would be greatly appreciated! I just want to get the code up and running so that I can fork it to try to make a Vaa3D plug-in.

crypdick commented 6 years ago

@amiralansary Which one of the ADNi datasets? I've searched through your 2018 paper and Li et al 2018 and I didn't find which one was used. Also, I'd be happy with just a single training example, just to get your code running.

amiralansary commented 6 years ago

@crypdick I just pushed a pre-trained model on the adni data, as well as 10 subjects from the test unseen data. Let me know if you could not manage to get the code running.

crypdick commented 6 years ago

@amiralansary tested, and everything is working!