Eurosat No such file or directory: 'data/eurosat-train.txt'
Description
With download=True this should be downloaded..?
Steps to reproduce
from torchgeo.datasets import EuroSAT
>>> ds = EuroSAT(root="data", download=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/teamspace/studios/this_studio/torchgeo/torchgeo/datasets/eurosat.py", line 144, in __init__
with open(os.path.join(self.root, self.split_filenames[split])) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'data/eurosat-train.txt'
Version
0.8.0.dev0
It's possible you downloaded val/test before downloading train and it only downloaded eurosat-val.txt? Either way we should fix this.
Right run this in a fresh studio and no issue, possibly the error arose since in my earlier studio I had already used EuroSAT100DataModule..?
OK I can get a similar error with Eurosat100 if I first use regular eurosat:
FileNotFoundError: [Errno 2] No such file or directory: 'data/eurosat-100-train.txt'
Ah, that would do it. You could use a unique path for your dataset, but we could also fix this to check for the split file download name.
I would actually expect that with root="data" there would be a generated folder structure of something like data/eurosat100/files
That's how torchvision works. That's explicitly not how TorchGeo works, because I didn't want people who use root='data/eurosat100' to find that nothing works correctly because they were too specific.