This repository is sets of scripts that I developed that could do land cover classfication using U-Net model, Landsat imagery as predictor, and Indonesia Ministry of Life Environment and Forestry data as land cover label.
Before running the scripts, you need to:
- Instal Python at least version 3.9.
- Create virtual environment.
- Install the required package in the
requirements.txtusingpip. - Create folder named
lcsandimagesinsidedatafolder. This is as folder to save generated sample data
This modelling consisted of two scripts:
-
preprocess.ipynb.This script purpose is to generate the sample data on which to trained the model. It will load Landsat imagery and raster land cover from cloud storage then turn it into multiple grid/patch of smaller image/map to used to train the model. Then saved the the patch in the your local drive which can be loaded in
modelling.ipynbscript. -
modelling.ipynbThis script purpose is to generate and train the land cover model. It will load the patches from the
preprocess.ipynbscript, split it into train and test sets, used to fit the model, assess the model, and visualize the difference between the actual test result and its prediction, and saved the model (for later used maybe).