Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


Texture synthesis in Torch

Subscribe to updates I use texture-synthesis

Statistics on texture-synthesis

Number of watchers on Github 50
Number of open issues 0
Average time to close an issue about 1 hour
Main language Lua
Open pull requests 0+
Closed pull requests 0+
Last commit almost 5 years ago
Repo Created almost 5 years ago
Repo Last Updated over 2 years ago
Size 15 MB
Organization / Authorjcjohnson
Page Updated
Do you use texture-synthesis? Leave a review!
View texture-synthesis activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating texture-synthesis for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


This is a Torch implementation of a texture-synthesis algorithm very similar to [1].

Given an input texture patch, the algorithm generates a larger version of the same texture. Here's an example:



You can see more examples in the example gallery.


Texture synthesis is implemented in the script synthesis.lua. The following command line options are available:

  • -source: Path to the source image.
  • -output_file: Path where the output should be written.
  • -height: Height of the output file, in pixels.
  • -width: Width of the output file, in pixels.
  • -k: Kernel size; must be an odd integer.
  • -gpu: Which GPU to use. Setting gpu >= 0 will run in GPU mode, and setting gpu < 0 will run in CPU-only mode.

You can see examples using different source images and kernel sizes in the example gallery.

Works Cited:

[1] Efros, Alexei, and Thomas K. Leung. Texture synthesis by non-parametric sampling. ICCV 1999.

texture-synthesis questions on Stackoverflow (View All Questions)
  • Texture synthesis with Javascript
  • Dynamic Texture Synthesis(ocean wave model)
texture-synthesis list of languages used
Other projects in Lua