erickillian / tattoo-remover

Tattoo Remover that uses UNet and MSE Loss
MIT License
3 stars 1 forks source link

Tattoo Remover

Easily remove tattoos from images of people using AI!

Before and After

Features

Table of Contents

Installation

  1. Clone the repo:

    git clone https://github.com/erickillian/tattoo-remover.git
  2. Install python3

    see https://www.python.org/downloads/

  3. Install pytorch on your device

    see https://pytorch.org/get-started/locally/ for instructions on how to install pytorch on your device

  4. Install python requirements for this project

    pip install -r requirements.txt
  5. Download trained model weights from (.safetensor) available on my huggingface account

    available at https://huggingface.co/erickillian/tattoo-removal

    And add model weights into directory

  6. Add tattoo photos to test_inputs directory

Usage

  1. Run model on directory

    python3 run.py
  2. Run image_blender.py to get animated transition between image pairs

    python3 image_blender.py

Colab Integration

Open notebook in

Then run every cell in sequential order. Replace url in cell 7 with desired image url to try network on different images.

Limitations

Dataset Generation

Data Generation

To generate data for this project a synthetic data approach was used. Tattoo patterns were overlaid over a subject and then sequentially multiplied onto the subject as layers. To remove excess tattoo parts background removal was used to remove any background reminants from the image. The background was then re-added into the image to create an one-to-one tattoo / no tattoo image pair. To make the overlays more realistic color changing techniques were used. This was one of the processes used to generate high quality image pairs for this project.

Contribute

If you are interested in this project and would like to contribute please reach out! Email: erickill@usc.edu

License

MIT