Skip to content

Instantly share code, notes, and snippets.

@fkraeutli
Created January 21, 2021 14:23
Show Gist options
  • Save fkraeutli/ca73657c8749b82b91a4be84af937909 to your computer and use it in GitHub Desktop.
Save fkraeutli/ca73657c8749b82b91a4be84af937909 to your computer and use it in GitHub Desktop.
Autogenerated from www.imagegraph.cc, My sketch title
{"caption":"My sketch title","offset":{"x":-1,"y":0},"nodes":{"5bdcd919-23ec-4d21-af27-c3ad2e22e4b7":{"id":"5bdcd919-23ec-4d21-af27-c3ad2e22e4b7","position":{"x":468,"y":319},"type":"loadIIIFManifest","ports":{"port1":{"id":"port1","type":"bottom","properties":{"type":"imL"},"position":{"x":24,"y":106}}},"properties":{"text":"Loads a IIIF manifest. Paste in any IIIF manifest URL, which you can get from most libraries. ","form":"string","innerDefault":"https://iiif.bodleian.ox.ac.uk/iiif/manifest/e32a277e-91e2-4a6d-8ba6-cc4bad230410.json","viewer":"https://universalviewer.io/uv.html?manifest=","innerValue":"https://www.e-rara.ch/i3f/v20/17611827/manifest"}},"a0836cdc-e0cb-4078-8f57-8c501ecf07ca":{"id":"a0836cdc-e0cb-4078-8f57-8c501ecf07ca","position":{"x":595,"y":557},"type":"getNNEmbedding","ports":{"port1":{"id":"port1","type":"top","properties":{"type":"imL"},"position":{"x":24,"y":-12}},"port2":{"id":"port2","type":"bottom","properties":{"type":"vL"},"position":{"x":24,"y":59}}},"properties":{"text":"Extracts the second-to-last-layer neural network embedding for each image fed in; outputs them as a list of vectors","form":"none"}},"5bfb8162-7ed6-4214-9bef-8ad4528e6291":{"id":"5bfb8162-7ed6-4214-9bef-8ad4528e6291","position":{"x":647,"y":794},"type":"scatterPlot","ports":{"port1":{"id":"port1","type":"top","properties":{"type":"fL"},"position":{"x":24,"y":-12}},"port2":{"id":"port2","type":"top","properties":{"type":"fL"},"position":{"x":156,"y":-12}}},"properties":{"text":"A simple x-y plot. ","form":"none"}},"6920b257-8298-49ac-81a2-d2dc16a2d46f":{"id":"6920b257-8298-49ac-81a2-d2dc16a2d46f","position":{"x":345,"y":824},"type":"scatterImages","ports":{"port1":{"id":"port1","type":"top","properties":{"type":"imL"},"position":{"x":24,"y":-12}},"port2":{"id":"port2","type":"top","properties":{"type":"fL"},"position":{"x":90,"y":-12}},"port3":{"id":"port3","type":"top","properties":{"type":"fL"},"position":{"x":156,"y":-12}}},"properties":{"text":"A *direct visualization* of an image list on an x-y grid. ","form":"none"}},"83b1d1ec-a9b9-405a-809e-3d0af6f8ffab":{"id":"83b1d1ec-a9b9-405a-809e-3d0af6f8ffab","position":{"x":732,"y":922},"type":"displayNearestNeighbors","ports":{"port1":{"id":"port1","type":"top","properties":{"type":"imL"},"position":{"x":24,"y":-12}},"port2":{"id":"port2","type":"top","properties":{"type":"imL"},"position":{"x":91,"y":-12}},"port3":{"id":"port3","type":"top","properties":{"type":"m"},"position":{"x":158,"y":-12}}},"properties":{"text":"Given two image collections and a distance matrix, display an interactive nearest-neighbor widget. ","form":"none"}}},"selected":{},"links":{"0160cacd-a99f-4137-9443-b2bef5e64264":{"id":"0160cacd-a99f-4137-9443-b2bef5e64264","from":{"nodeId":"5bdcd919-23ec-4d21-af27-c3ad2e22e4b7","portId":"port1"},"to":{"position":{"x":503,"y":424}}},"5c689c28-dc10-44da-81bf-b481ab24f5b2":{"id":"5c689c28-dc10-44da-81bf-b481ab24f5b2","from":{"nodeId":"5bdcd919-23ec-4d21-af27-c3ad2e22e4b7","portId":"port1"},"to":{"nodeId":"a0836cdc-e0cb-4078-8f57-8c501ecf07ca","portId":"port1"}},"8c93c6c3-ed90-41f7-a276-49f19691a6b4":{"id":"8c93c6c3-ed90-41f7-a276-49f19691a6b4","from":{"nodeId":"a0836cdc-e0cb-4078-8f57-8c501ecf07ca","portId":"port2"},"to":{}}},"hovered":{}}
Display the source blob
Display the rendered blob
Raw
{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "ImageGraph.ipynb", "version": "0.3.2", "provenance": [], "collapsed_sections": [] }, "kernelspec": { "name": "python3", "display_name": "Python 3" } }, "cells": [ { "cell_type": "code", "metadata": { "id": "gsUbIGfNqSjV", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 34 }, "outputId": "a306f9c8-c721-4280-fba4-f175cffa7090" }, "source": [ " # Remember to install the imagegraph Python library thus:\n!pip install git+https:\/\/github.com\/leoimpett\/pyimagegraph\nimport imagegraph as ig\nimL00 = ig.loadIIIFManifest(\"https:\/\/www.e-rara.ch\/i3f\/v20\/17611827\/manifest\") \nvL01 = ig.getNNEmbedding(imL00) " ], "execution_count": 0, "outputs": [ { "output_type": "stream", "text": [ " " ], "name": "stdout" } ] } ]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment