Skip to main content

This is the python library to convert style of content image to given style image

Project description

neuralstyletransfer

This is the python library which takes two image content image and style image and provide the output image looks like a content image but painted in the style of provided reference style image

Usage

pip install neural-style-transfer

Import NeuralStyleTransfer class from Library

from neuralstyletransfer.style_transfer import NeuralStyleTransfer

create class object

nst = NeuralStyleTransfer()

Load the content image and style image from local path

nst.LoadContentImage(content_img_path)
nst.LoadStyleImage(style_img_path)

You can also load image from external URL by providing pathType='url' by default it is setted to 'local'

nst.LoadContentImage(content_url, pathType='url')
nst.LoadStyleImage(style_url, pathType='url')

Use default parameters to train the model

Default parameters are given below we can change it based on requirement by providing values on calling .apply method

  • contentWeight=1e3
  • styleWeight=1e-2
  • epochs=500
output = nst.apply()
output.save('output.jpg')

Content image

Style image

Output image

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neural-style-transfer-1.0.5.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neural_style_transfer-1.0.5-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file neural-style-transfer-1.0.5.tar.gz.

File metadata

  • Download URL: neural-style-transfer-1.0.5.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for neural-style-transfer-1.0.5.tar.gz
Algorithm Hash digest
SHA256 cc0e9075bbc45b905680ea0d642910fe8e362933fd4770a923d2119191eb8b90
MD5 e8a3a30028371566ebc4b4e48b53280b
BLAKE2b-256 31a709b33e9eb7d5236b9387d5e23acda521ccb7e159545ab8103fe4cb7dc569

See more details on using hashes here.

File details

Details for the file neural_style_transfer-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: neural_style_transfer-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for neural_style_transfer-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7697adf9f486cfa1a072a53b823aa500939bc1f715a77ea7f1d41e1b298ddda8
MD5 6f68d59e7a71689918b833276b0c8fbb
BLAKE2b-256 d62bfea5974cc674338ed05402abb4fdc1330f9f87c1ca4d6beeb044e010e8e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page