A deep learning project that classifies satellite images into 10 land use categories using a custom-built Convolutional Neural Network (CNN). Trained and evaluated on the EuroSAT RGB dataset.
- Source: EuroSAT (RGB only)
- Size: 27,000 images
- Classes:
- AnnualCrop
- Forest
- HerbaceousVegetation
- Highway
- Industrial
- Pasture
- PermanentCrop
- Residential
- River
- SeaLake
- Image Size: 64×64 pixels
A lightweight CNN trained from scratch:
[Conv2d(3→32) → ReLU → MaxPool] →
[Conv2d(32→64) → ReLU → MaxPool] →
[Conv2d(64→128) → ReLU → MaxPool] →
Flatten → FC(8192→256) → ReLU → Dropout(0.5) → FC(256→10)
| Setting | Value |
|---|---|
| Optimizer | Adam |
| Learning Rate | 0.001 |
| Batch Size | 32 |
| Epochs | 15 |
| Dropout | 0.3 |
| Hardware | Tesla T4 (Colab) |
| Metric | Score |
|---|---|
| Accuracy | 91% |
| Macro F1 | ~0.90 |
| External Img | Supported ✅ |
| Explainable | Grad-CAM ✅ |
Classification Report (excerpt):
| Class | Precision | Recall | F1-score |
|---|---|---|---|
| Forest | 0.97 | 0.99 | 0.98 |
| Residential | 0.98 | 0.97 | 0.97 |
| PermanentCrop | 0.76 | 0.91 | 0.83 |
| ... | ... | ... | ... |
- ✅ CNN trained from scratch
- 📦 Preprocessing and normalization via torchvision
- 🖼️ External image inference support
- 🎯 Grad-CAM visualization for explainability
- 💾 Model saving/loading in
.pthformat
- Python 3.7+
- PyTorch
- torchvision
- matplotlib
- numpy
- scikit-learn
git clone https://github.com/your-username/landuse-cnn-eurosat.git
cd landuse-cnn-eurosat
pip install -r requirements.txtOpen eurosat_cnn.ipynb in Google Colab or Jupyter and run all cells to:
- Download the EuroSAT dataset
- Train the CNN model
- Evaluate on test data
- Run inference on external satellite images
- Visualize Grad-CAM heatmaps
landuse-cnn-eurosat/
│
├── eurosat_cnn.ipynb # Main notebook
├── requirements.txt # Python dependencies
├── assets/
│ ├── sample_predictions.png
│ └── gradcam_visuals.png
└── README.md
- Experiment with deeper architectures like ResNet18 or Vision Transformers (ViT)
- Deploy as a web app with Streamlit or Gradio
- Convert model to ONNX or TFLite for mobile deployment
- Test on higher-resolution or multi-spectral satellite datasets
- Add more explainability methods beyond Grad-CAM
Sanjay Sakhinala
AI/ML Enthusiast | Open to AI Roles
📫 LinkedIn • 📧 sanjaysakhinala@gmail.com
- EuroSAT Dataset Paper
- PyTorch Documentation
- Grad-CAM: Selvaraju et al., 2017
⭐ If you found this project useful, please give it a star on GitHub!
