Skip to content

Commit

Permalink
Merge pull request #6 from KhaosResearch/v1.2
Browse files Browse the repository at this point in the history
v1.2

- Now seasons are not hardcoded, instead defined in a json file referenced in SEASONS_FILE environment variable.
- It is possible now to use any number of seasons or any date interval for using landcoverpy
- Added seasons example files
- Improved RAM usage when creating the tile dataframe, now pd.concat is not used.
- Beta windowing read-write in prediction is now available! Right now it has only been tested splitting the rasters in (5,5) slices, since there are problems with windowing different spatial resolution images, i.e. 20m 10m sentinel2-bands.
- An example for calling the predict workflow using windowing is `workflow(execution_mode=ExecutionMode.LAND_COVER_PREDICTION, window_slices=(5,5))`. This reduces maximum RAM usage from 64GB to 8GB.
- It is pending to improve the windowing allowing different window slices OR allow using use_block_windows.
- Workflow main script splitted in train predict to improve readibility
  • Loading branch information
AmbroxMr authored Jul 15, 2024
2 parents 00a8894 + 3a8c821 commit bbd281f
Show file tree
Hide file tree
Showing 16 changed files with 802 additions and 1,279 deletions.
9 changes: 2 additions & 7 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,8 @@ SL_LABELS_FILE=<SL_LABELS_FILE>
# For running in a distributed environment
DASK_CLUSTER_IP=<DASK_CLUSTER_IP>

# Dates used for each season
SPRING_START=<SPRING_START>
SPRING_END=<SPRING_END>
SUMMER_START=<SUMMER_START>
SUMMER_END=<SUMMER_END>
AUTUMN_START=<AUTUMN_START>
AUTUMN_END=<AUTUMN_END>
# File containing the definition of the seasons
SEASONS_FILE=<SEASONS_FILE>

# Product filtering parameters
MAX_CLOUD=<MAX_CLOUD>
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A research article describing the methodology followed on this workflow can be f
## Installation

Currently, the package is not available on PyPI, so you need to install it from the source code. To do so, you can clone the repository and install it using pip:
The package is not available on PyPI, so you need to install it from the source code. To do so, you can clone the repository and install it using pip:

```bash
git clone https://github.com/KhaosResearch/landcoverpy.git
Expand All @@ -30,12 +30,6 @@ For development purposes, you can install the package in editable mode:
pip install -e .
```

In the future, the package will be available on PyPI, so you will be able to install it using pip:

```bash
pip install landcoverpy
```

## Usage

An usage example can be found at the [main usage notebook](notebooks/main_usage.ipynb).
Expand Down
6 changes: 6 additions & 0 deletions example_inputs/seasons_file/one_season.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"april": {
"start": "2021-04-01",
"end": "2021-04-30"
}
}
14 changes: 14 additions & 0 deletions example_inputs/seasons_file/seasons.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"spring": {
"start": "2021-03-01",
"end": "2021-04-30"
},
"summer": {
"start": "2021-06-01",
"end": "2021-07-31"
},
"autumn": {
"start": "2021-10-01",
"end": "2021-11-30"
}
}
Loading

0 comments on commit bbd281f

Please sign in to comment.