Skip to content

imagetasks/LaMa-to-CoreML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LaMa to CoreML converter

This repo contains a python script for converting LaMa pretrained models (.ckpt files) to Apple's Core ML model format. Pretrained models can be downloaded at Google Drive (link is taken from the official LaMa repo). Use LaMa_models.zip for big-lama, lama-places, lama-celeba, etc. big-lama.zip if you need to convert big-lama only. Alternatively, you can use your own ckpt files. Just point the script to a folder with 'config.yaml' and 'models/best.ckpt'. See Customize script section for details.

The script does not require IOPanit (marked as archived) for the conversion.

Instructions

  1. Create a Conda environment:

    conda create -n lamatocoreml python=3.9 -y
    conda activate lamatocoreml
    pip install -r requirements.txt
  2. Customize script:

    lama_pretrained_models_path = "LaMa_models/big-lama" # point to a folder with 'config.yaml' and 'models/best.ckpt'
    lama_input_size = 1024 #px
  3. Run the conversion script:

    python convert.py

Acknowledgements

Authors of LaMa:

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

Support us by downloading Pixea image viewer for macOS.

About

LaMa to CoreML model format converter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages