endywon / microast Goto Github PK
View Code? Open in Web Editor NEWOfficial Pytorch code for "MicroAST: Towards Super-Fast Ultra-Resolution Arbitrary Style Transfer" (AAAI 2023)
License: MIT License
Official Pytorch code for "MicroAST: Towards Super-Fast Ultra-Resolution Arbitrary Style Transfer" (AAAI 2023)
License: MIT License
F:\MicroAST-main>python test_microAST.py --content inputs/content/1.jpg --style inputs/style/shuimo2.jpg
Traceback (most recent call last):
File "test_microAST.py", line 120, in
output = network(content, style, args.alpha)
File "D:\python3.7\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "F:\MicroAST-main\net_microAST.py", line 317, in forward
style_feats = self.style_encoder(style)
File "D:\python3.7\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "F:\MicroAST-main\net_microAST.py", line 64, in forward
x1 = self.enc1(x)
File "D:\python3.7\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "D:\python3.7\lib\site-packages\torch\nn\modules\container.py", line 204, in forward
input = module(input)
File "D:\python3.7\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "F:\MicroAST-main\net_microAST.py", line 18, in forward
x = self.conv_layer(x)
File "D:\python3.7\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "D:\python3.7\lib\site-packages\torch\nn\modules\conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "D:\python3.7\lib\site-packages\torch\nn\modules\conv.py", line 460, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: Given groups=1, weight of size [16, 3, 9, 9], expected input[1, 4, 775, 511] to have 3 channels, but got 4 channels instead
Thanks for your sharing your code. It's wonderful work I think~~
I have one question about the calc_cs_loss.py. when I would like to calculate the StyleLoss or ContenLoss by using the calc_cs_loss.py, the code mentioned that cuda out of memory. My device is an NVIDIA RTX 3090 GPU (24G). May I know how can I calculate the style loss and content loss? In your paper, you just use one NVIDIA RTX 2080 GPU.
what an excellent work about your StyleDiffusion. I am so interested about your work, would you please share this code?
from skimage.metrics import structural_similarity as ssim
def SSIM(stylized,content):
ssim_=ssim(stylized,content, multichannel=True)
#ssim_=ssim(stylized,content , win_size=11, multichannel=True,sigma=1.5, data_range=1, use_sample_covariance=False, gaussian_weights=True)
return ssim_
I enjoyed reading the paper and would love to play with the model. What are your plans in regards to the code release?
Hi, thank you for sharing your work.
I currently have it running video with a 1920x1080 content input (>30 fps), but I'm not really seeing a style transfer with the weights posted here. I definitely see color transfer, but it's not really picking up spatial style details.
I've also ran it just with your script for testing images, and I don't really see the style transfer there as well. Just color replacement, blurring, and some artifacts.
Am I missing something? Do I need to train before testing? If I do have to train, can you give me an idea of how long it would take with N GPUs?
Thanks,
Keith
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.