ipywidgets for images

Box.__getitem__[source]

Box.__getitem__(i)

widget[source]

widget(im, *args, **layout)

Convert anything that can be displayed by IPython into a widget

im = Image.open('images/puppy.jpg').to_thumb(256,512)
VBox([widgets.HTML('Puppy'),
      widget(im, max_width="192px")])

carousel(children:(tuple, list)=(), **layout)

A horizontally scrolling carousel

Type Default Details
children (tuple, list) None Box objects to display in a carousel
layout No Content
ts = [VBox([widget(im, max_width='192px'), Button(description='click')])
      for o in range(3)]

carousel(ts, width='450px')

class ImagesCleaner[source]

ImagesCleaner(opts:tuple=(), height:int=128, width:int=256, max_n:int=30)

A widget that displays all images in fns along with a Dropdown

Type Default Details
opts tuple None Options for the Dropdown menu
height int 128 Thumbnail Height
width int 256 Thumbnail Width
max_n int 30 Max number of images to display
fns = get_image_files('images')
w = ImagesCleaner(('A','B'))
w.set_fns(fns)
w
w.delete(),w.change()
((#0) [], (#0) [])

class ImageClassifierCleaner[source]

ImageClassifierCleaner(learn, opts:tuple=(), height:int=128, width:int=256, max_n:int=30) :: GetAttr

A widget that provides an ImagesCleaner for a CNN Learner