2022-07-22 17:20:12 +02:00
|
|
|
<h1 align="center">Lama Cleaner</h1>
|
|
|
|
<p align="center">A free and open-source inpainting tool powered by SOTA AI model.</p>
|
|
|
|
|
|
|
|
<p align="center">
|
|
|
|
<a href="https://github.com/Sanster/lama-cleaner">
|
|
|
|
<img alt="total download" src="https://pepy.tech/badge/lama-cleaner" />
|
|
|
|
</a>
|
|
|
|
<a href="https://pypi.org/project/lama-cleaner/">
|
|
|
|
<img alt="version" src="https://img.shields.io/pypi/v/lama-cleaner" />
|
|
|
|
</a>
|
|
|
|
<a href="https://colab.research.google.com/drive/1e3ZkAJxvkK3uzaTGu91N9TvI_Mahs0Wb?usp=sharing">
|
|
|
|
<img alt="Open in Colab" src="https://colab.research.google.com/assets/colab-badge.svg" />
|
|
|
|
</a>
|
2022-11-21 07:02:44 +01:00
|
|
|
|
2022-11-16 14:18:51 +01:00
|
|
|
<a href="https://huggingface.co/spaces/Sanster/Lama-Cleaner-lama">
|
|
|
|
<img alt="Hugging Face Spaces" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue" />
|
|
|
|
</a>
|
2022-11-21 07:02:44 +01:00
|
|
|
|
2022-12-11 15:50:37 +01:00
|
|
|
<a href="">
|
|
|
|
<img alt="python version" src="https://img.shields.io/pypi/pyversions/lama-cleaner" />
|
2022-10-09 15:32:13 +02:00
|
|
|
</a>
|
2022-10-08 06:55:51 +02:00
|
|
|
<a href="https://hub.docker.com/r/cwq1913/lama-cleaner">
|
|
|
|
<img alt="version" src="https://img.shields.io/docker/pulls/cwq1913/lama-cleaner" />
|
|
|
|
</a>
|
2022-07-22 17:20:12 +02:00
|
|
|
</p>
|
|
|
|
|
2022-10-20 16:36:32 +02:00
|
|
|
https://user-images.githubusercontent.com/3998421/196976498-ba1ad3ab-fa18-4c55-965f-5c6683141375.mp4
|
2022-07-22 17:20:12 +02:00
|
|
|
|
2023-02-12 14:27:04 +01:00
|
|
|
## Sponsor
|
|
|
|
|
2023-02-12 15:34:02 +01:00
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td >
|
|
|
|
<img src="./assets/GitHub_Copilot_logo.svg" style="background: white;padding: 8px;"/>
|
|
|
|
</td>
|
|
|
|
<td >
|
|
|
|
<a href="https://ko-fi.com/Z8Z1CZJGY/tiers" target="_blank" >
|
|
|
|
❤️ Your logo
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2023-02-12 14:27:04 +01:00
|
|
|
|
2022-07-22 17:20:12 +02:00
|
|
|
## Features
|
|
|
|
|
2023-01-17 14:10:06 +01:00
|
|
|
- Completely free and open-source, fully self-hosted, support CPU & GPU
|
|
|
|
- [Windows 1-Click Installer](https://lama-cleaner-docs.vercel.app/install/windows_1click_installer)
|
2022-09-26 03:16:11 +02:00
|
|
|
- Classical image inpainting algorithm powered by [cv2](https://docs.opencv.org/3.4/df/d3d/tutorial_py_inpainting.html)
|
2023-01-28 07:56:32 +01:00
|
|
|
- Multiple SOTA AI [models](https://lama-cleaner-docs.vercel.app/models)
|
2023-01-17 14:10:06 +01:00
|
|
|
- Various inpainting [strategy](https://lama-cleaner-docs.vercel.app/features/inpainting_strategy)
|
|
|
|
- Run as a [desktop application](https://lama-cleaner-docs.vercel.app/features/desktop_app)
|
|
|
|
- [Interactive Segmentation](https://lama-cleaner-docs.vercel.app/features/Interactive_segmentation) on any object.
|
|
|
|
- More features at [lama-cleaner-docs](https://lama-cleaner-docs.vercel.app/)
|
2021-12-12 07:54:37 +01:00
|
|
|
|
2022-07-22 17:20:12 +02:00
|
|
|
## Quick Start
|
2021-11-15 08:22:34 +01:00
|
|
|
|
2023-01-17 14:10:06 +01:00
|
|
|
Lama Cleaner make it easy to use SOTA AI model in just two commands:
|
2022-10-05 17:15:09 +02:00
|
|
|
|
2022-04-18 16:40:23 +02:00
|
|
|
```bash
|
2023-02-28 14:43:11 +01:00
|
|
|
# In order to use the GPU, install cuda version of pytorch first.
|
|
|
|
# pip install torch==1.13.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
|
2022-04-18 16:40:23 +02:00
|
|
|
pip install lama-cleaner
|
2022-07-22 17:20:12 +02:00
|
|
|
lama-cleaner --model=lama --device=cpu --port=8080
|
2022-04-18 16:40:23 +02:00
|
|
|
```
|
|
|
|
|
2023-01-17 14:10:06 +01:00
|
|
|
That's it, Lama Cleaner is now running at http://localhost:8080
|
2022-11-21 07:02:44 +01:00
|
|
|
|
2023-01-17 14:21:54 +01:00
|
|
|
See all command line arguments at [lama-cleaner-docs](https://lama-cleaner-docs.vercel.app/install/pip)
|
2022-07-25 04:16:01 +02:00
|
|
|
|
2021-11-15 08:22:34 +01:00
|
|
|
## Development
|
|
|
|
|
2022-02-05 12:58:25 +01:00
|
|
|
Only needed if you plan to modify the frontend and recompile yourself.
|
|
|
|
|
2022-04-25 15:08:19 +02:00
|
|
|
### Frontend
|
2021-11-15 08:22:34 +01:00
|
|
|
|
2022-03-04 06:44:53 +01:00
|
|
|
Frontend code are modified from [cleanup.pictures](https://github.com/initml/cleanup.pictures), You can experience their
|
|
|
|
great online services [here](https://cleanup.pictures/).
|
2021-11-15 08:22:34 +01:00
|
|
|
|
2023-01-25 14:39:44 +01:00
|
|
|
- Install dependencies:`cd lama_cleaner/app/ && pnpm install`
|
|
|
|
- Start development server: `pnpm start`
|
|
|
|
- Build: `pnpm build`
|