Comments (5)
已知pillow<=7.2.0,不知道其他的怎么样 另外,AttributeError: 'tuple' object has no attribute 'cpu'怎么办呢
把那边注释掉,直接用上面输出的output
from stytr-2.
已知pillow<=7.2.0,不知道其他的怎么样 另外,AttributeError: 'tuple' object has no attribute 'cpu'怎么办呢
把那边注释掉,直接用上面输出的output
我也是遇到了同样的问题,刚刚才学习python,请问能说一下具体怎么修改吗?
from stytr-2.
for content_path in content_paths:
for style_path in style_paths:
print(content_path)
content_tf1 = content_transform()
content = content_tf(Image.open(content_path).convert("RGB"))
h, w, c = np.shape(content)
style_tf1 = style_transform(h, w)
style = style_tf(Image.open(style_path).convert("RGB"))
style = style.to(device).unsqueeze(0)
content = content.to(device).unsqueeze(0)
with torch.no_grad():
output = network(content, style)
# output = output.cuda()
output = output
output_name = '{:s}/{:s}_stylized_{:s}{:s}'.format(
output_path, splitext(basename(content_path))[0],
splitext(basename(style_path))[0], save_ext
)
save_image(output[0], output_name)
You can copy this code to replace corresponding code on test.py
from stytr-2.
I replace the code with yours, but I got the output as this
from stytr-2.
from stytr-2.
Related Issues (20)
- 似乎StyTrans类中的this.embedding并没有实例化 HOT 3
- dataset HOT 1
- PatchEmbed源码和论文图中好像操作方法好像不太一样 HOT 4
- 作者您好!对于位置编码有一些疑问
- About the patch partition. HOT 1
- inference parameters
- Arbitrary output size instead of square HOT 3
- Request for elaboration regarding the Dataset HOT 2
- content leak HOT 1
- Error in running "train.py"
- 没有结果生成 HOT 5
- AttributeError: 'tuple' object has no attribute 'cpu' HOT 1
- Hello, thank you for your great work.
- Hi,please help me HOT 4
- About the metric score of StyTr2:Image Style Transfer with Transformers
- 关于代码中构建的transformer的问题
- running train.py get wrong
- 0
- 非常感谢你的论文做出的贡献
- I replace the code with yours, but I got the output as this![result](https://user-images.githubusercontent.com/53261018/186422373-0678c37a-8d2d-45ac-97cd-b772c99f0368.jpg) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stytr-2.