semvec/pypi-packages huggingface dataset:
neural-style-transfer 1.0.6
This is the python library to convert style of content image to given style image
License: Apache License 2.0

# 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
<img src="https://i.ibb.co/6mVpxGW/content.png" alt="content_image" width="200" height="300">

#### Style image
<img src="https://i.ibb.co/30nz9Lc/style.jpg" alt="style_image" width="200" height="300">

#### Output image
<img src="https://i.ibb.co/VgMbm9q/output.png" alt="output_image" width="200" height="300">