/CoreMLaMa

LaMa for Core ML

Primary LanguagePythonApache License 2.0Apache-2.0

CoreMLaMa: LaMa for Core ML

This repo contains a script for converting a LaMa (aka cute, fuzzy 🦙) model to Apple's Core ML model format. More specifically, it converts the implementation of LaMa from Lama Cleaner.

This repo also includes a simple example of how to use the Core ML model for prediction. See Sample.

Conversion Instructions

  1. Create a Conda environment for CoreMLaMa:

    conda create -n coremllama python=3.10 # works with mamba, too
    conda activate coremllama
    pip install -r requirements.txt
  2. Run the conversion script:

    python convert_lama.py

This script will download and convert Big LaMa to a Core ML package named LaMa.mlpackage.

Acknowledgements and Thanks

Thanks to the authors of LaMa:

[Project page] [arXiv] [Supplementary] [BibTeX] [Casual GAN Papers Summary]

CoreMLaMa uses the LaMa model and supporting code from Lama Cleaner. Lama Cleaner makes this project much simpler.