mpl_image_segmenter package

Subpackages

Module contents

Manually segment images with matplotlib.

class ImageSegmenter(imgs, classes=1, color_image=False, mask=None, mask_colors=None, mask_alpha=0.75, props=None, lasso_mousebutton='left', pan_mousebutton='middle', ax=None, figsize=(10, 10), **kwargs)

Bases: object

Manually segment an image with the lasso selector.

property current_class: int | str
property erasing: bool
get_paths() dict[str, list[Path]]

Get a dictionary of all the paths used to create the mask.

Returns:

dict – With keys adding and erasing each containing a list of paths.

property image_index: int
property mask: ndarray
property panmanager: PanManager