This is a wrapper api of paper LeftRefill
Project description
Simple-lama-inpainting
Simple pip package originally from LeftRefill[1] inpainting with reference. Edited from the wrapper from StreetUnveiler[2]
The API design is similar to simple-lama-inpainting.
Installation
pip install simple-leftrefill-inpainting
CLI
simple_leftrefill <path_to_inpainted_image> <path_to_mask_image> <path_to_reference_image> <path_to_output_image>
How to use in your code
from diffusers.utils import load_image
from simple_leftrefill_inpainting import LeftRefillGuidance
model = LeftRefillGuidance()
result = model.predict(
load_image("./assets/inpainted.png"),
load_image("./assets/mask.png"),
load_image("./assets/reference.png"),
)
result.save("./assets/result.png")
Illustration
Inpainted Input:
Inpainting Mask:
Reference Mask:
Result:
License
Please follow both LeftRefill license and the license in this repo.
Reference
[1] Cao et al. LeftRefill: Filling Right Canvas based on Left Reference through Generalized Text-to-Image Diffusion Model. CVPR 2024
@inproceedings{cao2024leftrefill,
title={LeftRefill: Filling Right Canvas based on Left Reference through Generalized Text-to-Image Diffusion Model},
author={Chenjie Cao and Yunuo Cai and Qiaole Dong and Yikai Wang and Yanwei Fu},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
year={2024},
}
[2] Xu et al. 3D StreetUnveiler with Semantic-aware 2DGS - a simple baseline. ICLR 2025
@inproceedings{xu2025streetunveiler,
author = {Jingwei Xu and Yikai Wang and Yiqun Zhao and Yanwei Fu and Shenghua Gao},
title = {3D StreetUnveiler with Semantic-aware 2DGS - a simple baseline},
booktitle = {The International Conference on Learning Representations (ICLR)},
year = {2025},
}
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simple_leftrefill_inpainting-0.0.1.tar.gz.
File metadata
- Download URL: simple_leftrefill_inpainting-0.0.1.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85d83838da8ab5899a95d8c5693f6fb892096aa9a95b473fb94f7b35dcaaf940
|
|
| MD5 |
a70a837c7f8a32414207abce821eedac
|
|
| BLAKE2b-256 |
9adf7da30011bae8f2be94b35799b197c301c3b99138b60b0e1c4593936beb81
|
File details
Details for the file simple_leftrefill_inpainting-0.0.1-py3-none-any.whl.
File metadata
- Download URL: simple_leftrefill_inpainting-0.0.1-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daa86d69c2231ef7d57f0b782046adceaa59b38ebbe7f2f653f4c564fc66a4e2
|
|
| MD5 |
930908959741d499a7d20bfc33da65d2
|
|
| BLAKE2b-256 |
07ffa850bea74bb0475562672da5324eb3b10cc5565b8a16338eb4d996f7458b
|