LensFamily / LensErase
git clone https://github.com/LensFamily/LensErase.git
—
+11
stars, 24h · #1,268
+~77
stars, 7 days · #1,610
+99
stars, 30 days · #4,916
108
★ total · +77% this week
4
forks · 2 open issues
Star history (as recorded here)
LicenseMIT
Created2026-09-29 (23d ago)
Last push8d ago
Watchers9
OwnerUser
Links
README excerpt
# LensErase ### A Foundation Model for Erase Anything Yunuo Chen 1,* , Xiuyu Wu 2,* , Qinhong Yang 3 , Jinjing Zhao 4 , Yanchen Dong 5 , Sirui Zhang 3 , Dong Chen 6,‡ , Fangyun Wei 6,† , Lei Shi 6 , Ji Li 6 , Dongdong Chen 6 , Guo Lu 1,† , Yan Lu 6 , Baining Guo 6 1 Shanghai Jiao Tong University 2 Nankai University 3 USTC 4 University of Sydney 5 Peking University 6 Microsoft * Equal contribution † Corresponding authors ‡ Project lead **Code coming soon.** If you like LensErase, please consider starring this repository. Selected inputs and LensErase outputs. Visit the project page for animated examples and model comparisons. ## Overview **LensErase** is a general-purpose, mask-based foundation model for object removal. Given an image and a selection mask, it removes the selected content and associated visual effects, fills the revealed region, and preserves the rest of the image. It supports general objects, visual text, watermarks, and layered posters, including multiple targets and semi-transparent content. ## Highlights - **An image and a mask.** Specify the region to erase without a text prompt. - **Beyond the selected object.** Remove associated shadows and reflections while preserving nearby content. - **A generative foundation for erasure.** Adapt the pretrained Lens model with Mask-Aware RoPE, then refine removals through supervised fine-tuning and contract-guided reinforcement learning. - **High-fidelity preservation.** TraceFusion uses image residuals to identify the effective edit region and preserve content elsewhere. ## Data and Evaluation | Resource | Scale | Description | | :--- | :---: | :--- | | **LensErase-100M** | **101.07M** paired examples | Source–mask–target triplets spanning general objects, watermarks, large masks, visual text, and posters. | | **LensErase-Bench** | **500** cases | General objects, posters, watermarks, and visual text, evaluated without requiring a paired ground-truth target. | LensErase-Bench evaluates **Removal**, **Inpainting**, **Preservation**, and **Cleanliness**, together with an Overall Score and **HiFi Removal**. The project page describes the benchmark and its metrics. ## Examples Explore the animated removal demos, additional examples, and qualitative comparisons with GPT-Image 2.5 and Flux2-Erase and open-source models. ## Release Status **Code coming soon.** The code will be released in this repository. ### Paper LensErase: A Foundation Model for Erase Anything (arXiv:2610.18072). ## Related Project Lens: Rethinking Training Efficiency for Foundational Text-to-Image Models provides the pretrained text-to-image foundation for LensErase.