Skip to content

Version 1.0.0

Latest
Compare
Choose a tag to compare
@dbuscombe-usgs dbuscombe-usgs released this 21 Oct 19:47
· 56 commits to main since this release
9b5c648

Synposis

Implementation overview

Implementation includes the following user choices

make_nd_datasets.py

  1. use of datasets with or without augmentations, controlled by the 'mode' parameter
  2. an efficient compressed file storage format, npz (see here)
  3. images and labels are resized to a so-called 'TARGET SIZE' for the purposes of model training, but model inference can be applied to full-size imagery
  4. creates a subset of augmented and non-augmented example image-label overlays for verification of npz file contents
  5. supports on-the-fly label filtering using morphological operations to remove class islands and holes smaller than a threshold size
  6. supports on-the-fly class-remapping (recoding integer label by merging classes)

train_model.py

  1. available loss functions: a) Dice, b) weighted Dice, c) categorical crossentropy, d) hinge, e) kullback-Leibler divergence
  2. single and multi-GPU training
  3. highly configurable learning rate scheduler
  4. models are evaluated by keeping track of multiple metrics including a) mean IoU (Intersection over Union), b) mean Dice (Jaccard), c) overall accuracy, d) mean frequency weighted IoU, e) Matthews Correlation Coefficient, f) per-class precision, g) per-class recall, and h) per-class F1 score
  5. an efficient data throughput pipeline using tfdatasets, including batching and auto pre-fetching
  6. available models: UNet, residual UNet, and 'satellite' UNet
  7. training employs early stopping and checkpoints.
  8. model weights are saved in h5 format, and utility script is available for conversion to a portable model

seg_images_in_folder.py

  1. supports single model application, and model ensembling
  2. supports simple softmax thresholding and per-image Otsu thresholding for 2-class problems (binary segmentation)
  3. creates greyscale and color label outputs
  4. supports per-label postprocessing using a Conditional Random Field

Contribution credits

Package maintainers:

  1. @dbuscombe-usgs
  2. @ebgoldstein

Contributors:

  1. @2320sharon
  2. @CameronBodine
  3. @venuswku

Future releases

Planned future releases will incorporate planned extensions in at least 2 areas:

  1. switching from keras image augmentation to a third party library such as albumentations
  2. more control over use of train, validation, and test subsets in model training and evaluation
  3. more model architectures such as U++ net, U^2 net, attention Unet (etc)