Skip to content

Commit 3a28430

Browse files
committed
Adjust embeddings notebook
1 parent f03a629 commit 3a28430

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

notebooks/02-embeddings.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"source": [
99
"import os\n",
1010
"from pathlib import Path\n",
11-
"from typing import List\n",
1211
"\n",
1312
"import matplotlib.pyplot as plt\n",
1413
"import numpy as np\n",
@@ -24,7 +23,7 @@
2423
"# Plot distribution of embedding lenghts\n",
2524
"fig, axs = plt.subplots(1, 2, figsize=(12, 5))\n",
2625
"axs = np.ravel(axs) # Flatten to 1D array\n",
27-
"axs: List[plt.Axes] # Type hinting\n",
26+
"axs: list[plt.Axes] # Type hinting\n",
2827
"\n",
2928
"# Plot Arcface distribution\n",
3029
"embed_arc = np.array(np.load(\"../results/xqlfw_arcface-r50.npy\"))\n",
@@ -65,7 +64,7 @@
6564
"sort_idx = np.argsort(ampl_mag)\n",
6665
"\n",
6766
"\n",
68-
"def plot_images(axs: List[plt.Axes], order: str = \"lowest\"):\n",
67+
"def plot_images(axs: list[plt.Axes], order: str = \"lowest\"):\n",
6968
" for i in range(len(axs)):\n",
7069
" if order == \"lowest\":\n",
7170
" idx = sort_idx[i]\n",
@@ -91,7 +90,7 @@
9190
"\n",
9291
"\n",
9392
"fig, axs = plt.subplots(1, 2, figsize=(15, 20))\n",
94-
"axs: List[plt.Axes] # Type hinting\n",
93+
"axs: list[plt.Axes] # Type hinting\n",
9594
"axs[0].imshow(plt.imread(\"../results/magface_lowest.png\"))\n",
9695
"axs[0].tick_params(left=False, bottom=False, labelleft=False, labelbottom=False)\n",
9796
"axs[0].set_frame_on(False)\n",
@@ -127,7 +126,7 @@
127126
"name": "python",
128127
"nbconvert_exporter": "python",
129128
"pygments_lexer": "ipython3",
130-
"version": "3.11.11"
129+
"version": "3.11.12"
131130
}
132131
},
133132
"nbformat": 4,

0 commit comments

Comments
 (0)