No project description provided
Project description
simple-lama-inpainting
Installation
pip install simple-lama-inpainting
Usage
CLI
simple_lama <path_to_input_image> <path_to_mask_image> <path_to_output_image>
Integration to Your Code
Input formats: np.ndarray
or PIL.Image.Image
. (3 channel input image & 1 channel binary mask image where pixels with 255 will be inpainted).
Output format: PIL.Image.Image
from simple_lama_inpainting import SimpleLama
from PIL import Image
simple_lama = SimpleLama()
img_path = "image.png"
mask_path = "mask.png"
image = Image.open(img_path)
mask = Image.open(mask_path)
result = simple_lama(image, mask)
result.save("inpainted.png")
Sources
[1] Suvorov, R., Logacheva, E., Mashikhin, A., Remizova, A., Ashukha, A., Silvestrov, A., Kong, N., Goka, H., Park, K., & Lempitsky, V. (2021). Resolution-robust Large Mask Inpainting with Fourier Convolutions. arXiv preprint arXiv:2109.07161.
[2] https://github.com/saic-mdal/lama
[3] https://github.com/Sanster/lama-cleaner
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for simple_lama_inpainting-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 575cb6168b11af548976f737c00a5f31a4de503bd0c5f16ba5642941f98264fc |
|
MD5 | d69b8f1573ee3de0bfba6843ee5deb21 |
|
BLAKE2b-256 | 40ea5d211ee285fa225ed5a4ca4a34312711ed0ee30895f80cefdbce2a784cd3 |
Close
Hashes for simple_lama_inpainting-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8990e75d8c97dc40ccade133cc6fa1021069d9638708080c27dfcf22cf39bfb |
|
MD5 | c7201f3c8f0cc8cb55913efeebd2cd51 |
|
BLAKE2b-256 | 4b286f2f546247c122bfbde4050bb25f794dd0c413ea0a23b26727c41beed76b |