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
Built Distribution
Close
Hashes for neural-style-transfer-1.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5904303334536e1b7f8bd8d8c2bb654c832874e7432aabee86ed9765c3c37778 |
|
MD5 | a2ebb2c8a29aefc59f76e43033575649 |
|
BLAKE2b-256 | 62410b62e007b64df3041c7599e622f5c1cfec9b4af32c20c308e5666117da54 |
Close
Hashes for neural_style_transfer-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0cb5b82af0c3e4afce2d31d805c2f53be6e563b7d8a6c8fb7f29549f7c85759 |
|
MD5 | 2877931a148fb2a72736c672043ef6bf |
|
BLAKE2b-256 | b9800c6767a8efc0f09ff182405ba18e24e63ccfc135fc8bebec6ebd747e275a |