|
127 | 127 | "\n", |
128 | 128 | "### Key Concepts\n", |
129 | 129 | "\n", |
130 | | - "- **Few-Shot Learning:** Few-shot learning aims to train models that can recognize new classes from only a handful of labeled examples by leveraging prior knowledge learned from many related tasks.\n", |
131 | | - "\n", |
132 | | - "<div style=\"text-align: center;\">\n", |
133 | | - " <iframe\n", |
134 | | - " width=\"560\" height=\"315\"\n", |
135 | | - " src=\"https://www.youtube.com/embed/hE7eGew4eeg\"\n", |
136 | | - " title=\"YouTube video player\"\n", |
137 | | - " frameborder=\"0\"\n", |
138 | | - " allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n", |
139 | | - " allowfullscreen>\n", |
140 | | - " </iframe>\n", |
141 | | - "</div>\n", |
142 | | - "\n", |
| 130 | + "- **Few-Shot Learning:** Few-shot learning aims to train models that can recognize new classes from only a handful of labeled examples by leveraging prior knowledge learned from many related tasks." |
| 131 | + ] |
| 132 | + }, |
| 133 | + { |
| 134 | + "cell_type": "code", |
| 135 | + "execution_count": 13, |
| 136 | + "metadata": {}, |
| 137 | + "outputs": [ |
| 138 | + { |
| 139 | + "data": { |
| 140 | + "text/html": [ |
| 141 | + "\n", |
| 142 | + " <iframe\n", |
| 143 | + " width=\"560\"\n", |
| 144 | + " height=\"315\"\n", |
| 145 | + " src=\"https://www.youtube.com/embed/hE7eGew4eeg\"\n", |
| 146 | + " frameborder=\"0\"\n", |
| 147 | + " allowfullscreen\n", |
| 148 | + " \n", |
| 149 | + " ></iframe>\n", |
| 150 | + " " |
| 151 | + ], |
| 152 | + "text/plain": [ |
| 153 | + "<IPython.lib.display.IFrame at 0x13beb6710>" |
| 154 | + ] |
| 155 | + }, |
| 156 | + "execution_count": 13, |
| 157 | + "metadata": {}, |
| 158 | + "output_type": "execute_result" |
| 159 | + } |
| 160 | + ], |
| 161 | + "source": [ |
| 162 | + "from IPython.display import IFrame\n", |
143 | 163 | "\n", |
| 164 | + "IFrame(\"https://www.youtube.com/embed/hE7eGew4eeg\", width=560, height=315)" |
| 165 | + ] |
| 166 | + }, |
| 167 | + { |
| 168 | + "cell_type": "markdown", |
| 169 | + "metadata": {}, |
| 170 | + "source": [ |
144 | 171 | "- **Semantic Segmentation:** In the context of semantic segmentation, this means learning to assign a class label to every pixel in an image, even when only a few annotated images are available for each class.\n", |
145 | 172 | "\n", |
146 | 173 | "- **Prototypical Networks:** Prototypical Networks tackle this by mapping pixels (or patches) into an embedding space where each class is represented by a prototype, typically the mean embedding of its support examples. At inference time, each pixel in a query image is classified by measuring its distance to these class prototypes, enabling accurate pixel-wise segmentation in new scenes with very limited labeled data.\n", |
147 | 174 | "\n", |
148 | 175 | "\n", |
149 | 176 | "\n", |
150 | | - "*Figure 1: Overview of the Self-Regularized Prototypical Network Architecture. Adapted from [Ding et al. (2022)](https://arxiv.org/pdf/2210.16829).*\n" |
| 177 | + "*Figure 1: Overview of the Self-Regularized Prototypical Network Architecture. Adapted from [Ding et al. (2022)](https://arxiv.org/pdf/2210.16829).*" |
151 | 178 | ] |
152 | 179 | }, |
153 | 180 | { |
|
173 | 200 | }, |
174 | 201 | { |
175 | 202 | "cell_type": "code", |
176 | | - "execution_count": 3, |
| 203 | + "execution_count": null, |
177 | 204 | "metadata": {}, |
178 | 205 | "outputs": [ |
179 | 206 | { |
|
196 | 223 | "import sys\n", |
197 | 224 | "import os\n", |
198 | 225 | "\n", |
| 226 | + "os.getcwd()\n", |
| 227 | + "\n", |
199 | 228 | "# Add parent directory to sys.path to allow imports from there\n", |
200 | 229 | "sys.path.append(os.path.abspath(\"..\"))\n", |
201 | 230 | "\n", |
|
237 | 266 | "source": [ |
238 | 267 | "## Data Download\n", |
239 | 268 | "\n", |
240 | | - "The dataset is stored on the Hugging Face Hub and each tile comes with:\n", |
| 269 | + "The dataset is stored on the [Hugging Face Hub](https://huggingface.co/datasets/raphaelattias/overfitteam-geneva-satellite-images) and each tile comes with:\n", |
241 | 270 | "\n", |
242 | 271 | "- a **RGB satellite image**, and\n", |
243 | 272 | "- a **binary mask** indicating pixels that belong to rooftops suitable for PV installations.\n", |
|
0 commit comments