texturedesign / texturize

🤖🖌️ Generate photo-realistic textures based on source images or (soon) PBR materials. Remix, remake, mashup! Useful if you want to create variations on a theme or elaborate on an existing texture.
GNU Affero General Public License v3.0
706 stars 32 forks source link

Glitches in generated textures #3

Closed alexjc closed 4 years ago

alexjc commented 4 years ago

It appears there are glitches in the outputs, which is especially a problem with low-precision and low-iterations. (See attached images.)

wood_brown wood_cedar

This was not as much of a problem with VGG19, and previously the outputs that converged appeared more reliable. This commit, which fixes exploding gradients for large images, may be the cause.

alexjc commented 4 years ago

As a workaround, increase the number of iterations with --iterations=200 (or higher) and improve precision with --precision=1e-8 (or lower). It'd be interesting to be able to detect such errors at the pixel level, maybe looking at the gradients?

alexjc commented 4 years ago

The optimizer is more stable now with [6bc90ef98f5fb87351e60710af17d2f0c4d08243]. Also, running at iterations of 200 or more is expected for HQ outputs.