Water Mapping from Remote Sensing Images
Project description
WaterMap Library
Watnet and DeepWaterMap Method for Water Detection in Satellite Imagery.
This library contains Watnet and DeepWaterMap methods for the detction of surface water in satellite imagery.
Input Image:
Input image should be a six band tif image containing the following bands: red, green, blue, near infrared, shortwave infrared 1 and shortwave infrared 2 (the band number of 2, 3, 4, 8, 11, and 12 of sentinel-2 image).
How to use this library:
--Step 1
Enter the following commands for installing the library, and then configure the python and deep learning environment. The deep learning software used in this repo is Tensorflow 2.
pip install WaterMap
-- Step 2
- Output in array form: In the pytest.py file provide the input image path and run the file to get ouptut in array form array
- Output in png form: In the pytest.py file provide input to the "out_png_path" to store the output path to a particular path.
- Output in tif form: In the pytest.py file provide input to the "out_tif_path" to store the output path to a particular path.
- All the output can also be achieved simultaneously by providing both the png and tif output path.
- Example Code for watnet method:
wn.predict(img_path, out_png_path='sample_images/dwm_coastal1.png')
- Example Code for deepwatermap method:
dwm.predict(img_path, out_png_path='sample_images/dwm_coastal1.png')
Thresholding Option:
There is also a option to provide the threshold to both th methods as an input:
- Example Code for deepwatermap method:
- default threshold for watnet is 0.5 and for deepwatermap is 0.35
dwm.predict(img_path, out_png_path='sample_images/dwm_coastal1.png',threshold='0.5')
Downloading the Image from Google Earth Engine on Google Drive
- On google earth engine open code editor.
- Select the area of interest from the map and run the following code:
var data = ee.ImageCollection("COPERNICUS/S2_SR")
var image= data.filterDate('2022-07-22','2022-07-23')
var dataset = image.filterBounds(aoi).select(['B2', 'B3', 'B4','B8', 'B11', 'B12']);
print(dataset);
Map.addLayer(dataset);
Export.image.toDrive({
image:dataset.mosaic(),
description:'sentinel',
scale:10,
region:aoi,
})
- Run the above code and select the task option on the left hand side.
- There a run option will popup. Click on it.
- An pop window will be open afterwards asking the folder details to save the image and the file format.
- Select the file format as tif
- A six band tif image will now be downloaded in google drive.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file WaterMap-1.0.1-py3-none-any.whl.
File metadata
- Download URL: WaterMap-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4592fee245438cac6a5e8caeda62da66c1c384bace937d9c010a777c1d5ce158
|
|
| MD5 |
b1d24440e978731f22c4ad967c0abd3e
|
|
| BLAKE2b-256 |
da9e8c2f69c9f460c85fa17982e8a2f1d7b9826873e2ba58cfef6478a8b5cdd8
|