Questions tagged [style-transfer]

45 questions
6
votes
0 answers

No OpKernel was registered to support Op 'Round' with these attrs. Registered devices: [CPU], Registered kernels:

I am getting error while trying to apply tensorflow model(.pb) in android, The model is loaded sucessfully but after that getting this error.I have trained tensorflow model on CPU.Any help will be appreciated. No OpKernel was registered to support…
4
votes
1 answer

Accessing files on google colab

i'm using Google Colaboratory IPython to do style transfer, after mounting my drive by running: from google.colab import drive drive.mount('/drive') It was mounted, so i tried to cd into a directory, show the pwd and ls but it doesn't display the…
3
votes
1 answer

Keras Style Transfer remove zero-center by mean pixel

I am working on the Image Style Transfer with Keras, but im stuck in the part of remove zero-center by mean pixel from __future__ import print_function from keras.preprocessing.image import load_img, img_to_array from scipy.misc import imsave import…
2
votes
0 answers

Batch Normalization Vs. Instance Normalization Vs. Adaptive Instance Normalization

What is the difference between Batch Normalization, Instance Normalization, Adaptive Instance Normalization layers in a CNN?Which one should be used in generative models for image stylization? I am actually trying to train a GAN model for style…
2
votes
1 answer

How to clip output of CNN to specific list of colours

Typical image GAN has output of shape (w,h,3) with values 0...1 that are then scaled to 0...255 to represent coloured image. So in each w,h position we get 3 values that together represent single colour in RGB space. I want to somehow limit that…
Kārlis Janisels
  • 1,265
  • 3
  • 18
  • 41
1
vote
2 answers

How to create a submodel from a pretrained model in pytorch without having to rewrite the whole architecture?

So, I have been working on neural style transfer in Pytorch, but I'm stuck at the point where we have to run the input image through limited number of layers and minimize the style loss. Long story short, I want to find a way in Pytorch to evaluate…
1
vote
0 answers

MLModel style transfer prediction. Scale effect(brushstrokes)

I have style transfer model which is trained by pytorch and converted by onnx to mlmodel. The style-image was 1500x2000. By using coremltools I set two sizes: 256x256 and 1500x2000. Now I can pass two image sizes to prediction process. Here are…
Artem
  • 364
  • 2
  • 18
1
vote
1 answer

TenserFlow, How to save style transfer model for later use?

I've been using this tutorial from TensorFlow's site to create a script (python3) that performs a style transfer. I'm trying to train a model on a particular art piece and then apply that style to any random photo. From my understanding of this…
user2863274
  • 13
  • 1
  • 3
1
vote
2 answers

How does TensorFlow compute the gradient of vgg19.preprocess_input?

I am following the tutorial on neural style transfer. The style transfer is done by minimizing a loss function with respect to an image (initialized with the content image). What confuses me is the following piece of code: preprocessed_input =…
1
vote
1 answer

Using placeholder but having an error 'NoneType' object has no attribute 'type'

I'm trying to obtain new image while combing two different ones, for style transfer. I have two images (one is the target and the other is the style). And I want to get new one from the two of them. target_image =…
Patrieszka
  • 63
  • 1
  • 9
1
vote
1 answer

Arbitrary Image Stylization module Colab example error

I keep getting this error when trying to run the example code for Arbitrary Image Stylization by the Tensorflow team hosted on Colab. This is the code. (As seen in this notebook, block 5 gives the error). from __future__ import absolute_import,…
GeorgeZ
  • 21
  • 4
1
vote
1 answer

how to write a keras custom loss function when you need the input value to calculate loss?

I'm trying to duplicate a fast style transfer paper (see diagram above) using the method described in keras built-in training and evaluation loops I'm having problems understanding how to do this with a custom loss class (see below). In order to…
michael
  • 4,377
  • 8
  • 47
  • 73
1
vote
1 answer

Save model as h5 / Save model as .ckpt

i have had big troubles today with saving formats while training a style-transfer neural network. The task is already solved i feel, i only need to save my model and load it again. But i can't find a proper way to do it. I used the following code…
1
vote
1 answer

Why does the Gramian Matrix work for VGG16 but not for EfficientNet or MobileNet?

A Neural Algorithm of Artistic Style uses the Gramian Matrix of the intermediate feature vectors of the VGG16 classification network trained on ImageNet. Back then, that was probably a good choice because VGG16 was one of the best-performing…
1
vote
1 answer

How can I fix AttributeError: module 'tensorflow' has no attribute 'ConfigProto'

I am new to deep learning and I get the following error when I try to run the command for image style transfer given in a tutorial I am using to learn. python evaluate.py --checkpoint ./rain-princess.ckpt --in-path --out-path…
Sir Blaze
  • 61
  • 2
  • 9
1
2 3