/ml4a

A python library and collection of notebooks for making art with machine learning.

Primary LanguagePythonMIT LicenseMIT


ml4a
Machine Learning for Artists

ml4a is a Python library for making art with machine learning. It features:

Example

ml4a bundles the source code of various open source repositories as git submodules and contains wrappers to streamline and simplify them. For example, to generate sample images with StyleGAN2:

from ml4a import image
from ml4a.models import stylegan

network_pkl = stylegan.get_pretrained_model('ffhq')
stylegan.load_model(network_pkl)

samples = stylegan.random_sample(3, labels=None, truncation=1.0)
image.display(samples)

Every model in ml4a.models, including the stylegan module above, imports all of the original repository's code into its namespace, allowing low-level access.

Support ml4a

Become a sponsor

You can support ml4a by donating through GitHub sponsors.

How to contribute

Start by joining the Slack or following us on Twitter. Contribute to the codebase, or help write tutorials.

License

ml4a itself is licensed MIT, but you are also bound to the licenses of any models you use.