Skip to content

Commit

Permalink
Merge pull request #236 from sentinel-hub/fix/lulc-fastai-example
Browse files Browse the repository at this point in the history
Update lulc fastai use-case
  • Loading branch information
devisperessutti authored Aug 3, 2020
2 parents e74d6f4 + 9ae5bd1 commit e5e57d6
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 157 deletions.
4 changes: 2 additions & 2 deletions example_data/land_cover_svn_fastai/large_training_aoi.geojson
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::32633" } },
"features": [
{ "type": "Feature", "properties": { "id": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 15.002478787998214, 46.284774927192466 ], [ 15.391187465011237, 46.28410576383088 ], [ 15.388526033245716, 46.011539469099553 ], [ 15.000995862863139, 46.012199853257606 ], [ 15.002478787998214, 46.284774927192466 ] ] ] } }
{ "type": "Feature", "properties": { "id": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 501000, 5116000 ], [ 524000, 5116000 ], [ 524000, 5139000 ], [ 501000, 5139000 ], [ 501000, 5116000 ] ] ] } }
]
}
246 changes: 131 additions & 115 deletions examples/land-cover-fastai/deep_lulc_walkthrough.ipynb

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions examples/land-cover-fastai/utils/get_s2_sentinelhub.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@

class SentinelHubValidData:
"""
Combine Sen2Cor's classification map with `IS_DATA` to define a `VALID_DATA_SH` mask
The SentinelHub's cloud mask is asumed to be found in eopatch.mask['CLM']
"""
def __call__(self, eopatch):
return np.logical_and(eopatch.mask['IS_DATA'].astype(np.bool),
return np.logical_and(eopatch.mask['dataMask'].astype(np.bool),
np.logical_not(eopatch.mask['CLM'].astype(np.bool)))

class CountValid(EOTask):
Expand Down
38 changes: 0 additions & 38 deletions examples/land-cover-fastai/utils/lulc_mask.py

This file was deleted.

0 comments on commit e5e57d6

Please sign in to comment.