equialgo / fairness-in-ml

This repository contains the full code for the "Towards fairness in machine learning with adversarial networks" blog post.
MIT License
117 stars 48 forks source link

How could I achieve the animation graph? Thanks #5

Closed Bee-zest closed 5 years ago

hgrif commented 5 years ago

Hi @Bee-zest,

The animation is generated by saving matplotlib figures as png images and converting them to a gif with the command (see the last code cell of this Notebook:

convert -loop 0 -delay 0 output/*.png -delay 500 output/00000165.png images/training.gif

I believe convert is a tool from imagemagick. Alternatively, you could look into matplotlib.animation (see an example here).

Good luck!

Bee-zest commented 5 years ago

Thank you so much

Henk Griffioen notifications@github.com于2019年3月13日 周三上午5:36写道:

Hi @Bee-zest https://github.com/Bee-zest,

The animation is generate by saving matplotlib figures as png images and converting them to a gif with the command (see the last code cell of this Notebook https://github.com/equialgo/fairness-in-ml/blob/master/fairness-in-ml.ipynb :

convert -loop 0 -delay 0 output/*.png -delay 500 output/00000165.png images/training.gif

I believe convert is a tool from imagemagick https://linux.die.net/man/1/convert. Alternatively, you could look into matplotlib.animation (see an examples here https://eli.thegreenplace.net/2016/drawing-animated-gifs-with-matplotlib/ ).

Good luck!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/equialgo/fairness-in-ml/issues/5#issuecomment-472404324, or mute the thread https://github.com/notifications/unsubscribe-auth/AdCCtVlu0-lpCIV8ZmPXSYYM8cmXKT3Vks5vWPDogaJpZM4brcRx .