Commit 43c4ff9
projector: add images to nearest neighbors list (#2543)
Summary:
In addition to showing the labels of nearest neighbors, the projector
also shows sprites associated with those points. Sometimes the label
data alone is only minimally useful (e.g., when all the labels are the
same), and the sprites provide much greater insight. The additional
detail due to the larger view is also particularly helpful on datasets
with higher-resolution sprites, like audio spectrograms.
The behavior is enabled by default, and can be disabled via a new “show
images” checkbox.
Addresses part of #2492.
Screenshots:
- <https://user-images.githubusercontent.com/4317806/63119171-570ae280-bf54-11e9-8e83-80e19701a60f.png>
- <https://user-images.githubusercontent.com/6741720/62971619-4a657d80-bde0-11e9-84d2-f7b9f56b8bf6.png>
Test Plan:
Launch the projector on a dataset without images, and observe that the
behavior is the same as before: no images, no new checkbox, no error
messages. Then, switch to a dataset with images, and select a point.
Verify that the “show images” toggle works, that the images are properly
rendered, and that the images update when you select a new data point.1 parent f6a64aa commit 43c4ff9
File tree
2 files changed
+130
-3
lines changed- tensorboard/plugins/projector/vz_projector
2 files changed
+130
-3
lines changedLines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
127 | 137 | | |
128 | 138 | | |
129 | 139 | | |
| |||
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
149 | 164 | | |
150 | 165 | | |
151 | 166 | | |
| |||
158 | 173 | | |
159 | 174 | | |
160 | 175 | | |
161 | | - | |
| 176 | + | |
162 | 177 | | |
163 | 178 | | |
164 | 179 | | |
| |||
206 | 221 | | |
207 | 222 | | |
208 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
209 | 230 | | |
210 | 231 | | |
211 | 232 | | |
| |||
267 | 288 | | |
268 | 289 | | |
269 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
270 | 309 | | |
271 | 310 | | |
272 | 311 | | |
| |||
Lines changed: 90 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
| 27 | + | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
28 | 40 | | |
29 | 41 | | |
30 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
31 | 50 | | |
32 | 51 | | |
33 | 52 | | |
| |||
37 | 56 | | |
38 | 57 | | |
39 | 58 | | |
| 59 | + | |
40 | 60 | | |
41 | 61 | | |
42 | 62 | | |
43 | 63 | | |
| 64 | + | |
| 65 | + | |
44 | 66 | | |
45 | 67 | | |
46 | 68 | | |
| |||
106 | 128 | | |
107 | 129 | | |
108 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
109 | 151 | | |
110 | 152 | | |
111 | 153 | | |
| |||
127 | 169 | | |
128 | 170 | | |
129 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
130 | 176 | | |
131 | 177 | | |
132 | 178 | | |
| |||
269 | 315 | | |
270 | 316 | | |
271 | 317 | | |
272 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
273 | 352 | | |
274 | 353 | | |
275 | 354 | | |
| |||
282 | 361 | | |
283 | 362 | | |
284 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
285 | 368 | | |
286 | 369 | | |
287 | 370 | | |
| |||
332 | 415 | | |
333 | 416 | | |
334 | 417 | | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
335 | 423 | | |
336 | 424 | | |
337 | 425 | | |
| |||
0 commit comments