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
Metadata
Release files for simple-lama-inpainting 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simple_lama_inpainting-0.1.2.tar.gz | 7.8 kB | Without provenance | Details for simple_lama_inpainting-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simple_lama_inpainting-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for simple_lama_inpainting-0.1.2-py3-none-any.whl |
Total release size: 17.4 kB
Release files / simple_lama_inpainting-0.1.2.tar.gz
| Download URL | simple_lama_inpainting-0.1.2.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
575cb6168b11af548976f737c00a5f31a4de503bd0c5f16ba5642941f98264fc
|
|
BLAKE2b-256 checksum How to use checksums |
40ea5d211ee285fa225ed5a4ca4a34312711ed0ee30895f80cefdbce2a784cd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.12 Darwin/22.5.0
|
Release files / simple_lama_inpainting-0.1.2-py3-none-any.whl
| Download URL | simple_lama_inpainting-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8990e75d8c97dc40ccade133cc6fa1021069d9638708080c27dfcf22cf39bfb
|
|
BLAKE2b-256 checksum How to use checksums |
4b286f2f546247c122bfbde4050bb25f794dd0c413ea0a23b26727c41beed76b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.12 Darwin/22.5.0
|
Security for simple-lama-inpainting 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.