A deep learning-based satellite image classification system built using PyTorch and ResNet18. The model is trained on the EuroSAT RGB dataset and can classify satellite imagery into 10 different land-use categories.
- Satellite image classification using ResNet18
- Transfer learning with pretrained ImageNet weights
- GPU acceleration support (CUDA)
- Validation accuracy tracking during training
- Command-line prediction interface
This project uses the EuroSAT RGB Dataset.
The dataset is not included in this repository due to its size.
Please download the dataset manually and place it inside the project directory.
Geospatial_land_classifier/
│
├── archive/
│ └── EuroSAT_RGB/
│ ├── AnnualCrop/
│ ├── Forest/
│ ├── HerbaceousVegetation/
│ ├── Highway/
│ ├── Industrial/
│ ├── Pasture/
│ ├── PermanentCrop/
│ ├── Residential/
│ ├── River/
│ └── SeaLake/
│
├── dataset.py
├── train.py
├── predict.py
├── requirements.txt
└── README.md
The model can classify images into the following categories:
- AnnualCrop
- Forest
- HerbaceousVegetation
- Highway
- Industrial
- Pasture
- PermanentCrop
- Residential
- River
- SeaLake
- Python 3.10 or later
- Git
- NVIDIA GPU (optional, for faster training)
git clone https://github.com/arshraeis710-hash/Geospatial_land_classifier.git
cd Geospatial_land_classifierpython -m venv .venv.\.venv\Scripts\Activate.ps1.venv\Scripts\activate.batpip install -r requirements.txtDownload the EuroSAT RGB dataset and place it inside the archive directory as shown in the folder structure above.
To train the model:
python train.pyAfter training is completed, the model weights will be saved as:
geospatial_model.pth
Example output:
Training initialized on: cuda
Epoch 1/10 | Loss: 0.5671 | Val Accuracy: 89.37%
...
Model weights successfully saved as geospatial_model.pth
To classify a satellite image:
python predict.py path/to/image.jpgExample:
python predict.py archive/EuroSAT_RGB/Highway/Highway_1.jpgExample output:
Top 3 Predictions:
Highway: 92.14%
River: 5.32%
Residential: 2.54%
Geospatial Analysis Result: Highway
- ResNet18
- Transfer Learning
- CrossEntropy Loss
- Adam Optimizer
- PyTorch
Training configuration:
- ResNet18 pretrained on ImageNet
- 17 training epochs
- Batch size: 32
Validation Accuracy:
~92% - 93%
## Notes
- The model is designed for satellite and aerial imagery.
- Predictions on ordinary photographs (people, animals, vehicles, etc.) are not meaningful because the model was trained exclusively on satellite images.
- Best results are achieved with images similar to those found in the EuroSAT dataset.
## Author
"Arsh Raeis Ahmed"