Skip to content

Commit 43663e1

Browse files
clean up + add HF token
1 parent a20be80 commit 43663e1

8 files changed

Lines changed: 149 additions & 685 deletions

File tree

README.md

Lines changed: 34 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,64 @@
1-
# Few-Shot Learning for Rooftop Detection in Satellite Imagery
1+
# Few-Shot Learning for Rooftop Segmentation in Satellite Imagery <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Hertie_School_of_Governance_logo.svg/1200px-Hertie_School_of_Governance_logo.svg.png" width="200px" align="right" />
2+
23
### GRAD-E1394 Deep Learning
34

45
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/hertie-data-science-lab/tutorial-new-tutorial-group-1/blob/elena-setup/notebooks/tutorial_few_shot_learning.ipynb)
56

67

7-
**Author(s):** Elena Dreyer, Giorgio Coppola, Nadine Daum, Nicolas Reichardt
8-
9-
## Tutorial Overview
8+
**Author(s):**
109

11-
This tutorial demonstrates few-shot learning techniques for semantic segmentation of satellite imagery. The dataset contains high-resolution satellite images of Geneva, Switzerland, with corresponding segmentation labels for rooftop detection.
10+
- Elena Dreyer [[Email](mailto:e.dreyer@students.hertie-school.org) | [GitHub](https://github.com/elenaivadreyer)]
11+
- Giorgio Coppola [[Email](mailto:G.Coppola@students.hertie-school.org) | [GitHub](https://github.com/giocopp)]
12+
- Nadine Daum [[Email](mailto:N.Daum@students.hertie-school.org) | [GitHub](https://github.com/NadineDaum)]
13+
- Nicolas Reichardt [[Email](mailto:N.Reichardt@students.hertie-school.org) | [GitHub](https://github.com/nicolasreichardt)]
1214

13-
📓 **[View Tutorial Notebook (HTML)](docs/tutorial_few_shot_learning.html)**
1415

15-
### Learning Outcomes
16-
- Understanding few-shot learning concepts for image segmentation
17-
- Working with satellite imagery and segmentation masks
18-
- Implementing and evaluating few-shot learning models for rooftop detection
19-
20-
## Video Tutorial
21-
22-
<!-- VIDEO PLACEHOLDER: Replace the link below with your tutorial video -->
23-
[![Tutorial Video](https://img.youtube.com/vi/VIDEO_ID/0.jpg)](https://www.youtube.com/watch?v=VIDEO_ID)
24-
25-
*Click the image above to watch the tutorial video*
16+
## Tutorial Overview
2617

27-
## Quick Start
18+
This tutorial introduces few-shot learning techniques for semantic segmentation in satellite imagery using high-resolution images from Geneva, Switzerland. We will demonstrate how Prototypical Networks can learn meaningful rooftop representations from only a few labeled examples and generalize to new geographic areas with minimal annotation effort.
2819

29-
### Installation
20+
### Learning Outcomes
3021

31-
```bash
32-
# Clone the repository
33-
git clone https://github.com/hertie-data-science-lab/tutorial-new-tutorial-group-1.git
34-
cd tutorial-group-1
22+
By the end of the tutorial, you will be able to:
3523

36-
# Create virtual environment
37-
python3 -m venv .venv
38-
source .venv/bin/activate
24+
- Understand the core concepts behind **Few-Shot Learning** and **Few-Shot Semantic Segmentation**
25+
- Work with **satellite imagery**, geographic splits, and pixel-level segmentation masks
26+
- Implement **Prototypical Networks** with episodic training for segmentation tasks
27+
- Evaluate model performance using metrics such as **IoU** and interpret FSL model behavior
28+
- Reflect on **policy-relevant applications** such as rooftop solar assessment and data-scarce mapping tasks
3929

40-
# Install the package (without PyTorch)
41-
pip install -e .
4230

43-
# Install PyTorch (CPU-only version recommended to save disk space)
44-
# CPU-only: ~730MB vs CUDA version: ~7GB
45-
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
31+
### Prerequisites
4632

47-
# Or use the Makefile
48-
make install
49-
make install-torch
50-
```
33+
- Intermediate Python programming
34+
- Familiarity with PyTorch
35+
- Basics of Machine and Deep Learning
36+
- Understanding of convolutional neural networks
5137

52-
**Note:** PyTorch is not installed by default due to its large size. The CPU-only version is recommended for most use cases and saves significant disk space.
38+
## Dataset Description
5339

54-
### Running the Tutorial
40+
🤗 [View on Hugging Face Hub](https://huggingface.co/datasets/raphaelattias/overfitteam-geneva-satellite-images) 🤗
5541

56-
Open the main tutorial notebook:
57-
```bash
58-
jupyter notebook notebooks/tutorial_few_shot_learning.ipynb
59-
```
42+
The dataset being used for the demonstration of this tutorial consists of:
43+
- **Satellite Images**: High-resolution RGB satellite images of Geneva, Switzerland
44+
- **Segmentation Labels**: Binary masks indicating rooftop locations
6045

61-
## Project Structure
46+
## Quick Start
6247

63-
```
64-
├── notebooks/
65-
│ └── tutorial_few_shot_learning.ipynb # Main tutorial notebook
66-
├── src/few_shot_utils/
67-
│ ├── __init__.py # Package initialization
68-
│ ├── data.py # Data loading utilities
69-
│ ├── models.py # Model architectures
70-
│ ├── train.py # Training functions
71-
│ └── evaluate.py # Evaluation metrics
72-
└── docs/ # Documentation
73-
```
48+
Either have a quick walk through the tutorial notebook or watch the video tutorial below to get started!
7449

75-
## Dataset Description
50+
### 📓 Tutorial Notebook
7651

77-
The dataset consists of:
78-
- **Satellite Images**: High-resolution RGB satellite images of Geneva, Switzerland
79-
- **Segmentation Labels**: Binary masks indicating rooftop locations
80-
- **Resolution**: Images at various resolutions suitable for few-shot learning
52+
**[View Tutorial Notebook (HTML)](docs/tutorial_few_shot_learning.html)**
8153

82-
## Development
8354

84-
### Linting and Formatting
55+
### 📹 Video Tutorial
8556

86-
This project uses [Ruff](https://docs.astral.sh/ruff/) for linting and formatting, including Jupyter notebooks.
57+
<!-- VIDEO PLACEHOLDER: Replace the link below with your tutorial video -->
58+
[![Tutorial Video](https://img.youtube.com/vi/VIDEO_ID/0.jpg)](https://www.youtube.com/watch?v=VIDEO_ID)
8759

88-
```bash
89-
# Run linting with automatic fixes
90-
ruff check . --fix
91-
ruff format .
60+
*Click the image above to watch the tutorial video*
9261

93-
# Run pre-commit hooks
94-
pre-commit run --all-files
95-
```
9662

9763
## References
9864

@@ -119,8 +85,3 @@ pre-commit run --all-files
11985
- Puthumanaillam, G., & Verma, U. (2023). Texture based prototypical network for few-shot semantic segmentation of forest cover: Generalizing for different geographical regions. *Neurocomputing, 538*, 126201. [https://doi.org/10.1016/j.neucom.2023.03.062](https://doi.org/10.1016/j.neucom.2023.03.062)
12086

12187
- Sung, F., Yang, Y., Zhang, L., Xiang, T., Torr, P. H., & Hospedales, T. M. (2018). Learning to compare: Relation network for few-shot learning. In *Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition* (pp. 1199–1208). [https://doi.org/10.1109/CVPR.2018.00131](https://doi.org/10.1109/CVPR.2018.00131)
122-
123-
124-
## License
125-
126-
This project is licensed under the MIT License - see the LICENSE file for details.

src/__init__.py

Whitespace-only changes.

src/few_shot_utils/__init__.py

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/few_shot_utils/data.py

Lines changed: 0 additions & 122 deletions
This file was deleted.

src/few_shot_utils/evaluate.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)