Skip to content

Commit

Permalink
Merge pull request #129 from initze/version_bump
Browse files Browse the repository at this point in the history
Version bump
  • Loading branch information
initze authored May 8, 2024
2 parents 1fe5c80 + e9dc274 commit b5d06c3
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 3 deletions.
67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,124 +1,191 @@
# Changelog

## [0.10.2] - 2024-05-08

### Added

- re-added weights and biases to training module

### Changed

- bugfixes of postprocessing scripts
- code and syntax cleanup

## [0.10.1] - 2024-04-25

### Changed

- added gdal as pre-requirement to readme
- fixed path issue for postprocessing scripts

## [0.10.0] - 2024-04-24

### Added

- pip-installable packaging

### Changed

- entire project structure (to make it pip-installable)

## [0.8.0] - 2022-09-09

### Added

- added Unet3+ model
- added deep supervision loss plot

## [0.7.1] - 2022-08-02

### Added

- added learning rate scheduler (StepLR, ExponentialLR)
- added example configuration file

## [0.7.0] - 2022-03-29

### Added

- added singularity container definition

## [0.6.1] - 2022-03-22

### Changed

- fixed bug (crashed prepare_data.py for Planet Scenes)

## [0.6.0] - 2021-12-21

### Added

- data path selection for all scripts
- inference path selection for inference.py

### Changed

- overhauled data structure: disentangled from processing/code directory
- fixed masking bug (did not recognize udm values > 1) for PSOrthoTile data

## [0.5.5] - 2021-11-25

### Changed

- added support for Multi- and single-GPU trained models

## [0.5.4] - 2021-11-16

### Changed

- added Multi-GPU support for Training

## [0.5.3] - 2021-11-10

### Changed

- added support for PSOrthotile input (flexible input data resolution)

## [0.5.2] - 2021-08-18

### Changed

- fixed inference masking bug

## [0.5.1] - 2021-06-10

### Changed

- bugs from 0.5.0 fixed
- logfiles moved to logs directory
- completely moved to argparse (from docopt) for argument parsing
- (false) nodata removed from inference vector output

## [0.5.0] - 2021-05-19 - Broken Version

### Added

- Training/Inference/Data Preparation logs are now written to corresponding log files
- gdal configuration file
- minor code cleanup

## [0.4.2] - 2021-03-19

### Added

- shapefiles as inference output

### Changed

- improved inference control figures

## [0.4.1] - 2021-03-11

### Changed

- fixed broken inference

## [0.4.0] - 2021-03-01

### Added

- selection of different DL models and backbones
- implementation of augmentation types based on the albumentations package

## [0.3.3] - 2021-02-22

### Added

- added robust futureproof datasource sorting

## [0.3.2] - 2021-02-15

### Added

- added parallel preprocessing (setup_raw_data.py, prepare_data.py)

### Changed

- changed option parsing from docopt to argparse for preprocessing scripts

## [0.3.1] - 2021-02-08

### Changed

- fixed bug causing crash running inference.py

## [0.3.0] - 2021-01-26

### Added

- Named training runs

### Changed

- Loading Arctic DEM elevations and slopes locally
- fixed too low resolution bug (loading from Google Earthengine)
- minor code style fixes

## [0.2.1] - 2020-12-07

### Changed

- Metrics are now logged into CSV files: `train.csv`, `val.csv`
- xlabels of metrics plots in epochs
- fixed cropped xlabel in precision recall plot

## [0.2.0] - 2020-11-19

### Changed

- fixed wrong accuracy metrics

## [0.1.1] - 2020-10-30

### Added

- Slope visualization in tile-predictions

### Changed

- Color scheme in tile-predictions
- fixed printout of "label" to "skipped" during preprocessing stage of inference

Expand Down
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@

## Installation

### Environment setup

#### Python / conda

We recommend using a new conda environment from scratch

```bash
conda env create -n thaw_slump_segmentation python=3.10 mamba -c conda-forge
conda activate thaw_slump_segmentation
```

#### gdal

gdal incl. gdal-utilities (preferably version >=3.6) need to be installed in your environment, e.g. with conda/mamba

```bash
mamba install gdal>=3.6 -c conda-forge
```

### Package Installation

* Latest development version: `pip install git+https://github.com/initze/thaw-slump-segmentation`
* Latest release: `pip install https://github.com/initze/thaw-slump-segmentation/releases/download/untagged-f6739f56e0ee4c2c64fe/thaw_slump_segmentation-0.10.0-py3-none-any.whl`

This will pull the CUDA 12 version of pytorch. If you are running CUDA 11, you need to manually switch to the corresponding Pytorch package afterwards by running `pip3 install torch==2.2.0+cu118 torchvision==0.17.0+cu118 --index-url https://download.pytorch.org/whl/cu118`

gdal incl. gdal-utilities (preferably version >=3.6) need to be installed in your environment, e.g. with conda


### Additional packages
#### cucim
Expand All @@ -29,9 +50,11 @@ The container contains all requirements to run the processing code, singularity
singularity pull library://initze/aicore/thaw_slump_segmentation
singularity shell --nv --bind <your bind path> thaw_slump_segmentation.sif
```

### Option 2 - anaconda
### Environment setup
We recommend using a new conda environment from the provided environment.yml file

```bash
conda env create -n aicore -f environment.yml
```
Expand Down Expand Up @@ -61,27 +84,32 @@ gdal_bin: '%CONDA_PREFIX%\Library\bin' # must be single quote
### Data Preprocessing for Planet data
#### Setting up all required files for training and/or inference
```bash
python setup_raw_data.py --data_dir <DATA_DIR>
```

#### Setting up required files for training

```bash
python prepare_data.py --data_dir <DATA_DIR>
```

### Data Preprocessing for Sentinel 2 data to match planet format

```bash
python download_s2_4band_planet_format.py --s2id <IMAGE_ID> --data_dir <DATA_DIR>
```


### Training a model

```bash
python train.py --data_dir <DATA_DIR> -n <MODEL_NAME>
```

### Running Inference

```bash
python setup_raw_data.py --data_dir <DATA_DIR> --nolabel
python inference.py --data_dir <DATA_DIR> --model_dir <MODEL_NAME> 20190727_160426_104e 20190709_042959_08_1057
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "thaw-slump-segmentation"
version = "0.10.1"
description = "Add your description here"
version = "0.10.2"
description = "Thaw slump segmentation workflow using PlanetScope data and pytorch"
authors = [
{ name = "Ingmar Nitze", email = "[email protected]" },
{ name = "Konrad Heidler", email = "[email protected]" }
Expand Down

0 comments on commit b5d06c3

Please sign in to comment.