Git Product home page Git Product logo

strotss's People

Contributors

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

strotss's Issues

Blurry Generated Images

Hi,

thanks for sharing your work here! I noticed that this Implementation generates slightly blurred images when compared to other Implementations like Gatys:

This Implementation:
lion_face_paint_1024

Gatys:
lion_face_paint jpg

Do you know why this is the case and how this could be improved?

Thanks and best regards

any way to use a seed for the random values?

i am wondering if it may be possible to get "repeatable" outputs, when locking all random stuff in the code to a seed?
or is it in strotss' nature to be random?

btw: I love this repo so much. its handy to use and easy to install... brilliant. thank you again!
Currently I am doing experiments with 1k resolution and 1000 iterations... yes takes some time, but the results are just so stunning...

why do not use progress method?

Thanks for your code. I have a question that the official code optimized all steps and then progress from low sr to high sr; however, in your code, you progress from low sr to high sr in every step; is it right?
in official:
for i in range(resolution_num):
for j in step:
XXXXX
in your code:
for j in step:
for i in range(resolution_num):
XXXXX

RuntimeError: Given input size: (512x1x3). Calculated output size: (512x0x1). Output size is too small

Dear Futscdav

I faced this error while using some style images. could you please check? thanks!

Actually the images used be me are big enough. >=1024.

The following is the detail logs.

Traceback (most recent call last):

File "index-8023.py", line 169, in ai_photo
run_strotss(
File "C:\Qsync\ai\ai-tools\8023-pytorch-neural-style-transfer\strotss.py", line 451, in run_strotss
result = strotss(pil_resize_long_edge_to(content_pil, args.resize_to),
File "C:\Qsync\ai\ai-tools\8023-pytorch-neural-style-transfer\strotss.py", line 413, in strotss
result = optimize(result, content, style, scale, content_weight=content_weight, lr=lr, extractor=extractor)
File "C:\Qsync\ai\ai-tools\8023-pytorch-neural-style-transfer\strotss.py", line 355, in optimize
feat_e = extractor.forward_samples_hypercolumn(style, samps=1000) #ruanjiyang , 寻找多少个features,缺省是1000,修改为500可以节约不少时间。效果稍微减弱。
File "C:\Qsync\ai\ai-tools\8023-pytorch-neural-style-transfer\strotss.py", line 42, in forward_samples_hypercolumn
feat = self.forward(X)
File "C:\Qsync\ai\ai-tools\8023-pytorch-neural-style-transfer\strotss.py", line 38, in forward
feat = self.forward_base(x)
File "C:\Qsync\ai\ai-tools\8023-pytorch-neural-style-transfer\strotss.py", line 29, in forward_base
x = self.vgg_layersi
File "C:\Users\qruan\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\qruan\Anaconda3\lib\site-packages\torch\nn\modules\pooling.py", line 153, in forward
return F.max_pool2d(input, self.kernel_size, self.stride,
File "C:\Users\qruan\Anaconda3\lib\site-packages\torch_jit_internal.py", line 267, in fn
return if_false(*args, **kwargs)
File "C:\Users\qruan\Anaconda3\lib\site-packages\torch\nn\functional.py", line 585, in _max_pool2d
return torch.max_pool2d(
RuntimeError: Given input size: (512x1x3). Calculated output size: (512x0x1). Output size is too small

Larger sizes?

Hi, is there a parameter or code change that lets the max dimension be 1024 instead of 512?

Thank you and thanks for the fun code :)

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.