Doodleverse / segmentation_gym

A neural gym for training deep learning models to carry out geoscientific image segmentation. Works best with labels generated using https://github.com/Doodleverse/dash_doodler
MIT License
45 stars 11 forks source link

Unpack files from vstack if files not in subfolder #133

Closed CameronBodine closed 1 year ago

CameronBodine commented 1 year ago

When running make_datasets.py for the first time, I would get an error at:

https://github.com/Doodleverse/segmentation_gym/blob/43edaaf445c21727d2fc4a7658521d655733c3c5/make_dataset.py#L340

because of the vstack operation after moving resized images into an images subfolder at:

https://github.com/Doodleverse/segmentation_gym/blob/43edaaf445c21727d2fc4a7658521d655733c3c5/make_dataset.py#L310-L311

Proposed Fix Unpack the vstack on line 313 with:

files = [f[0] for f in files]

NOTE: For some reason the github file comparison shows a bunch of other changes, but the one I recommended above at line 313 is the only actual change.

dbuscombe-usgs commented 1 year ago

Thanks Cam for this contribution! I wonder if you could merge this bug fix with your proposal to extend the filtering to multiclass? https://github.com/Doodleverse/segmentation_gym/issues/132

CameronBodine commented 1 year ago

Will do!