Metadata-Version: 2.1
Name: animask
Version: 0.0.1
Summary: Visualization of the predictions of the network during training.
Home-page: https://github.com/sankovalev/animask
Author: Alexander Kovalev
Author-email: sankovalev@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.0.0
Description-Content-Type: text/markdown
Requires-Dist: numpy (>=1.16.3)
Requires-Dist: imageio (>=2.4.1)
Requires-Dist: opencv-python (>=4.1.0.*)
Requires-Dist: pygifsicle (>=1.0.*)
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'


# Animask
Animated (GIF) masks after each epoch.
Only semantic segmentation is supported.
![Example with background](https://github.com/sankovalev/animask/blob/master/example.gif)
---
## Installation
First you need to install gifsicle:
```sh
$ sudo apt-get install gifsicle
```
Then install animask by pip or directly from repo:
```sh
$ pip install animask
```
or
```sh
$ pip install git+https://github.com/sankovalev/animask.git
```
### Usage
```python
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:
```python
animated.save("path_to_file_here.gif", with_background=True)
```
Additionally, you can configure mask titles, color or transparency and etc.

### License
MIT

[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)
   [L4F]: <https://github.com/sankovalev/animask>

