futscdav / strotss Goto Github PK
View Code? Open in Web Editor NEWReimplementation of Style Transfer by Relaxed Optimal Transport and Self-Similarity
Reimplementation of Style Transfer by Relaxed Optimal Transport and Self-Similarity
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...
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
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
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 :)
Hi,
Thanks for sharing your work!
I'm trying to understand the code,
and could you tell me what does spatial_feature_extract do?
Thanks!
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.