weigertlab / spotiflow

Accurate and efficient spot detection for microscopy data
BSD 3-Clause "New" or "Revised" License
46 stars 4 forks source link

Data format requires a `val` folder instead of a `validation` folder #3

Closed ajinkya-kulkarni closed 4 months ago

ajinkya-kulkarni commented 4 months ago

The docs specifies a validation folder instead of the val folder.

spots_data
├── train
│   ├── img_001.csv
│   ├── img_001.tif
|   ...
│   ├── img_XYZ.csv
|   └── img_XYZ.tif
└── val
    ├── val_img_001.csv
    ├── val_img_001.tif
    ...
    ├── val_img_XYZ.csv
    └── val_img_XYZ.tif

is the correct format. Else you get this error:

---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
Cell In[11], line 1
----> 1 trX, trY, valX, valY, testX, testY = get_data("spots_data", include_test=True)

File ~/miniconda3/envs/spotiflow/lib/python3.10/site-packages/spotiflow/utils/utils.py:273, in get_data(path, normalize, include_test)
    271 test_path = path/"test"
    272 assert (train_path).exists(), f"Given data path {path} does not contain a 'train' folder!"
--> 273 assert (val_path).exists(), f"Given data path {path} does not contain a 'val' folder!"
    274 if include_test:
    275     assert (test_path).exists(), f"Given data path {path} does not contain a 'test' folder!"

AssertionError: Given data path spots_data does not contain a 'val' folder!
AlbertDominguez commented 4 months ago

Fixed in #4 . Thanks!