Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/analyzable-fr/patch-based-texture-inpainting
Patch-based inpainting Python library
https://github.com/analyzable-fr/patch-based-texture-inpainting
computer-vision image image-processing inpainting machine-learning opencv opencv-python scikit-image scikit-learn
Last synced: 25 days ago
JSON representation
Patch-based inpainting Python library
- Host: GitHub
- URL: https://github.com/analyzable-fr/patch-based-texture-inpainting
- Owner: Analyzable-FR
- License: mit
- Created: 2022-08-20T19:51:17.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T21:08:11.000Z (over 1 year ago)
- Last Synced: 2024-10-11T16:23:09.834Z (25 days ago)
- Topics: computer-vision, image, image-processing, inpainting, machine-learning, opencv, opencv-python, scikit-image, scikit-learn
- Language: Python
- Homepage:
- Size: 31.8 MB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# patch-based-texture-inpainting
Based on "Image Quilting for Texture Synthesis and Transfer" and "Real-Time Texture Synthesis by Patch-Based Sampling" papers and from the implementation of anopara https://github.com/anopara/patch-based-texture-synthesis.
## Installation
```
pip install patch-based-inpainting
```## Usage
[Documentation](https://patch-based-texture-inpainting.readthedocs.io/en/latest/)```
The Inpaint object contains will performed patch-based inpainting.
Usage: create the object with parameters, call object.resolve().Parameters
----------
image : array
The image to inpaint.
mask : array
The mask of the same size as the image, all value > 0 will be inpainted.
patch_size : int
The size of one square patch.
overlap_size : int
The size of the overlap between patch.
training_area : array
The mask of the same size as the image, all value > 0 will be used for training.
window_step : int
The shape of the elementary n-dimensional orthotope of the rolling window view. If None will be autocomputed. Can lead to a RAM saturation if to small.
mirror_hor : bool
Compute the horizontal mirror of each patch for training.
mirror_vert : bool
Compute the vertical mirror of each patch for training.
rotation : list
Compute the given rotations in degrees of each patch for training.
method : str
Method to use for blending adjacent patches. blend: feathering blending ; linear: mean blending ; gaussian: gaussian blur blending ; None: no blending.
```## Example
![alt text](assets/1.gif)
![alt text](assets/2.gif)
![alt text](assets/3.gif)
![alt text](assets/4.gif)