Skip to content

Latest commit

 

History

History
48 lines (41 loc) · 1.39 KB

README.md

File metadata and controls

48 lines (41 loc) · 1.39 KB

Animask

Animated (GIF) masks after each epoch.

Only semantic segmentation is supported.

Example with background

Installation

First you need to install gifsicle:

$ sudo apt-get install gifsicle

Then install animask by pip or directly from repo:

$ pip install animask

or

$ pip install git+https://github.com/sankovalev/animask.git

Usage

from animask import Animask

# init object with the image that the mask will be predicted for
animated = Animask(image)

# === repeat this every epoch: ===
# train your model ...
# predict mask for image
# and then add to object as numpy array
animated.add(predicted_mask)
# === finish training ===

# save your gif
animated.save("path_to_file_here.gif")

By default, masks will be saved without a background. To apply masks over the original image, save it with flag:

animated.save("path_to_file_here.gif", with_background=True)

Additionally, you can configure mask titles, color or transparency and etc.

License

MIT