Comments (7)
Maybe your image contains the alpha channel, i.e., RGBA channels, while our code works on RGB channels. So there is a mismatch in the channel dimension (4 v.s. 3).
In addtion, the length and width of the image need to be a multiple of 8. For example, 255*255 should be resized to 256*256.
Or you can provide me with a link of your image and I will check it.
from shapematchinggan.
I just used Photoshop. It is easy to use and the user can control where to be used as foreground.
from shapematchinggan.
Thank you for such a quick response. I am trying to train the model on a different dataset but I have no background in photoshop. Can you please suggest steps you followed to convert the text data used in TET-GAN paper to data used in this paper? Any steps or reference link would be really helpful!
from shapematchinggan.
For a new style image, you may refer to the magic wand tool in photoshop (https://www.photoshopessentials.com/basics/selections/magic-wand-tool/)
to select its foreground. Then you fill the foreground with white and the remain region with black.
Next, use utils.text_image_preprocessing to transform black and white mask into distance-based mask (the blue and red one).
FInally, concatenate distance-based mask with your style image as the format of images in ../data/style/ and copy the result to ../data/style/.
Hope this help.
from shapematchinggan.
@williamyang1991 Thank you for this awesome project! I've followed these instructions and have obtained an image in the same format as the those in ../data/style/ (distance map on the left, original style reference on the right) and the network nearly makes it through the first epoch before throwing
"RuntimeError: The size of tensor a (256) must match the size of tensor b (255) at non-singleton dimension 1"
I'm almost certain it has to do with the way I may be formatting the image, but I'm unsure. Any ideas?
from shapematchinggan.
Changing the length & width of my image to multiples of 8 fixed the problem. Thank you!
from shapematchinggan.
That was really helpful! Thanks for the Photoshop instructions!
from shapematchinggan.
Related Issues (20)
- about other style image training HOT 3
- can you provide a javascript veision ?please
- run HOT 1
- error with trainStructureTransfer.py HOT 10
- higher resolution HOT 3
- RuntimeError: The size of tensor a (256) must match the size of tensor b (254) at non-singleton dimension 1 HOT 1
- could the network generalize to the unseen style
- What license do you have? HOT 2
- about training HOT 3
- RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 0 HOT 1
- One model for one style? HOT 4
- Can the Background become Transparent to merge with other images? HOT 2
- Testing with multiple scales in [0,n] HOT 1
- about testing multiple images HOT 1
- The stylization of a string HOT 2
- why training for 3 steps? HOT 4
- Is distance-based process necessary? HOT 2
- balloon special effects HOT 1
- I find some problem HOT 1
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 shapematchinggan.