Coder Social home page Coder Social logo

fast_multi_style_transfer-tensorflow's People

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  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  avatar  avatar

fast_multi_style_transfer-tensorflow's Issues

Coco dataset

I'm trying to replicate the project but the COCO dataset link doesn't work. Do you know how could I get that?

ValueError: No variables to optimize.

when i run the training code, it reports:

E:\计算机视觉大作业\MultiStyle\Fast_Multi_Style_Transfer-tensorflow-master\Fast_Multi_Style_Transfer-tensorflow-master>python main.py -f 1 -gn 0 -p MST -n 10 -b 16 -tsd images/test -sti images/style_crop/0_udnie.jpg -ctd /mnt/cloud/Data/COCO/train2014 -scw 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2019-04-28 22:05:09.742580: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
WARNING:tensorflow:From C:\Users\jiefeng\Documents\SOFTWARE\Python\Anaconda\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
style_idx : [0]
Traceback (most recent call last):
  File "main.py", line 60, in <module>
    main()
  File "main.py", line 50, in main
    model = mst.mst(args, sess)
  File "E:\计算机视觉大作业\MultiStyle\Fast_Multi_Style_Transfer-tensorflow-master\Fast_Multi_Style_Transfer-tensorflow-master\src\multi_style_transfer.py", line 12, in __init__
    op.__init__(self, args, sess)
  File "E:\计算机视觉大作业\MultiStyle\Fast_Multi_Style_Transfer-tensorflow-master\Fast_Multi_Style_Transfer-tensorflow-master\src\op.py", line 45, in __init__
    self.build_model()
  File "E:\计算机视觉大作业\MultiStyle\Fast_Multi_Style_Transfer-tensorflow-master\Fast_Multi_Style_Transfer-tensorflow-master\src\multi_style_transfer.py", line 69, in build_model
    train_opt = tf.train.AdamOptimizer(self.learning_rate, self.momentum).minimize(loss, var_list=vars)
  File "C:\Users\jiefeng\Documents\SOFTWARE\Python\Anaconda\lib\site-packages\tensorflow\python\training\optimizer.py", line 403, in minimize
    grad_loss=grad_loss)
  File "C:\Users\jiefeng\Documents\SOFTWARE\Python\Anaconda\lib\site-packages\tensorflow\python\training\optimizer.py", line 506, in compute_gradients
    raise ValueError("No variables to optimize.")
ValueError: No variables to optimize.

For win10 python 3.5 error

my test.bat is
python main.py -f 0 -gn 0 -p MST -tsd images/test/ -scw 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
but have the following error

Traceback (most recent call last):
File "main.py", line 62, in
main()
File "main.py", line 52, in main
model = mst.mst(args, sess)
File "f:\test_tensorflow\Multi_style_transfer\src\multi_style_transfer.py", line 13, in init
op.init(self, args, sess)
File "f:\test_tensorflow\Multi_style_transfer\src\op.py", line 46, in init
self.build_model()
File "f:\test_tensorflow\Multi_style_transfer\src\multi_style_transfer.py", line 49, in build_model
MST_output = self.mst_net(self.content_input, style_control=self.style_control)
File "f:\test_tensorflow\Multi_style_transfer\src\multi_style_transfer.py", line 19, in mst_net
x = conv_layer(x, 32, 9, 1, style_control=style_control, name='conv1')
File "f:\test_tensorflow\Multi_style_transfer\src\layers.py", line 13, in conv_layer
net = tf.pad(net, [[0, 0], [p, p], [p, p], [0, 0]], "REFLECT")
File "C:\Users\duo\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1659, in pad
name=name)
File "C:\Users\duo\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 1641, in _mirror_pad
mode=mode, name=name)
File "C:\Users\duo\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 589, in apply_op
param_name=input_name)
File "C:\Users\duo\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 60, in _SatisfiesTypeConstraint
", ".join(dtypes.as_dtype(x).name for x in allowed_list)))
TypeError: Value passed to parameter 'paddings' has DataType float32 not in list of allowed values: int32, int64

please tell me how to correct this error?
thanks

about training

Hi, thank you for your jobs, I also try to training with 1 style images, my content include about 2000 images.
command: python main.py -f 1 -gn 0 -p MST -n 10 -b 16 -tsd images/test -scw 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -sti images/style_crop/0_udnie.jpg
but for output model, when I test it. the result is very bad, do you try less images training?
another problem, paper said, the transfer result is depend on style resolution, if style resolution is 256 then it can work for 256 resolution only. as I test your pertrained model, seems not follow this rule. do you do some improvement for that.

Plz help to check, Thank you!

AttributeError: 'NoneType' object has no attribute 'model_checkpoint_path'

Hello, I am just beginning to try to run your implementation.

These are the steps I have taken so far:

-Created environment with requisite dependencies
-Cloned your github project
-Downloaded project files from your external link and extracted them to their proper directories.

When I try to first test with:

python main.py -f 0 -gn 0 -p MST
-tsd images/test
-scw 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 \

I receive the following error:

major: 6 minor: 1 memoryClockRate (GHz) 1.531
pciBusID 0000:03:00.0
Total memory: 11.90GiB
Free memory: 10.50GiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id: 0000:03:00.0)
style_idx : 0
Traceback (most recent call last):
File "main.py", line 60, in
main()
File "main.py", line 56, in main
model.test(train_flag)
File "/home/shannon/Desktop/multistyle/Fast_Multi_Style_Transfer-tf/src/multi_style_transfer.py", line 80, in test
op.test(self,Train_flag)
File "/home/shannon/Desktop/multistyle/Fast_Multi_Style_Transfer-tf/src/op.py", line 99, in test
self.load()
File "/home/shannon/Desktop/multistyle/Fast_Multi_Style_Transfer-tf/src/multi_style_transfer.py", line 86, in load
op.load(self)
File "/home/shannon/Desktop/multistyle/Fast_Multi_Style_Transfer-tf/src/op.py", line 133, in load
ckpt_name = os.path.basename(ckpt.model_checkpoint_path)
AttributeError: 'NoneType' object has no attribute 'model_checkpoint_path'


Any idea to resolve this issue?

Also, for training I already have the COCO Train2014 dataset on my machine. When I go to train my own styles, where do I point your code towards my data folder containing Train2014? And do you recommend using the 2015 Test dataset instead?

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.