This project demonstrates the classification of satellite images using a custom Convolutional Neural Network (CNN). The model is designed to classify images from the EuroSAT dataset into ten distinct classes.
Satellite image classification plays a crucial role in applications such as land cover mapping, urban planning, and environmental monitoring. This project leverages deep learning, particularly CNNs, to classify satellite images into ten categories: AnnualCrop, Forest, HerbaceousVegetation, Highway, Industrial, Pasture, PermanentCrop, Residential, River, and SeaLake.
The EuroSAT dataset, which comprises 27,000 labeled images of various land use and land cover types, is used for this project. The images are 64x64 pixels and categorized into the following classes:
- AnnualCrop
- Forest
- HerbaceousVegetation
- Highway
- Industrial
- Pasture
- PermanentCrop
- Residential
- River
- SeaLake
- Normalization: Pixel values are scaled to the range [0, 1].
- Tensor conversion: Images are converted to tensors.
- One-Hot encoding: Labels are transformed into one-hot encoded vectors.
- Dataset splitting: The dataset is divided into training, validation, and test sets.
- Data augmentation: Techniques such as random flips and brightness adjustments are applied to enhance model robustness.
A custom CNN architecture named SpectrumNet was designed, consisting of multiple convolutional and spectral blocks to capture multi-scale features from the input images. The architecture leverages Batch Normalization and ReLU activation to stabilize and accelerate training.
Three versions of the model were trained with different configurations to identify the optimal training parameters. The models were trained using:
- Optimizer: Stochastic Gradient Descent (SGD) with momentum
- Loss function: Categorical cross-entropy
- Class weights adjustment: To handle class imbalance
- Learning rate scheduler: Step decay function to adjust the learning rate
- Early stopping: To prevent overfitting
The model was evaluated on the test dataset using metrics such as accuracy and confusion matrices to assess its performance and generalization ability.
Three different configurations were tested to determine the best model. The best model achieved a classification accuracy of 96% on the test dataset.
This project demonstrates the effectiveness of CNNs in satellite image classification. The custom SpectrumNet architecture achieved high accuracy, highlighting the importance of meticulous data preprocessing, robust training strategies, and detailed performance evaluation.
Future improvements could include:
- Using higher resolution images to capture more detailed features
- Exploring advanced neural network architectures
- Implementing transfer learning techniques
- Expanding the dataset through advanced augmentation or synthetic data generation
-
Clone the repository:
git clone https://github.com/AlvaroVasquezAI/Satellite-Image-Classification.git cd Satellite-Image-Classification
-
Install the required packages:
pip install -r requirements.txt
To use the graphical interface for classifying satellite images:
-
Run the GUI application:
python classifierApp.py
-
Select a Model: Click on the "Select Model" button and choose the trained model file (
.keras
). -
Select an Image: Once a model is loaded, click on the "Select Image" button and choose the satellite image you want to classify.
-
View Results: The application will display the original image and the colorized classification map. You can select a different image to classify or load a new model to use for classification.
For any questions or inquiries, feel free to contact me:
- Email: agarciav2102@alumno.ipn.mx
- GitHub: Álvaro Vásquez AI
- LinkedIn: Álvaro García Vásquez
- Instagram: alvarovasquez.ai
- Twitter: alvarovasquezai
- YouTube: Álvaro Vásquez AI
Feel free to contribute to this project by opening issues and submitting pull requests.
This project demonstrates the potential of deep learning in remote sensing applications and provides a foundation for future advancements in satellite image classification.