Skip to content

Sgsaram/fguard

Repository files navigation

Forest Guard CLI

Check our website for documentation and more info - https://sgsaram.github.io/fguard/.

About

Our goal is to look for deforestation area and track them in time period on satellite images. For example:

We tried to use unsupervised and supervised learning on this problem and got two best algorithms:

  1. K-Means
  2. U-Net model

Of course we are taking information from date of photos (It takes a long time for a forest to grow back). The main problem are clouds and "even human can't be 100% sure if this pixel is forest or deforestation".

example

Data

We download data from Sentinel Hub (https://www.sentinel-hub.com). We work only with L1C and L2A satellites. You need API token for this.

Preparation

PyPI

  • Just install the package:
pip install fguard

Install via repo

  • Clone the repository (it will download to fguard folder):
git clone https://github.com/Sgsaram/fguard.git fguard
  • Go to the folder:
cd fguard

Use venv!

  • Install requirements using this command:
pip install -r requirements/prod.txt
  • Wake the setup.py up:
pip install .

This will give you the opportunity to use fguard cli tool.

Usage

  • Add credentials to a programm:
fguard config [–f “path/to/config/settings.toml”] | [--id “YOUR_ID” --token “YOUR_TOKEN”]
  • Request:
fguard request [–f “path/to/config/settings.toml”] | [-c  c1 c2 c3 c4 -t t1 t2] “output/folder” {-s "size" –d "detector" --isolate}

This will save images in output folder. Also saves json files of all events (new, add, merge).

  • Erase cache, config file, etc:
fguard delete [--cache] | [--config] | [--model]
  • To use net detector you need to download model:
fguard net --update

It can be also used to update model (we still train it).

For more info check our website - https://sgsaram.github.io/fguard/.

Example of toml settings file

  • config-settings-example.toml
[config]
id = ""
token = ""
  • request-settings-example.toml
coordinates = [ 42.65614, 59.58242, 42.73579, 5952529 ]
time = [ "2017.12.01", "2023.02.28" ]

Some images on what program gives as a result

example example example

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages