forest-prediction

Deep learning for deforestation classification and forecasting in satellite imagery.
https://github.com/DS3Lab/forest-prediction

Keywords from Contributors

optimizer transforms archiving measur conversion animals compose generic observation computer

Last synced: over 1 year ago
JSON representation

Acceptance Criteria

Repository metadata

πŸ›° Deep learning for deforestation classification and forecasting in satellite imagery

README.md

forest-prediction

πŸ›°Deep learning for deforestation classification and forecasting in satellite imagery

Overview

In this repository we provide implementations for:

  1. Data scraping (Tile services and Google Earth Engine)
  2. Forest prediction (Semantic Segmentation)
  3. Video prediction (Lee et al, 2018)
  4. Image to image translation (Isola et al, 2017)

Installation

$ git clone https://github.com/DS3Lab/forest-prediction.git
$ cd forest-prediction/semantic_segmentation/unet
$ conda create --name forest-env python=3.7
$ ./install.sh
$ source activate forest-env

Running

You can train the models for semantic segmentation by simply running:

(forest-env) $ cd semantic_segmentation/unet
(forest-env) $ python train.py -c {config_path} -d {gpu_id}

For multi-GPU training, set gpu_id to a comma-separated list of devices, e.g.
-d 0,1,2,3,4
This will produce a file having the time in which the script was executed as the folder name.
It will be saved in the "save_dir" value from the JSON file, under "trainer". Under save_dir, it will create
a log file, where you can check Tensorboard, and a model file, where the model is going to be stored.

Testing

You can test the models for semantic segmentation by running:

(forest-env) $ python simple_test.py -r {model_saved_path/model.pth} -d {gpu_id}

It will run the predictions and save the corresponding outputs in model_saved_path. To keep an order of the images, set both batch_size and num_workers to 1.

Configuration

You can change the type of model used, and its configuration by altering (or creating) a config.json file.

Structure of config.json

The fields of the config file are self explanatory. We explain the most important ones.

  • name: indicates the name of the experiment. It is the folder in which both the training logs and models are going to be stored
  • n_gpu: for multi-GPU training, it is necessary to specify how many gpus it is going to use. For instance, if the user specifies -d 0,1, in order to use both gpus n_gpu needs to be set up to 2. If it is set up to 1, it will only use gpu 0, if it is set up to a number higher than 2, then it will yield an error.
  • arch: it specifies the model that will be used for training/testing purposes.
  • data_loader_train and data_loader_val: data loaders for training and validation purposes. For testing, only data_loader_val is used.

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: over 1 year ago

Total Commits: 352
Total Committers: 4
Avg Commits per committer: 88.0
Development Distribution Score (DDS): 0.134

Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
lming l****g@s****h 305
lming24 3****4 42
David Dao c****o@g****m 3
dependabot[bot] 4****] 2

Committer domains:


Issue and Pull Request metadata

Last synced: over 1 year ago

Total issues: 0
Total pull requests: 8
Average time to close issues: N/A
Average time to close pull requests: 4 months
Total issue authors: 0
Total pull request authors: 1
Average comments per issue: 0
Average comments per pull request: 0.63
Merged pull request: 2
Bot issues: 0
Bot pull requests: 8

Past year issues: 0
Past year pull requests: 1
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 1

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/DS3Lab/forest-prediction

Top Issue Authors

Top Pull Request Authors

  • dependabot[bot] (8)

Top Issue Labels

Top Pull Request Labels

  • dependencies (8)

Dependencies

pix2pix/requirements.txt pypi
  • dominate >=2.3.1
  • torch >=0.4.1
  • torchvision >=0.2.1
  • visdom >=0.1.8.3
semantic_segmentation/unet/requirements.txt pypi
  • Pillow ==8.1.1
  • matplotlib ==3.0.3
  • tensorboardX ==1.8
  • tqdm ==4.32.2
video_prediction/requirements.txt pypi
  • h5py *
  • lpips-tf *
  • opencv-python *
  • scikit-image *
  • scipy *
  • tensorflow-gpu >=1.9.0
pix2pix/docs/Dockerfile docker
  • nvidia/cuda 9.0-base build
pix2pix/environment.yml pypi
  • Pillow ==5.0.0
  • dominate ==2.3.1
  • numpy ==1.14.1
  • visdom ==0.1.7

Score: 4.5217885770490405