YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

LaMa-Dilated โ€” CoreML (SHxTLxST)

CoreML .mlpackage of anyisalin/big-lama (originally saicinpainting/lama), palettized at 6-bit.

Used by SHxTLxST iOS app as the fast inpainting cleanup model.

IO

The model takes two separate inputs: an RGB image and a binary mask. The model internally zeros the masked region of the image before inference.

import CoreML
import CoreVideo

let config = MLModelConfiguration()
config.computeUnits = .all  // ANE + GPU + CPU

let model = try LaMa(configuration: config)

// image: shape (1, 3, 512, 512), float32, RGB in [0, 1]
// mask:  shape (1, 1, 512, 512), float32, 1.0 where to inpaint, 0.0 elsewhere
let output = try model.prediction(image: imageBuffer, mask: maskBuffer)
let result: MLMultiArray = output.inpainted_image  // shape (1, 3, 512, 512), float32 in [0, 1]

Mask convention: 1.0 = region to inpaint (the hole), 0.0 = region to keep.

Size

39.9 MB (FLOAT16, 6-bit palettized)

Architecture

FFCResNetGenerator (Fast Fourier Convolution ResNet) โ€” Suvorov et al., "Resolution-robust Large Mask Inpainting with Fourier Convolutions", arXiv:2109.07161. 45.6M parameters, 512x512 fixed input.

License

Apache 2.0 (inherited from the LaMa project).

Downloads last month
13
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for Dadm-n/lama-dilated-coreml