This module has functions to generate the burned areas predictions.

open_nc[source]

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

crop[source]

crop(im, r, c, size=128)

crop image into a square of size sz,

image2tiles[source]

image2tiles(x, step=100, size=128)

tiles2image[source]

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

get_preds[source]

get_preds(tiles, model, weights=None, verbose=False)

predict_one[source]

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

save_netcdf[source]

save_netcdf(file, data:dict, region:Region, crop=None)

inspect_netcdf[source]

inspect_netcdf(file, var='preds', crop=None)

load_netcdf[source]

load_netcdf(file)

predict_time[source]

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

predict_month[source]

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

predict_nrt[source]

predict_nrt(path:InOutPath, time, weight_files:list, region:Region, threshold=0.1, save=True, max_size=2000, buffer=128, product='VIIRS750', verbose=False)

split_mask[source]

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