from lightning import Lightning
from sklearn import datasets
lgn = Lightning(ipython=True, host='http://public.lightning-viz.org')
Connected to server at http://public.lightning-viz.org
The image-poly
visualization let's you draw polygonal regions on images and then query them in the same notebook!
imgs = datasets.load_sample_images().images
viz = lgn.imagepoly(imgs[0])
viz
Draw some regions on the image above. Then check the value of viz.coords
.
p = viz.polygons()
lgn.imagepoly(imgs[0], polygons=p)
In this case we drew four regions, so we get four arrays of coordinates (in original image space).