mikevoets / jama16-retina-replication

JAMA 2016; 316(22) Replication Study
https://doi.org/10.1371/journal.pone.0217541
MIT License
110 stars 35 forks source link

dimensions.txt empty #3

Closed agaldran closed 6 years ago

agaldran commented 6 years ago

Hi Mike!

I finally managed to run smoothly the eyepacs.sh script, but now I encountered a different issue. When running train.py, I receive the following error:

line 50, in initialize_dataset
image_dim = [int(x) for x in image_dims[0].split('x')]
IndexError: list index out of range

I have been debugging this, stopping the execution before that line, and apparently the program reads the image dimensions from a text file called dimensions.txt inside data/eyepacs/bin2/train. Unfortunately, that text file seems to be empty. I've checked, and the same thing happens in the val and test folders. Maybe I've done sth wrong?

Thanks!

P.S.: off-topic, but this is more a comment than an issue. I first created a virtual environment with Python 3.5, but apparently your code needs Python 3.6 in order to understand the format functions the way you are using them. May I suggest adding to the requirements in the readme.md ''Python >3.6'?'

mikevoets commented 6 years ago

That's strange. I was not able to reproduce your error, so I don't really know what went wrong in your case. I just updated the code such that the image dimensions are not read from dimensions.txt file, but default 299 by 299 pixels. This is the dimension that the script resizes the pictures to, so it should be OK. So please pull the code again and try to run ./train.py.

I also specified the version of Python in the requirements, thanks for noticing!