artificial-artwork


Nameartificial-artwork JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/boromir674/neural-style-transfer
SummaryCreate artificial artwork by transfering the appearance of one image (eg a famous painting) to another user-supplied image (eg your favourite photograph).
upload_time2024-11-08 15:57:06
maintainerKonstantinos Lampridis
docs_urlNone
authorKonstantinos Lampridis
requires_python<3.12,>=3.10
licenseAGPL-3.0-only
keywords artificial intelligence neural style transfer artificial art deep learning cli gui
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # Neural Style Transfer

> Create **artificial artwork** by transferring the appearance of one image (ie a famous painting) to another user-supplied image (e.g. your favorite photo).

**Documentation**: [https://boromir674.github.io/neural-style-transfer/](https://boromir674.github.io/neural-style-transfer/)

<div style="display: flex; align-items: center; margin-bottom: 25px;">
    <img src="./tests/data/canoe_water_w300-h225.jpg" alt="Demo Content Image" style="vertical-align: middle;">
    <span style="margin: 0 10px; font-size: 24px; vertical-align: middle;">+</span>
    <img src="./tests/data/blue-red_w300-h225.jpg" alt="Demo Style Image" style="vertical-align: middle;">
    <span style="margin: 0 10px; font-size: 24px; vertical-align: middle;">=</span>
    <img src="./tests/data/canoe_water_w300-h225.jpg+blue-red_w300-h225.jpg-100-demo-gui-run-1.png" alt="Demo Gen Image" style="vertical-align: middle;">
</div>

Uses a `Neural Style Transfer` algorithm to transfer the **style** (aka appearance), from one image, into the **contents** of another.


`Neural Style Transfer (NST)` is an algorithm that applies the `style` of an image to the `contents` of another and produces a `generated` image.  
The idea is to find out how someone, with the `painting style` shown in one image, would depict the `contents` shown in another image.

NST takes as INPUT a `Content` image (e.g. a picture taken with your camera) and a `Style` image (e.g. a Van Gogh painting) and `Generates` a new image.



# Overview
This project provides an `NST` algorithm through
- the `artificial_artwork` **Python package** (aka module)
- the `nst` **CLI**
- the `boromir674/neural-style-transfer` **Docker image**

<!-- This package exposes a configurable NST algorithm via a convenient CLI program. -->

| Build | Package | Containerization | Code Quality |
|-------|---------|------------------|--------------|
| ![CI Pipeline Status][ci-pipeline-status] | ![PyPI][pypi] ![Wheel][wheel] ![Python Versions][python-versions] ![Commits Since][commits-since] | ![Docker][docker] ![Image Size][image-size] | ![Codacy][codacy] ![Code Climate][code-climate] ![Maintainability][maintainability] ![Scrutinizer][scrutinizer] |


## Features
- VGG-19 Convolutional Neural Network, as `Image model`
- Selection of `style layers` at runtime
- Efficient Iterative Learning Algorithm, with `tensorflow`
- Fast minimization of loss/cost function with parallel/multicore execution
- Selection of Algorithm Termination Condition/Criteria, at runtime
- Periodic persistance of `Generated image`, during Learning loop

## Quick-start

Run a demo NST, on sample `Content` and `Style` Images:

```sh
mkdir art
export NST_HOST_MOUNT="$PWD/art"

docker-compose up

# Process runs, in containerized environment, and exits.
```

Check out your Generated Image! Artificial Artwork: art/canoe_water_w300-h225.jpg+blue-red_w300-h225.jpg-100.png

```shell
xdg-open art/canoe_water_w300-h225.jpg+blue-red_w300-h225.jpg-100.png
```

## Usage

Run the `nst` CLI with the `--help` option to see the available options.

```shell
docker run boromir674/neural-style-transfer:1.0.2 --help
```

## Development

### Installation

Install `nst` CLI and `artificial_artwork` python package from `pypi`:

Note: Installation on Debian-based Distros for Python 3.11 require `distutils` which is
not included in python3.11 standard distribution (but included in python3.10).

```shell
sudo apt-get install python3.11-distutils
```

```shell
pip install artificial_artwork
```

Only python3.8 wheel is included atm.


Sample commands to install the NST CLI from source, using a terminal:

```shell
git clone https://github.com/boromir674/neural-style-transfer.git
    
pip install ./neural-style-transfer
```

> The Neural Style Transfer - CLI heavely depends on Tensorflow (tf) and therefore it is crucial that tf is installed correctly in your Python environment.


[ci-pipeline-status]: https://img.shields.io/github/actions/workflow/status/boromir674/neural-style-transfer/test.yaml?branch=main&label=build&logo=github-actions&logoColor=233392FF
[pypi]: https://img.shields.io/pypi/v/artificial-artwork?color=blue&label=pypi&logo=pypi&logoColor=%23849ed9
[wheel]: https://img.shields.io/pypi/wheel/artificial-artwork?logo=python&logoColor=%23849ed9
[python-versions]: https://img.shields.io/pypi/pyversions/artificial-artwork?color=blue&logo=python&logoColor=%23849ed9
[commits-since]: https://img.shields.io/github/commits-since/boromir674/neural-style-transfer/v2.0.0/main?color=blue&logo=Github
[docker]: https://img.shields.io/docker/v/boromir674/neural-style-transfer/latest?logo=docker&logoColor=%23849ED9
[image-size]: https://img.shields.io/docker/image-size/boromir674/neural-style-transfer/latest?logo=docker&logoColor=%23849ED9
[codacy]: https://app.codacy.com/project/badge/Grade/07b27ac547a94708aefc5e845d2b6d01
[code-climate]: https://api.codeclimate.com/v1/badges/2ea98633f88b75e87d1a/maintainability
[maintainability]: https://img.shields.io/codeclimate/tech-debt/boromir674/neural-style-transfer?logo=CodeClimate
[scrutinizer]: https://img.shields.io/scrutinizer/quality/g/boromir674/neural-style-transfer/main?logo=scrutinizer-ci



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/boromir674/neural-style-transfer",
    "name": "artificial-artwork",
    "maintainer": "Konstantinos Lampridis",
    "docs_url": null,
    "requires_python": "<3.12,>=3.10",
    "maintainer_email": "k.lampridis@hotmail.com",
    "keywords": "artificial intelligence, neural style transfer, artificial art, deep learning, cli, gui",
    "author": "Konstantinos Lampridis",
    "author_email": "k.lampridis@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cb/3a/3a90b05f6dd31e54e463aad48f8cc35b7f24843a011c60796de674fd81bf/artificial_artwork-2.0.0.tar.gz",
    "platform": null,
    "description": "# Neural Style Transfer\n\n> Create **artificial artwork** by transferring the appearance of one image (ie a famous painting) to another user-supplied image (e.g. your favorite photo).\n\n**Documentation**: [https://boromir674.github.io/neural-style-transfer/](https://boromir674.github.io/neural-style-transfer/)\n\n<div style=\"display: flex; align-items: center; margin-bottom: 25px;\">\n    <img src=\"./tests/data/canoe_water_w300-h225.jpg\" alt=\"Demo Content Image\" style=\"vertical-align: middle;\">\n    <span style=\"margin: 0 10px; font-size: 24px; vertical-align: middle;\">+</span>\n    <img src=\"./tests/data/blue-red_w300-h225.jpg\" alt=\"Demo Style Image\" style=\"vertical-align: middle;\">\n    <span style=\"margin: 0 10px; font-size: 24px; vertical-align: middle;\">=</span>\n    <img src=\"./tests/data/canoe_water_w300-h225.jpg+blue-red_w300-h225.jpg-100-demo-gui-run-1.png\" alt=\"Demo Gen Image\" style=\"vertical-align: middle;\">\n</div>\n\nUses a `Neural Style Transfer` algorithm to transfer the **style** (aka appearance), from one image, into the **contents** of another.\n\n\n`Neural Style Transfer (NST)` is an algorithm that applies the `style` of an image to the `contents` of another and produces a `generated` image.  \nThe idea is to find out how someone, with the `painting style` shown in one image, would depict the `contents` shown in another image.\n\nNST takes as INPUT a `Content` image (e.g. a picture taken with your camera) and a `Style` image (e.g. a Van Gogh painting) and `Generates` a new image.\n\n\n\n# Overview\nThis project provides an `NST` algorithm through\n- the `artificial_artwork` **Python package** (aka module)\n- the `nst` **CLI**\n- the `boromir674/neural-style-transfer` **Docker image**\n\n<!-- This package exposes a configurable NST algorithm via a convenient CLI program. -->\n\n| Build | Package | Containerization | Code Quality |\n|-------|---------|------------------|--------------|\n| ![CI Pipeline Status][ci-pipeline-status] | ![PyPI][pypi] ![Wheel][wheel] ![Python Versions][python-versions] ![Commits Since][commits-since] | ![Docker][docker] ![Image Size][image-size] | ![Codacy][codacy] ![Code Climate][code-climate] ![Maintainability][maintainability] ![Scrutinizer][scrutinizer] |\n\n\n## Features\n- VGG-19 Convolutional Neural Network, as `Image model`\n- Selection of `style layers` at runtime\n- Efficient Iterative Learning Algorithm, with `tensorflow`\n- Fast minimization of loss/cost function with parallel/multicore execution\n- Selection of Algorithm Termination Condition/Criteria, at runtime\n- Periodic persistance of `Generated image`, during Learning loop\n\n## Quick-start\n\nRun a demo NST, on sample `Content` and `Style` Images:\n\n```sh\nmkdir art\nexport NST_HOST_MOUNT=\"$PWD/art\"\n\ndocker-compose up\n\n# Process runs, in containerized environment, and exits.\n```\n\nCheck out your Generated Image! Artificial Artwork: art/canoe_water_w300-h225.jpg+blue-red_w300-h225.jpg-100.png\n\n```shell\nxdg-open art/canoe_water_w300-h225.jpg+blue-red_w300-h225.jpg-100.png\n```\n\n## Usage\n\nRun the `nst` CLI with the `--help` option to see the available options.\n\n```shell\ndocker run boromir674/neural-style-transfer:1.0.2 --help\n```\n\n## Development\n\n### Installation\n\nInstall `nst` CLI and `artificial_artwork` python package from `pypi`:\n\nNote: Installation on Debian-based Distros for Python 3.11 require `distutils` which is\nnot included in python3.11 standard distribution (but included in python3.10).\n\n```shell\nsudo apt-get install python3.11-distutils\n```\n\n```shell\npip install artificial_artwork\n```\n\nOnly python3.8 wheel is included atm.\n\n\nSample commands to install the NST CLI from source, using a terminal:\n\n```shell\ngit clone https://github.com/boromir674/neural-style-transfer.git\n    \npip install ./neural-style-transfer\n```\n\n> The Neural Style Transfer - CLI heavely depends on Tensorflow (tf) and therefore it is crucial that tf is installed correctly in your Python environment.\n\n\n[ci-pipeline-status]: https://img.shields.io/github/actions/workflow/status/boromir674/neural-style-transfer/test.yaml?branch=main&label=build&logo=github-actions&logoColor=233392FF\n[pypi]: https://img.shields.io/pypi/v/artificial-artwork?color=blue&label=pypi&logo=pypi&logoColor=%23849ed9\n[wheel]: https://img.shields.io/pypi/wheel/artificial-artwork?logo=python&logoColor=%23849ed9\n[python-versions]: https://img.shields.io/pypi/pyversions/artificial-artwork?color=blue&logo=python&logoColor=%23849ed9\n[commits-since]: https://img.shields.io/github/commits-since/boromir674/neural-style-transfer/v2.0.0/main?color=blue&logo=Github\n[docker]: https://img.shields.io/docker/v/boromir674/neural-style-transfer/latest?logo=docker&logoColor=%23849ED9\n[image-size]: https://img.shields.io/docker/image-size/boromir674/neural-style-transfer/latest?logo=docker&logoColor=%23849ED9\n[codacy]: https://app.codacy.com/project/badge/Grade/07b27ac547a94708aefc5e845d2b6d01\n[code-climate]: https://api.codeclimate.com/v1/badges/2ea98633f88b75e87d1a/maintainability\n[maintainability]: https://img.shields.io/codeclimate/tech-debt/boromir674/neural-style-transfer?logo=CodeClimate\n[scrutinizer]: https://img.shields.io/scrutinizer/quality/g/boromir674/neural-style-transfer/main?logo=scrutinizer-ci\n\n\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0-only",
    "summary": "Create artificial artwork by transfering the appearance of one image (eg a famous painting) to another user-supplied image (eg your favourite photograph).",
    "version": "2.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/boromir674/neural-style-transfer/issues",
        "CI: Github Actions": "https://github.com/boromir674/neural-style-transfer/actions",
        "Changelog": "https://github.com/boromir674/neural-style-transfer/blob/master/CHANGELOG.rst",
        "Documentation": "https://neural-style-transfer.readthedocs.io/",
        "Homepage": "https://github.com/boromir674/neural-style-transfer",
        "Repository": "https://github.com/boromir674/neural-style-transfer",
        "Source Code": "https://github.com/boromir674/neural-style-transfer"
    },
    "split_keywords": [
        "artificial intelligence",
        " neural style transfer",
        " artificial art",
        " deep learning",
        " cli",
        " gui"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "220854f8b5b800b3ad567cd5426d39c8b9a8854e2562bf4934b0729562c2b7d3",
                "md5": "498b5b8b8b3fd546ecbcce2e2ec036cf",
                "sha256": "4c6fba3d134b611b42bfad52a470165bf07955e4164104cdfcbf5345c09a7ef0"
            },
            "downloads": -1,
            "filename": "artificial_artwork-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "498b5b8b8b3fd546ecbcce2e2ec036cf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.10",
            "size": 76384,
            "upload_time": "2024-11-08T15:57:05",
            "upload_time_iso_8601": "2024-11-08T15:57:05.259149Z",
            "url": "https://files.pythonhosted.org/packages/22/08/54f8b5b800b3ad567cd5426d39c8b9a8854e2562bf4934b0729562c2b7d3/artificial_artwork-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb3a3a90b05f6dd31e54e463aad48f8cc35b7f24843a011c60796de674fd81bf",
                "md5": "15622045a49e2837d42fbe88fa734a39",
                "sha256": "a941f19ce93cddfb873bd9ce238650ba985135a5ac558f230aaa9610903f5b6b"
            },
            "downloads": -1,
            "filename": "artificial_artwork-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "15622045a49e2837d42fbe88fa734a39",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.12,>=3.10",
            "size": 1371749,
            "upload_time": "2024-11-08T15:57:06",
            "upload_time_iso_8601": "2024-11-08T15:57:06.628981Z",
            "url": "https://files.pythonhosted.org/packages/cb/3a/3a90b05f6dd31e54e463aad48f8cc35b7f24843a011c60796de674fd81bf/artificial_artwork-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-08 15:57:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "boromir674",
    "github_project": "neural-style-transfer",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "circle": true,
    "tox": true,
    "lcname": "artificial-artwork"
}
        
Elapsed time: 0.50331s