This project is an implementation of this paper.
We have also used this paper for the Quilting Algorithm.
Given an input image of a weathered texture, this project aims to synthesize a series of textures emulating weathering and de-weathering processes, yielding a time-varying texture (like in the images below).
Example outputs:
The center subplot shows the input image, plots to the left of it are deweathered outputs and those to the right of it are weathered outputs.
This is done by computing an estimated age map of the texture based on the prevalence of similar patches in the texture. Further, using this age map, an intact texture is generated to achieve the desired results.
To produce de-weathered textures, the age map is manipulated to control an interpolation of the intact texture and the input texture. Weathered textures are synthesized by extrapolating the differences between the input texture and the intact texture.
This project aims at achieving these goals without any user interaction or assistance.
- Clone the repository and
cd
into the project directory.
git clone https://github.com/ShivanshRakesh/time-varying-weathering-in-texture-space.git
cd time-varying-weathering-in-texture-space/
- Install the dependencies using:
pip install -r requirements.txt
- Launch Jupyter Notebook in the project root using
jupyter-notebook
. - Navigate to
src/project.ipynb
and run all the cells to get the outputs for the default input textures.
- Custom input textures can be processed by passing the image path(s) as a list to the
run()
function. - Output images are written to
<project-root>/images/outputs/<image_name>/
if thewrite_output
argument ofrun()
is setTrue
.
.
├── images
│ :
│ └── outputs
│ :
├── src
│ ├── minimumCostPathFunc.py
│ ├── project.ipynb
│ └── textureTransfer.py
├── requirements.txt
└── README.md