This module has functions to generate the burned areas predictions for near real time operational applications.
paths = ProjectPath('data')
test_eq(sorted([o.name for o in paths.path.iterdir()]),
['config', 'dataset', 'hotspots', 'ladsweb', 'outputs'])
manager = RunManager(paths, 'PI')
df = manager.update_hotspots('Europe', save=False)
plt.scatter(df.longitude, df.latitude);
The hotspots_region
name should be defined according with the image bellow. Names with multiple words use _
in place of the spaces. More info here: https://firms.modaps.eosdis.nasa.gov/active_fire/#firms-txt
IPython.display.Image(url="https://firms.modaps.eosdis.nasa.gov/images/Regions_500px.jpg")
Running all processes looks like this:
region = 'PI'
hotspots_region = 'Europe'
paths = ProjectPath('../hide/nrt_test')
weight_files = ['banetv0.20-val2017-fold0.pth',
'banetv0.20-val2017-fold1.pth',
'banetv0.20-val2017-fold2.pth']
manager = RunManager(paths, region)
manager.update_hotspots(hotspots_region)
manager.download_viirs()
manager.preprocess_dataset()
manager.get_preds(weight_files)
You can easily run all this process using the console script banet_nrt_run
.