ProGamerGov / neural-style-pt

PyTorch implementation of neural style transfer algorithm
MIT License
833 stars 178 forks source link

Multiple Style Images #61

Closed spot92 closed 4 years ago

spot92 commented 4 years ago

Is there some way to change what styles get used where in the final image? I thought that maybe reordering the style images would change the output (same as it works for style layers), but I got the same output each time. I am aware of the different style weightings for multiple input styles, but that does not change the location of the style in the final, more the size/intensity.

spot92 commented 4 years ago

It appears this may be an issue with the GUI that I made, it lists styles alphabetically always. Going to touch base with them to see if that can be fixed.

Actually, I tried this with the command line version and got no difference in output when reordering the style images. Original question stands.

ProGamerGov commented 4 years ago

Multiple style images are added together to create a single style target.

            elif self.target.nelement() == 0:
                self.target = self.G.detach().mul(self.blend_weight)
            else:
                self.target = self.target.add(self.blend_weight, self.G.detach())

You can use masked style transfer control where the styles end up, or you could try editing the content image.