mpl_image_labeller package
Contents
mpl_image_labeller package#
Module contents#
- class image_labeller(images, classes, multiclass=False, label_keymap: Union[List[str], str] = '1234', title=None, init_labels=None, init_labels_onehot=None, labelling_advances_image: bool = True, N_images=None, fig: Optional[matplotlib.figure.Figure] = None, **imshow_kwargs)[source]#
Bases:
object
- property image_index#
int the index of the currently displayed image.
- property labels#
The current labels as a list of lists or a list of strings.
- property labels_onehot#
The current labels as a one hot encoding.
- on_image_changed(func)[source]#
Connect func as a callback function for when the displayed image is changed. func will receive the index of the new image and the image.
fig.canvas.draw_idle
will be called after the callback is executed so if you are modifying the figure then you do not need to explicitly call draw yourself.- Parameters
- funccallable
Function to call when a point is added.
- Returns
- int
Connection id (which can be used to disconnect func).