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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca776cc69f529a4d7e6d7a19d862e358239891410bb52d8dff30372224974316 |
|
MD5 | 956a7c9e0ff56210d35ad73fd2dbe1c1 |
|
BLAKE2b-256 | 182512cad71fa63cc5c1002853fd6d08ea39ff32127df16210afedfe9db94a18 |
Close
Hashes for simple_lama_inpainting-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46a537f56fed9e42b32186e5708f9ca62c4e06ffd20239e7b17eb1ddbd476b9a |
|
MD5 | 48f8e9f936fa943167a9d94428017c47 |
|
BLAKE2b-256 | bdd536bb9e952628f08ef78c9d45795fceb15a94841a45eb6a758d7407cf3cc9 |