Coder Social home page Coder Social logo

anime-style-transfer's People

Contributors

racinmat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

anime-style-transfer's Issues

no requirements

I think you could write a requirements, because I have some problem when I do test

'import/real-anime-gen/c-7-1-64-r/Conv2D' (op: 'Conv2D') with input shapes: [1,?,512,512,?], [7,7,3,64]

I have some problems like this

Traceback (most recent call last):
  File "/home/evga/anaconda3/envs/mlj7/lib/python3.7/site-packages/tensorflow/python/framework/importer.py", line 427, in import_graph_def
    graph._c_graph, serialized, options)  # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shape must be rank 4 but is rank 5 for 'import/real-anime-gen/c-7-1-64-r/Conv2D' (op: 'Conv2D') with input shapes: [1,?,512,512,?], [7,7,3,64].

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "transform.py", line 175, in <module>
    tf.app.run()
  File "/home/evga/anaconda3/envs/mlj7/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/home/evga/anaconda3/envs/mlj7/lib/python3.7/site-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/home/evga/anaconda3/envs/mlj7/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "transform.py", line 153, in main
    transform_files(im_paths)
  File "transform.py", line 137, in transform_files
    feeder, ceil(len(im_paths) / FLAGS.batchsize), FLAGS.batchsize, persist_images_postprocessing)
  File "/home/evga/work/mlj/mlj-demo/face_dongman/anime-style-transfer/code/mod-cycle-gan/cycle/_model.py", line 398, in test_one_part
    d_input, d_output, output = CycleGAN.get_graph_outputs(graph, dataset[0], pb_model)
  File "/home/evga/work/mlj/mlj-demo/face_dongman/anime-style-transfer/code/mod-cycle-gan/cycle/_model.py", line 430, in get_graph_outputs
    input_map={'input': input_var},return_elements=CycleGAN.OUTPUT_NODES)))
  File "/home/evga/anaconda3/envs/mlj7/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/evga/anaconda3/envs/mlj7/lib/python3.7/site-packages/tensorflow/python/framework/importer.py", line 431, in import_graph_def
    raise ValueError(str(e))
ValueError: Shape must be rank 4 but is rank 5 for 'import/real-anime-gen/c-7-1-64-r/Conv2D' (op: 'Conv2D') with input shapes: [1,?,512,512,?], [7,7,3,64].

can anyone give me some answer.

Error in transform.py

I trained my network with my own data set and got the .pb file, but I can't run transform.py
This is the error I get. I get stuck in orig_names.map(load_image, num_parallel_calls=10)
There were some errors in the train code too like locations of files so I think this one is relative to it. Can you please check this? I put the .pb file in export/(Date)/ like you did. (But it was made inside my checkpoint folder. I think this is another error in train.py) + I can not transform using your pb file.


WARNING: Logging before flag parsing goes to stderr.
W0907 01:16:41.153303 140425955747584 deprecation_wrapper.py:119] From /media/kaist/새 볼륨1/CycleGan-anime-tensorflow/code/mod-cycle-gan/cycle/_model.py:446: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.

W0907 01:16:41.156838 140425955747584 deprecation_wrapper.py:119] From transform.py:174: The name tf.app.run is deprecated. Please use tf.compat.v1.app.run instead.

using images in path: ./test_data/Coco-stuff/*.jpg
will transform 8 images:
rundir: 2019-09-04--17-15-0 cpdir: ../../checkpoint
model loaded, starting with inference
W0907 01:16:41.162252 140425955747584 deprecation_wrapper.py:119] From transform.py:93: The name tf.read_file is deprecated. Please use tf.io.read_file instead.

W0907 01:16:41.169234 140425955747584 deprecation.py:323] From transform.py:111: ignore_errors (from tensorflow.contrib.data.python.ops.error_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.data.experimental.ignore_errors().
W0907 01:16:41.175783 140425955747584 deprecation_wrapper.py:119] From /media/kaist/새 볼륨1/CycleGan-anime-tensorflow/code/mod-cycle-gan/images_to_tfrecord.py:32: The name tf.image.resize_image_with_pad is deprecated. Please use tf.compat.v1.image.resize_image_with_pad instead.

Traceback (most recent call last):
File "transform.py", line 174, in
tf.app.run()
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "transform.py", line 151, in main
transform_files(im_paths)
File "transform.py", line 113, in transform_files
reshaped_images = orig_images.map(reshape_image, num_parallel_calls=10)
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 1776, in map
self, map_func, num_parallel_calls, preserve_cardinality=False))
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 3228, in init
use_legacy_function=use_legacy_function)
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 2555, in init
self._function = wrapper_fn._get_concrete_function_internal()
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1355, in _get_concrete_function_internal
*args, **kwargs)
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1349, in _get_concrete_function_internal_garbage_collected
graph_function, _, _ = self._maybe_define_function(args, kwargs)
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1652, in _maybe_define_function
graph_function = self._create_graph_function(args, kwargs)
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1545, in _create_graph_function
capture_by_value=self._capture_by_value),
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py", line 715, in func_graph_from_py_func
func_outputs = python_func(*func_args, **func_kwargs)
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 2549, in wrapper_fn
ret = _wrapper_helper(*args)
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 2489, in _wrapper_helper
ret = func(*nested_args)
File "transform.py", line 99, in reshape_image
image = process_sample_tf(image, True)
File "/media/kaist/새 볼륨1/CycleGan-anime-tensorflow/code/mod-cycle-gan/images_to_tfrecord.py", line 32, in process_sample_tf
return tf.image.resize_image_with_pad(image, IMAGE_HEIGHT, IMAGE_WIDTH)
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/image_ops_impl.py", line 1429, in resize_image_with_pad_v1
_resize_fn)
File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/image_ops_impl.py", line 1335, in _resize_image_with_pad_common
assert_ops += _assert(target_width > 0, ValueError,
TypeError: '>' not supported between instances of 'NoneType' and 'int'
E0907 01:16:41.250029 140425955747584 tf_should_use.py:71] ==================================
Object was never used (type <class 'tensorflow.python.framework.ops.Operation'>):
<tf.Operation 'resize_image_with_pad/assert_greater_equal/Assert/Assert' type=Assert>
If you want to mark it as used call its "mark_used()" method.
It was originally created here:
File "transform.py", line 174, in
tf.app.run() File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/absl/app.py", line 310, in run
raise File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv)) File "transform.py", line 151, in main
transform_files(im_paths) File "transform.py", line 118, in transform_files
feeder = iterator.get_next() File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 1776, in map
self, map_func, num_parallel_calls, preserve_cardinality=False)) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 3228, in init
use_legacy_function=use_legacy_function) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 2557, in init
self._function.add_to_graph(ops.get_default_graph()) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1355, in _get_concrete_function_internal
*args, **kwargs) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1349, in _get_concrete_function_internal_garbage_collected
graph_function, _, _ = self._maybe_define_function(args, kwargs) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1654, in _maybe_define_function
return graph_function, args, kwargs File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1545, in _create_graph_function
capture_by_value=self._capture_by_value), File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py", line 755, in func_graph_from_py_func
func_graph.variables = variables File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 2549, in wrapper_fn
ret = _wrapper_helper(*args) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 2489, in _wrapper_helper
ret = func(*nested_args) File "transform.py", line 99, in reshape_image
image = process_sample_tf(image, True) File "/media/kaist/새 볼륨1/CycleGan-anime-tensorflow/code/mod-cycle-gan/images_to_tfrecord.py", line 32, in process_sample_tf
return tf.image.resize_image_with_pad(image, IMAGE_HEIGHT, IMAGE_WIDTH) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/image_ops_impl.py", line 1429, in resize_image_with_pad_v1
_resize_fn) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/image_ops_impl.py", line 1387, in _resize_image_with_pad_common
return padded File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/image_ops_impl.py", line 237, in _CheckAtLeast3DImage
message="'image' must be at least three-dimensional.") File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/check_ops.py", line 1119, in assert_greater_equal
return control_flow_ops.Assert(condition, data, summarize=summarize) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/util/tf_should_use.py", line 193, in wrapped
return _add_should_use_warning(fn(*args, **kwargs))

E0907 01:16:41.250370 140425955747584 tf_should_use.py:71] ==================================
Object was never used (type <class 'tensorflow.python.framework.ops.Operation'>):
<tf.Operation 'resize_image_with_pad/assert_positive/assert_less/Assert/Assert' type=Assert>
If you want to mark it as used call its "mark_used()" method.
It was originally created here:
File "transform.py", line 174, in
tf.app.run() File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/absl/app.py", line 310, in run
raise File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv)) File "transform.py", line 151, in main
transform_files(im_paths) File "transform.py", line 118, in transform_files
feeder = iterator.get_next() File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 1776, in map
self, map_func, num_parallel_calls, preserve_cardinality=False)) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 3228, in init
use_legacy_function=use_legacy_function) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 2557, in init
self._function.add_to_graph(ops.get_default_graph()) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1355, in _get_concrete_function_internal
*args, **kwargs) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1349, in _get_concrete_function_internal_garbage_collected
graph_function, _, _ = self._maybe_define_function(args, kwargs) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1654, in _maybe_define_function
return graph_function, args, kwargs File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/eager/function.py", line 1545, in _create_graph_function
capture_by_value=self._capture_by_value), File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py", line 755, in func_graph_from_py_func
func_graph.variables = variables File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 2549, in wrapper_fn
ret = _wrapper_helper(*args) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 2489, in _wrapper_helper
ret = func(*nested_args) File "transform.py", line 99, in reshape_image
image = process_sample_tf(image, True) File "/media/kaist/새 볼륨1/CycleGan-anime-tensorflow/code/mod-cycle-gan/images_to_tfrecord.py", line 32, in process_sample_tf
return tf.image.resize_image_with_pad(image, IMAGE_HEIGHT, IMAGE_WIDTH) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/image_ops_impl.py", line 1429, in resize_image_with_pad_v1
_resize_fn) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/image_ops_impl.py", line 1387, in _resize_image_with_pad_common
return padded File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/image_ops_impl.py", line 237, in _CheckAtLeast3DImage
message="'image' must be at least three-dimensional.") File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/check_ops.py", line 267, in assert_positive
return assert_less(zero, x, data=data, summarize=summarize) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/check_ops.py", line 862, in assert_less
return control_flow_ops.Assert(condition, data, summarize=summarize) File "/home/kaist/anaconda3/envs/Tensorflow/lib/python3.6/site-packages/tensorflow/python/util/tf_should_use.py", line 193, in wrapped
return _add_should_use_warning(fn(*args, **kwargs))

Repl Closed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.