Logo Lanfrica

mwanzaalbert/kenya-remote-sensing-cnn

Domain:

geospatialagriculture

Record type:

softwaremodel
Creator:
mwa
Host:
# πŸ‡°πŸ‡ͺ Kenya Multi-Spectral Remote Sensing Land Cover CNN A end-to-end PyTorch deep learning pipeline designed to classify multi-spectral remote sensing patches (simulating 4-band Sentinel-2 imagery: Blue, Green, Red, and Near-Infrared) across major agricultural and pastoral ecological zones in Kenya. This repository serves as a practical demonstration of applying Convolutional Neural Networks (CNNs) to geospatial datasets for decision-support tools in agricultural data analytics, rangeland monitoring, and land-use mapping. --- ## πŸ“Œ Context & Motivation Accurate land-cover and crop-type classification in East Africa is critical for: * **Digital Agriculture & Yield Forecasting:** Monitoring maize and primary food crop production zones. * **Pastoral & Livestock Rangeland Management:** Tracking forage density and vegetation health across Arid and Semi-Arid Lands (ASALs). * **Environmental Conservation:** Identifying forested areas, water baselines (e.g., Lake Naivasha, Lake Nakuru), and land degradation trends. Standard RGB computer vision models fall short in remote sensing because they miss Near-Infrared (NIR) light, which provides the critical **NDVI (Normalized Difference Vegetation Index)** signal needed to differentiate healthy dense vegetation from bare rangeland or water bodies. --- ## πŸ—οΈ Architecture This repository adapts a **ResNet-18** architecture for 4-channel geospatial inputs: ``` Multi-Spectral Input Patch (4 x 64 x 64) [B2-Blue, B3-Green, B4-Red, B8-NIR] β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Modified First Conv Layer β”‚ 64 filters) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ ResNet-18 Feature Extractor β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Classification Head β”‚ <-- Dropout (0.3) + Linear Layer β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β–Ό Class Predictions (Logits) β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ 0: Cropland (Maize) β”‚ β”‚ 1: Pastoral Rangeland β”‚ β”‚ 2: De …