Logo Lanfrica

JaneGondwegithub/LULC_classification_and_prediction

Domain:

geospatialenvironment and energyagriculture

Record type:

softwaremodel
Creator:
Jan
Host:
Codes for mapping and predicting land use and land cover changes in Malawi. This is a novel framework that integrates random forest and deep learning approaches #Land Use and Land Cover (LULC) Classification and Prediction# ##Purpose## This repository provides a comprehensive framework for land use and land cover (LULC) classification and prediction in Malawi, integrating deep learning and Random Forest approaches: • Deep Learning: Python scripts using PyTorch with a ResNet-18 backbone, Focal Loss, SMOTE for class balancing, and spatial dropout for regularization. These scripts classify land use types based on geospatial training points, incorporating spectral indices (e.g., NDVI, NDWI, BSI, EVI) and terrain features (e.g., slope, aspect, elevation). • Random Forest: Google Earth Engine (GEE) scripts for Random Forest classification of Landsat imagery for 2010, 2015, 2020, and 2024, generating classified maps, area statistics, and preprocessed data (e.g., Landsat composites, slope, shapefiles) for the deep learning pipeline. • Data Preprocessing: GEE scripts export Landsat imagery, DEM-derived features, and shapefiles compatible with the deep learning scripts. The framework includes: • Training Script: Trains a deep learning model to classify land use types (Water=0, Built-up=1, Bareland=2, Agricultural=3, Forest=4) using 2020 data. • Prediction Script: Applies the trained model to predict land use classes for 2010, 2015, 2020, or 2024 imagery within a shapefile boundary, generating predictions, area summaries, and visualization maps. • GEE Scripts: Preprocess Landsat imagery (2010: Landsat-5; 2015, 2020, 2024: Landsat-8) and generate Random Forest classified maps for validation or as additional features. ###Repository Structure### • src/land_use_classifier.py: Trains the deep learning model. • src/land_use_predictor.py: Generates predictions using the trained model. • src/gee_random_forest_2010.js: Random Forest classification for 2010 Landsat-5 imagery. • src/gee_random_forest_2015.js: Random Forest classification for 2015 Landsat-8 imagery. • src/gee_random_forest_2020.js: Random Forest classification for 2020 Landsat- …