File size: 1,815 Bytes
ed01507 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
<h1 align="center" >Remove Objects Server</h1>
<!-- TABLE OF CONTENTS -->
<details>
<summary>Table of Contents</summary>
<ol>
<li><a href="#about-the-project">About</a></li>
<li><a href="#built-with">Installation</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#license">License</a></li>
</ol>
</details>
## About
This is a Python project for removing unwanted objects from images using the inpainting technique. It includes a server implemented with FastAPI and an endpoint for processing images by applying inpainting techniques. This project uses a deep learning library, PyTorch, for training and testing the inpainting model.
<p align="center">
<img src="lama_cleaner_video.gif" />
</p>
## Installation
To install this project, you should first create a virtual environment using the following commands:
```bash
python3 -m venv venv
source venv/bin/activate
```
After creating the virtual environment, you can install the required libraries using pip:
```bash
pip install -r requirements.txt
```
## Usage
To use this project, first start the server by running main.py:
```bash
python main.py
```
After the server has started, you can test following endpoints:
- `http://{localhost}:{port}/lama/paint`
- This endpoint accepts an image file in the `file` parameter and applies inpainting techniques to remove unwanted objects.
- `http://{localhost}:{port}/mask`
- Mask endpoint is used to apply a mask to an image. The route accepts `img` and `mask` as input parameters. Then, it applies a mask on an image.
- You can use `testX.png` image and `testX_mask.png` mask in image folder for testing.
## License
This project is licensed under the MIT License - see the LICENSE file for details.
Other command
```bash
docker build -t zest .
```
|