Package: seam-erasure
Seam ErasureSeamlessly erase seams from your favorite 3D models.Textures seams often produce errors when bi-linearly interpolated. This
results in a visible seam line or other undesired artifacts. The goal of this
project is to devise a numerical solution to this problem by minimizing the
difference between interpolated values of edge pairs. Works for various texture
maps regardless of useage (e.g. color maps, normal maps, displacement maps,
ambient occlusion, geometry images, and skinning weight textures).Read more:Research Project PagePaperVideoSeam Aware Decimation CodeInstallationTo install Seam Erasure use the following command in your terminal:pip install seam-erasureThis is the preferred method to install Seam Erasure.If you perfer to use Seam Erasure without installing it, you can clone the repo:git clone https://github.com/zfergus/seam-erasure.gitDependenciesIf you install Seam Erasure usingpipall dependencies will be installed. If you choose to use Seam Erasure without installing, you can install all required dependencies usingpip install -r requirements.txt.Dependencies include:numpy: linear algebrascipy: sparse matrix operationspillow: saving/loading texture image filesrecordclass: simple data objectstqdm: fancy progressbarsUsageIf you install usingpipaseam-erasuretool will be installed. You can use Seam Erase from the command line using the following command:seam-erasurepath/to/input_modelpath/to/input_texture[-h][-opath/to/output_texture][-g][--sv{none,texture,lerp}][-d]Positional arguments:path/to/input_model: Path to input mesh file.path/to/input_texture: Path to input texture image or directory to load all textures from.Optional arguments:-o path/to/output_texture,--output path/to/output_texture: Name of output texture or directory to save batch textures.-g,--global: Should the minimization have global effects? (default: False)This should be used if the texture has global discontinuities. This will propagate changes from the seam inward (see the teaser image for a example of global discontinties).--sv {none,texture,lerp}: What method should be used to compute the seam value
energy? (default:none)none: do not use a seam value termtexture: use difference in original texturelerp: use linearly interpolated values along the edgeValues are provided at the vertices in the.objas additional entries after the xyz triplet (e.g.v <x> <y> <z> [<r>] [<g>] [<b>] [<a>] ...where the additional channels are optional and must match the number of channels in the texture image).-d,--data: Should the input texture(s) be loaded as a.datafiles? (default: False)Note:if you did not install the code replaceseam-erasurein the above command withpython main.py.Filesseam_erasure/: Python package for Seam-Erasuremain.py: Command-line interface for seam erasure.server.py: Flask based Python code for handling web inputs.examples/: examples 3D model and texture files for testingstatic/: Static web page content including style sheetstemplates/: HTML template pagesWeb Browser UIThis repository also includes a Flask based server implementation that can be
run locally. This provides a simple webpage interface to provide model/texture
input and select options. To get this user interface run:python server.pyThis will start a server on the localhost. Navigate to the outputted address
in your choice of web browser to view the interface.ExamplesDiffuse TexturesBeforeAfterNormal MapsBeforeAfterAmbient OcclusionBeforeAfterGeometry ImagesBeforeAfter