Skip to content

Commit 53b498e

Browse files
change YT video embedding
1 parent ad0ac85 commit 53b498e

1 file changed

Lines changed: 45 additions & 16 deletions

File tree

tutorial.ipynb

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -127,27 +127,54 @@
127127
"\n",
128128
"### Key Concepts\n",
129129
"\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",
143163
"\n",
164+
"IFrame(\"https://www.youtube.com/embed/hE7eGew4eeg\", width=560, height=315)"
165+
]
166+
},
167+
{
168+
"cell_type": "markdown",
169+
"metadata": {},
170+
"source": [
144171
"- **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",
145172
"\n",
146173
"- **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",
147174
"\n",
148175
"![](presentation/figures/illustration_prototypical_network.png)\n",
149176
"\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).*"
151178
]
152179
},
153180
{
@@ -173,7 +200,7 @@
173200
},
174201
{
175202
"cell_type": "code",
176-
"execution_count": 3,
203+
"execution_count": null,
177204
"metadata": {},
178205
"outputs": [
179206
{
@@ -196,6 +223,8 @@
196223
"import sys\n",
197224
"import os\n",
198225
"\n",
226+
"os.getcwd()\n",
227+
"\n",
199228
"# Add parent directory to sys.path to allow imports from there\n",
200229
"sys.path.append(os.path.abspath(\"..\"))\n",
201230
"\n",
@@ -237,7 +266,7 @@
237266
"source": [
238267
"## Data Download\n",
239268
"\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",
241270
"\n",
242271
"- a **RGB satellite image**, and\n",
243272
"- a **binary mask** indicating pixels that belong to rooftops suitable for PV installations.\n",

0 commit comments

Comments
 (0)