geowatch.tasks.uky_temporal_prediction.predict module

geowatch.tasks.uky_temporal_prediction.predict.extract_features(checkpoint, data_folder, kwcoco_file, output_kwcoco, output_folder, image_ids, sensor, panchromatic, device='cuda')[source]

Function for extracting features given kwcoco reference to data and annotations. Output is copy of input kwcoco file with path towards saved pixel-wise features for image_id x saved under dset.imgs[x][‘time_sort_features’].

Parameters:
  • checkpoint – Path to checkpoint of lightning module. Default is UNet base trained on image sorting into before/after.

  • data_folder – Path to dvc repo

  • kwcoco_file – Path to kwcoco file with data annotations

  • output_kwcoco – Destination of output kwcoco file. set to same path as kwcoco_file to simply add paths to feature tensors to the existing file

  • output_folder – destination for feature tensors, stored as .pt files

  • image_ids – Set of image ids (corresponding to image ids in kwcoco_file) from which to extract features. image_ids from non-specified sensors will be skipped. Set to 0 to include all available images.

  • sensor – Choose from S2, LC, or WV. Note: with default checkpoint, only S2 (3 channel) images can be processed

  • panchromatic – Set to True to return panchromatic (single channel) WV images where applicable. Otherwise 8 channel images will be returned.

geowatch.tasks.uky_temporal_prediction.predict.main()[source]