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

Update `train_model` to automatically compute NCLASSES from data #85

Closed dbuscombe-usgs closed 2 years ago

dbuscombe-usgs commented 2 years ago

See: https://github.com/Doodleverse/doodleverse_utils/issues/10#issuecomment-1267359482

New dice and IoU functions are agnostic to, and do not check, correct specification of NCLASSES. Additionally, cat and kld loss (and presumably others) fail when NCLASSES is incorrectly specified due to operator error

The above thread proposes a simple solution, that has been tested and works. Should appear in the next release.

dbuscombe-usgs commented 2 years ago

The code block should be inserted after

val_ds = val_ds.prefetch(AUTO) #

dbuscombe-usgs commented 2 years ago

this is already implemented in this branch of the code: https://github.com/Doodleverse/segmentation_gym/tree/new_makedatasets