#colornet Neural Network to colorize grayscale images
Grayscale | Prediction | Ground Truth |
---|
Eiji K used colornet for anime colorization
Neural Network to colorize grayscale images
#colornet Neural Network to colorize grayscale images
Grayscale | Prediction | Ground Truth |
---|
Eiji K used colornet for anime colorization
I get this error when I am doing graph_def.ParseFromString(fileContent). Any ideas on why this occurs or how to correct it?
I have a simple idea to make the colors appear brighter.
As I understand it. the program currently finds the colors for each object, and creates an average from them. For objects that have many different colors, it averages to a washed-out color. To fix this, why not have multiple averages per object? If 2 colors are too far apart, put them in separate averages. Then, once it's all done, delete the averages with very few averages.
This error info:
Traceback (most recent call last):
File "E:\robin\ColorNet\train.py", line 131, in
grayscale = tf.concat(3, [grayscale, grayscale, grayscale])
File "D:\ProgramFiles\Python\Python35\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1029, in concat
dtype=dtypes.int32).get_shape(
File "D:\ProgramFiles\Python\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 639, in convert_to_tensor
as_ref=False)
File "D:\ProgramFiles\Python\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 704, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "D:\ProgramFiles\Python\Python35\lib\site-packages\tensorflow\python\framework\constant_op.py", line 113, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "D:\ProgramFiles\Python\Python35\lib\site-packages\tensorflow\python\framework\constant_op.py", line 102, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "D:\ProgramFiles\Python\Python35\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 370, in make_tensor_proto
_AssertCompatible(values, dtype)
File "D:\ProgramFiles\Python\Python35\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
Anybody have meet this problem?How to solve?
i don't exactly know why i am facing this error.any solutions to it.
File "/home/atul/Desktop/train.py", line 196, in
pred = colornet(tensors)
File "/home/atul/Desktop/train.py", line 67, in colornet
conv1 = tf.nn.relu(tf.nn.conv2d(batch_norm(_tensors["conv4_3"], 512, phase_train),_tensors["weights"]["wc1"], [1, 1, 1, 1], 'SAME'))
File "/home/atul/Desktop/train.py", line 45, in batch_norm
x = bn.normalize(x, train=phase_train)
File "/home/atul/Desktop/batchnorm.py", line 45, in normalize
if train:
File "/home/atul/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 620, in nonzero
raise TypeError("Using a tf.Tensor
as a Python bool
is not allowed. "
TypeError: Using a tf.Tensor
as a Python bool
is not allowed. Use if t is not None:
instead of if t:
to test if a tensor is defined, and use TensorFlow ops such as tf.cond to execute subgraphs conditioned on the value of a tensor.
W1209 14:04:14.659156 34370101248 deprecation_wrapper.py:119] From train.py:159: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.
Traceback (most recent call last):
File "train.py", line 160, in <module>
graph_def.ParseFromString(fileContent)
File "/usr/local/lib/python3.6/site-packages/google/protobuf/message.py", line 187, in ParseFromString
return self.MergeFromString(serialized)
File "/usr/local/lib/python3.6/site-packages/google/protobuf/internal/python_message.py", line 1128, in MergeFromString
if self._InternalParse(serialized, 0, length) != length:
File "/usr/local/lib/python3.6/site-packages/google/protobuf/internal/python_message.py", line 1180, in InternalParse
buffer, new_pos, wire_type) # pylint: disable=protected-access
File "/usr/local/lib/python3.6/site-packages/google/protobuf/internal/decoder.py", line 952, in _DecodeUnknownField
raise _DecodeError('Wrong wire type in tag.')
google.protobuf.message.DecodeError: Wrong wire type in tag.
py36-tensorflow-1.14.0
First, the standard disclaimer: I am not a lawyer, and this does not constitute legal or financial advice.
Generally, IMHO, it is a good idea to use FSF or OSI Approved Licenses (which can be found here https://www.gnu.org/licenses/licenses.html and here http://opensource.org/licenses/category)
The Free Software Foundation has a useful guide for choosing a license: https://www.gnu.org/licenses/license-recommendations.html
I often reference the Software Freedom Law Center's Legal Primer for both practical and academic purposes (highly recommended): https://www.softwarefreedom.org/resources/2008/foss-primer.html#x1-60002.2
https://tldrlegal.com/ is quite a useful resource for comparing the various FOSS licenses out there once you have some context
To get ahold of actual lawyers/advisors who help FOSS projects, you can reach out to the FSF, SFLC, and OSI at:
[email protected]
[email protected]
[email protected]
Hope this helps, and happy hacking!
Hey Pavel
Awesome work, and I love to chat more and see if you are interested in working on chat bots. We're hiring talented developers like yourself to work on a revolutionary product on top of messaging platforms like FB Messenger, Viber, Kik, Telegram, etc.
thanks!!
filenames = sorted(glob.glob("../colornet//.jpg"))
File "train.py", line 179, in
colorimage = input_pipeline(filenames, batch_size, num_epochs=num_epochs)
File "train.py", line 31, in input_pipeline
filenames, num_epochs=num_epochs, shuffle=False)
This might be out of the scope of this application, but throwing it out there...
I was thinking if you could provide or determine the location, date/time and orientation... you could more easily predict the appropriate tone of certain colors. Maybe it could even go so far as to determining the time of day based on shadow angles.
For instance, for your lighthouse example: Knowing the time of day would clue the app to determine the sky should be warmer, instead of assuming a blueish hue.
Does, anyone have any clue, or is there any script, so as how to test the trained model? It would be quite nice to try it on few B/W images.
Traceback (most recent call last):
File "train.py", line 160, in
graph_def.ParseFromString(fileContent)
google.protobuf.message.DecodeError: Error parsing messag
i want to know which tf version can support this code??
thanks
@pavelgonchar
any idea about how to solve it?.
thanks!
libpng warning: Application was compiled with png.h from libpng-1.6.22
libpng warning: Application is running with png.c from libpng-1.2.53
libpng error: Incompatible libpng version in application and library
Is it possible to add a "Getting Started" to the README ? 🙌🏼
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.