Resolution-robust Large Mask Inpainting with Fourier Convolutions
Paper β’ 2109.07161 β’ Published
LaMa model converted to Apple Core ML format for macOS GPU-accelerated inference.
This model was converted using the CoreMLaMa project by @mallman.
big-lama.pt (196MB).mlpackage)# Clone CoreMLaMa
git clone https://github.com/mallman/CoreMLaMa
cd CoreMLaMa
# Create environment
conda create -n coremlama python=3.10
conda activate coremlama
# Install dependencies
pip install -r requirements.txt
pip install iopaint
# Run conversion
python convert_lama.py
Load the model in a macOS application using Core ML:
import CoreML
import Vision
let config = MLModelConfiguration()
config.computeUnits = .cpuAndGPU
let model = try LaMa(configuration: config)
Inputs:
image: 3-channel RGB image, 800Γ800 pixelsmask: 1-channel grayscale mask, 800Γ800 pixelsOutput:
output: Inpainted 3-channel RGB image, 800Γ800 pixelsThis repository contains a format conversion of the original LaMa model. All rights and credit belong to the original authors.
If you use this model, please cite the original paper:
@inproceedings{suvorov2022resolution,
title={Resolution-robust Large Mask Inpainting with Fourier Convolutions},
author={Suvorov, Roman and Logacheva, Elizaveta and Mashikhin, Anton and others},
booktitle={WACV},
year={2022}
}