dimzog commited on
Commit
fc7bf9c
1 Parent(s): dc23d05

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -1
README.md CHANGED
@@ -39,7 +39,7 @@ source .venv/bin/activate
39
  pip3 install numpy pandas geopandas rasterio rioxarray xarray netCDF4 h5netcdf transformers datasets
40
  ```
41
 
42
- #### Setup more libraries, if you want to check a minimum working example ()
43
  ```
44
  pip3 evaluate accelerate matplotlib
45
  ```
@@ -53,6 +53,37 @@ from datasets import load_dataset
53
  dataset = load_dataset('AUA-Informatics-Lab/eo4wildfires')
54
  ```
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  ### Cite the dataset
57
  ```
58
  @Article{fire7110374,
 
39
  pip3 install numpy pandas geopandas rasterio rioxarray xarray netCDF4 h5netcdf transformers datasets
40
  ```
41
 
42
+ #### Setup more libraries, if you want to check a minimum working example (https://huggingface.co/datasets/AUA-Informatics-Lab/eo4wildfires/blob/main/how-to-use-eo4wildfires.ipynb)
43
  ```
44
  pip3 evaluate accelerate matplotlib
45
  ```
 
53
  dataset = load_dataset('AUA-Informatics-Lab/eo4wildfires')
54
  ```
55
 
56
+ #### Plot some examples
57
+ ```
58
+ import matplotlib.pyplot as plt
59
+ import numpy as np
60
+
61
+ # Convert dataset arrays into numpy arrays
62
+ dataset.set_format('np')
63
+
64
+ fig, axes = plt.subplots(3, 2, figsize=(12, 20))
65
+
66
+ axes[0][0].imshow(dataset['validation'][0]['burned_mask']*255)
67
+ axes[0][1].imshow((dataset['validation'][0]['S2A'][3:0:-1]*255).astype('int').transpose(1, 2, 0))
68
+
69
+ axes[1][0].imshow(dataset['validation'][16]['burned_mask']*255)
70
+ axes[1][1].imshow((dataset['validation'][16]['S2A'][3:0:-1]*255).astype('int').transpose(1, 2, 0))
71
+
72
+ axes[2][0].imshow(dataset['validation'][789]['burned_mask']*255)
73
+ axes[2][1].imshow((dataset['validation'][789]['S2A'][3:0:-1]*255).astype('int').transpose(1, 2, 0))
74
+
75
+ plt.show()
76
+ ```
77
+
78
+ ![plot](plot.png)
79
+
80
+ #### Load dataset
81
+ ```
82
+ from datasets import load_dataset
83
+
84
+ dataset = load_dataset('AUA-Informatics-Lab/eo4wildfires')
85
+ ```
86
+
87
  ### Cite the dataset
88
  ```
89
  @Article{fire7110374,