File size: 3,636 Bytes
106e3fe
61f5910
 
106e3fe
61f5910
 
 
 
 
 
 
106e3fe
61f5910
 
 
 
 
 
 
 
 
 
 
 
106e3fe
61f5910
 
 
 
 
 
106e3fe
61f5910
 
 
 
 
 
106e3fe
61f5910
 
 
 
 
 
 
 
106e3fe
61f5910
 
 
 
 
 
 
 
106e3fe
 
 
79149bb
 
c1c8d8b
79149bb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
df96186
100e7a9
 
 
 
 
 
 
 
 
df96186
ff3f3bb
 
 
 
50e9411
 
 
 
8b65830
50e9411
 
 
 
 
 
 
8b65830
50e9411
 
 
 
 
 
 
61f5910
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
language: en
license: cc-by-4.0
tags:
- vision
- image-classification
- cnn
- satellite-imagery
- land-use-classification
- france
- remote-sensing
model-index:
- name: satellite-land-use-classifier-france
  results:
  - task:
      type: image-classification
    dataset:
      name: hadrilec/satellite-pictures-classification-ign-france
      type: image-dataset
    metrics:
    - name: accuracy
      type: classification
      value: 0.9728
    split: validation
widget:
- task: image-classification
  inputs:
  - name: example_input
    type: image
    url: >-
      https://huggingface.co/datasets/hadrilec/satellite-pictures-classification-ign-france/viewer/default/train?views%5B%5D=train&image-viewer=9473D066F7CE8EC28648894FD2FDAAF273ED2520
model:
  architecture: Custom CNN (2-layer Conv + 2-FC)
  framework: PyTorch
  input_shape:
  - 3
  - 256
  - 256
  output_labels:
  - forest
  - sea
  - urban
  - field
model_description: >
  This model uses a custom convolutional neural network, trained on satellite
  images provided by IGN, to classify areas in France into four categories:
  forest, sea, urban, and field
citation:
- authors:
  - Hadrien Leclerc
  title: Satellite Image Classifier for Land-Use in France
  year: 2025
datasets:
- hadrilec/satellite-pictures-classification-ign-france
metrics:
- accuracy
---


# Satellite Image Classifier (Custom CNN)

This repository contains a **custom convolutional neural network** trained on satellite imagery for land classification in France. The model is inspired by the foundational book *Deep Learning with Pytorch, Eli Stevens, Luca Antiga, Thomas Viehmann*

**Dataset:** [hadrilec/satellite-pictures-classification-ign-france](https://huggingface.co/datasets/hadrilec/satellite-pictures-classification-ign-france)

---

## 🏗 Model Architecture

```python
class Net(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(3, 16, kernel_size=3, padding=1)
        self.conv2 = nn.Conv2d(16, 8, kernel_size=3, padding=1)
        self.fc1 = nn.Linear(8 * 64 * 64, 32)
        self.fc2 = nn.Linear(32, 4)

    def forward(self, x):
        out = F.max_pool2d(torch.tanh(self.conv1(x)), 2)
        out = F.max_pool2d(torch.tanh(self.conv2(out)), 2)
        out = out.view(-1, 8 * 64 * 64)
        out = torch.tanh(self.fc1(out))
        out = self.fc2(out)
        return out

```
## Example Notebook

We provide an example notebook that demonstrates how to train the model:

[Open the example notebook](./example.ipynb)

This notebook is intended as a starting point for experimentation and helps you quickly see how to use the dataset in practice.

Accuracy is 0.9728

## IT infrastructure

The model has been trained on [Onyxia datalab platform](https://www.onyxia.sh/), with an NVIDIA GPU Tesla T4.

## 📈 Training & Validation Loss

Below is the training vs. validation loss curve:

![Training vs Validation Loss](https://huggingface.co/hadrilec/satellite-pictures-classification-ign-france-model/resolve/main/images/validation_training_loss.png)

---

## 🖼 Misclassified Samples

Here is a facet plot showing some **misclassified images** from the validation set:

![Misclassified Samples](https://huggingface.co/hadrilec/satellite-pictures-classification-ign-france-model/resolve/main/images/Misclassified_pictures.png)

---

## 🖼 Correctly Classified Samples

Here is a facet plot showing some **well-classified images** from the validation set:

![Correctly Classified Samples](https://huggingface.co/hadrilec/satellite-pictures-classification-ign-france-model/resolve/main/images/Well-classified_pictures.png)