Comments (3)
There's been some issue to get color preservation working once scipy stopped supporting imread and imsave. I'd suggest going down to a version which uses older scipy and perform colorization post training
from neural-style-transfer.
I encounter this too.Win10 tensorflow 2.3 and Keras 2.4.3 and all latest version required libraries.
Finally figured out that this is due to some glitch on conversion between rgb and ycbcr and also between uint8 and float64,
and al the same for working around among PIL,skimage,imageio.
It's not a wise choose to fix all the glitches one by one because those libraries are not designed to work together in a decent way.
Get it solved by removing all implementation using PIL,imageio and skimage.All of these will be done by cv2 only.
And also conversion between RGB and BGR is done by cv2 rather than x=x[:,:,::-1], which just in some case, can cause unexpected result where you never imagine to be.
from neural-style-transfer.
I know I'm late to the party, but to fix it you can update the fromimage
function in utils.py
from
def fromimage(img, mode="RGB"):
if mode == "RGB":
img = color.lab2rgb(img)
else:
img = color.rgb2lab(img)
return img
to
def fromimage(img, mode="RGB"):
return np.array(img.convert(mode))
as a bonus you don't need the scikit-image
library anymore since it's used only for that from what I could see
from neural-style-transfer.
Related Issues (20)
- [Question] Content mask format HOT 5
- how to run the script on multiples GPU?
- ImportError: cannot import name 'imread' HOT 5
- Google colab neural style transfer HOT 2
- error in MRFNetwork.py HOT 1
- could we apply fast-style-transfer to image deformation? HOT 2
- Update documentation to reflect that tensorflow works on Windows now
- Replace tf.gradients with tf.GradientTape : RuntimeError HOT 2
- ValueError: Tensor conversion requested dtype float32 for Tensor with dtype int32: 'Tensor("strided_slice_8:0", shape=(), dtype=int32)' HOT 1
- script helper
- script helper
- Saving model
- RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead. HOT 5
- convert_all_kernels_in_model removed from tf2 HOT 1
- RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead. HOT 2
- neural doodle
- broken and unusable HOT 1
- Tensorflow 1 is unsupported in Colab
- Hello, I'm sorry to bother you. I need help
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neural-style-transfer.