This repo contains a project prepared within the scope of Akbank "Introduction to Deep Learning" Bootcamp.
The purpose of the project is to classify images using the Intel Image Classification dataset.
The dataset used in this project contains images belonging to six categories:
mountain, street, buildings, sea, forest, and glacier.
A simple CNN model has been implemented using TensorFlow and Keras.
The notebook includes steps for data preprocessing, data augmentation, model creation, training, and evaluation.
-
Data Preprocessing:
- Images resized to 150x150 pixels
- Normalization (pixel values scaled to 0–1)
- Data augmentation for training data (rotation, shifting, shear, zoom, horizontal flip)
-
Model Architecture:
- 3 Convolution layers (ReLU activation)
- MaxPooling layers to reduce spatial dimensions
- Fully Connected layer with 128 neurons
- Dropout (0.3) to prevent overfitting
- Output layer with softmax activation for 6 classes
-
Training:
- Optimizer: Adam
- Loss function: Categorical Crossentropy
- EarlyStopping callback: stop training if validation loss does not improve
- Training/Validation split: 80%/20%
-
Evaluation:
- Test accuracy: 85.73%
- Confusion matrix and classification report for class-wise performance
| Class | Precision | Recall | F1-Score |
|---|---|---|---|
| Mountain | 0.78 | 0.90 | 0.83 |
| Street | 0.94 | 0.98 | 0.96 |
| Buildings | 0.86 | 0.77 | 0.81 |
| Sea | 0.80 | 0.82 | 0.81 |
| Forest | 0.89 | 0.85 | 0.87 |
| Glacier | 0.89 | 0.84 | 0.86 |
Macro Average: 0.86
Weighted Average: 0.86
Along with training and validation accuracy/loss plots, the confusion matrix is also included in the notebook.
- Experiment with deeper CNN architectures (ResNet, EfficientNet)
- Real-time data augmentation and dynamic data loading
- Improve model generalization using images from different datasets
-
Kaggle Notebook (Project Implementation):
https://www.kaggle.com/code/msamedcagli/intel-image-classification-cnn -
Kaggle Dataset:
https://www.kaggle.com/datasets/puneet6060/intel-image-classification
Bu repo, Akbank "Derin Öğrenmeye Giriş" Bootcamp kapsamında hazırlanmış bir projeyi içermektedir.
Projenin amacı, Intel Image Classification veri setini kullanarak görselleri sınıflandırmaktır.
Bu projede kullanılan veri seti, altı kategoriye sahip görseller içermektedir:
mountain, street, buildings, sea, forest ve glacier.
TensorFlow ve Keras kullanılarak basit bir CNN modeli uygulanmıştır.
Notebook içerisinde veri ön işleme, veri artırma (augmentation), model oluşturma, eğitim ve değerlendirme adımları yer almaktadır.
-
Veri Ön İşleme:
- Görseller 150x150 piksel boyutuna getirildi
- Normalizasyon (0–1 aralığına pixel değerleri)
- Eğitim verisi için veri artırma (döndürme, kaydırma, shear, zoom, yatay çevirme)
-
Model Mimarisi:
- 3 Convolution katmanı (ReLU aktivasyonu)
- MaxPooling katmanları ile boyut küçültme
- 128 nöronlu Fully Connected katman
- Overfitting’i önlemek için Dropout (0.3)
- 6 sınıf için çıkış katmanı (softmax aktivasyonu)
-
Eğitim:
- Optimizasyon: Adam
- Kayıp fonksiyonu: Categorical Crossentropy
- EarlyStopping callback: validation loss iyileşmezse eğitimi durdur
- Eğitim/Validation: %80/%20
-
Değerlendirme:
- Test doğruluk (accuracy): %85.73
- Sınıf bazlı performans için confusion matrix ve classification report
| Sınıf | Precision | Recall | F1-Score |
|---|---|---|---|
| Mountain | 0.78 | 0.90 | 0.83 |
| Street | 0.94 | 0.98 | 0.96 |
| Buildings | 0.86 | 0.77 | 0.81 |
| Sea | 0.80 | 0.82 | 0.81 |
| Forest | 0.89 | 0.85 | 0.87 |
| Glacier | 0.89 | 0.84 | 0.86 |
Macro Ortalama: 0.86
Weighted Ortalama: 0.86
Eğitim ve validation doğruluk/kayıp grafiklerinin yanı sıra, confusion matrix de notebook içinde yer almaktadır.
- Daha derin CNN mimarilerini denemek (ResNet, EfficientNet)
- Gerçek zamanlı veri artırma ve dinamik veri yükleme
- Farklı veri seti görğntüleri ile modelin genelleme yeteneğini artırmak
-
Kaggle Notebook (Proje Uygulaması):
https://www.kaggle.com/code/msamedcagli/intel-image-classification-cnn -
Kaggle Veri Seti:
https://www.kaggle.com/datasets/puneet6060/intel-image-classification