This module has functions to generate the burned areas predictions.

open_mat[source]

open_mat(fn, slice_idx=None, *args, **kwargs)

_crop[source]

_crop(x, size, row_pct:uniform=0.5, col_pct:uniform=0.5)

image2tiles[source]

image2tiles(x, step=100)

tiles2image[source]

tiles2image(tiles, image_size, size=128, step=100)

get_preds[source]

get_preds(model:Module, dl:DataLoader, pbar:Union[MasterBar, ProgressBar, NoneType]=None, cb_handler:Optional[CallbackHandler]=None, activ:Module=None, loss_func:Optional[Callable[Tensor, Tensor, OneEltTensor]]=None, n_batch:Optional[int]=None)

Tuple of predictions and targets, and optional losses (if loss_func) using dl, max batches n_batch.

predict_one[source]

predict_one(iop:InOutPath, times:list, weights_files:list, region:str, threshold=0.5, slice_idx=None, product='VIIRS750')

predict_time[source]

predict_time(path:InOutPath, times:list, weight_files:list, region, threshold=0.05, save=True, max_size=2000, buffer=128, product='VIIRS750', output='data')

predict_month[source]

predict_month(iop, time, weight_files, region, threshold=0.5, save=True, slice_idx=None)

predict_nrt[source]

predict_nrt(iop, time, weights_files, region, threshold=0.5, save=True)

split_mask[source]

split_mask(mask, thr=0.5, thr_obj=1)