ONNX Model Zoo

onnxmodelzoo/pointilism-9

By onnxmodelzoo · ↓ 0 · ♥ 0 · Updated 2025-09-30

What's in this repo

This page lists the files in onnxmodelzoo/pointilism-9, including pointilism-9.onnx.

  • 1 ONNX models (.onnx files)
  • 3 files, including 1 .md, 1 .onnx
  • Last updated 2025-09-30

ONNX files

File Size Download
pointilism-9.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README


language: en license: apache-2.0 model_name: pointilism-9.onnx tags:

  • validated
  • vision
  • style_transfer
  • fast_neural_style

Fast Neural Style Transfer

Use-cases

This artistic style transfer model mixes the content of an image with the style of another image. Examples of the styles can be seen in this PyTorch example.

Description

The model uses the method described in Perceptual Losses for Real-Time Style Transfer and Super-Resolution along with Instance Normalization.

Model

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

Inference

Refer to style-transfer-ort.ipynb for detailed preprocessing and postprocessing.

Input to model

The input to the model are 3-channel RGB images. The images have to be loaded in a range of [0, 255]. If running into memory issues, try resizing the image by increasing the scale number.

Preprocessing steps

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)

Output of model

The converted ONNX model outputs a NumPy float32 array of shape [1, 3, ‘height’, ‘width’]. The height and width of the output image are the same as the height and width of the input image.

Postprocessing steps

result = np.clip(result, 0, 255)
result = result.transpose(1,2,0).astype("uint8")
img = Image.fromarray(result)

Dataset (Train and validation)

The original fast neural style model is from pytorch/examples/fast_neural_style. All models are trained using the COCO 2014 Training images dataset [80K/13GB].


Training

Refer to pytorch/examples/fast_neural_style for training details in PyTorch. Refer to conversion.ipynb to learn how the PyTorch models are converted to ONNX format.


References

Original style transfer model in PyTorch:


Contributors

Jennifer Wang


License

BSD-3-Clause


Model info

onnx validated vision style_transfer fast_neural_style en arxiv:1603.08155 arxiv:1607.08022 license:apache-2.0 region:us
↓ 0 ♥ 0

Created: 2025-09-30

Updated: 2025-09-30

View on Hugging Face

Files (3)

.gitattributes
README.md
pointilism-9.onnx ONNX

Related models