SagiK-Repository / Docker_AI_Image_RemovePart_Service

✔이미지 일부분 제거, 도커를 활용한 웹사이트 활용 프로그램
0 stars 0 forks source link

이미지 지우기 AI 탐색 #1

Closed SAgiKPJH closed 10 months ago

SAgiKPJH commented 10 months ago

1차 발견

SAgiKPJH commented 10 months ago

Inpainting 논문

SAgiKPJH commented 10 months ago

Image Inpainting Model Lama

SAgiKPJH commented 10 months ago

LaMa?

SAgiKPJH commented 10 months ago

Lama

SAgiKPJH commented 10 months ago

참고할 만한 논문 https://subinium.github.io/LR007/

SAgiKPJH commented 10 months ago

LaMa Docker로 활용하기

  1. LaMa git hub zip 다운 (https://github.com/advimman/lama/tree/main?tab=readme-ov-file)
  2. docker 폴더 내부 3_evaluate.sh 실행 (Linux)
  3. 명령어 실행 Usage: ./3_evaluate.sh original_dataset_dir predictions_dir output_dir [other arguments to evaluate_predicts.py]

    ./3_evaluate.sh original predic out

SAgiKPJH commented 10 months ago

simple LaMa

https://github.com/enesmsahin/simple-lama-inpainting

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).convert('L')

result = simple_lama(image, mask)
result.save("inpainted.png")

다음과 같이 쉽게 활용이 가능합니다.