Views
No views yet
| Model | Download | Download (with sample test data) | ONNX version | Opset version |
|---|---|---|---|---|
| Mosaic | 6.6 MB | 7.2 MB | 1.4 | 9 |
| Candy | 6.6 MB | 7.2 MB | 1.4 | 9 |
| Rain Princess | 6.6 MB | 7.2 MB | 1.4 | 9 |
| Udnie | 6.6 MB | 7.2 MB | 1.4 | 9 |
| Pointilism | 6.6 MB | 7.2 MB | 1.4 | 9 |
| Mosaic | 6.6 MB | 7.2 MB | 1.4 | 8 |
| Candy | 6.6 MB | 7.2 MB | 1.4 | 8 |
| Rain Princess | 6.6 MB | 7.2 MB | 1.4 | 8 |
| Udnie | 6.6 MB | 7.2 MB | 1.4 | 8 |
| Pointilism | 6.6 MB | 7.2 MB | 1.4 | 8 |
from PIL import Image
import numpy as np
# loading input and resize if needed
image = Image.open("PATH TO IMAGE")
size_reduction_factor = 1
image = image.resize((int(image.size[0] / size_reduction_factor), int(image.size[1] / size_reduction_factor)), Image.ANTIALIAS)
# Preprocess image
x = np.array(image).astype('float32')
x = np.transpose(x, [2, 0, 1])
x = np.expand_dims(x, axis=0)result = np.clip(result, 0, 255)
result = result.transpose(1,2,0).astype("uint8")
img = Image.fromarray(result)