Skip to content

Ma-Dan/EdgeConnect-CoreML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EdgeConnect-CoreML

An example of EdgeConnect Model on iOS using CoreML.

AppUI

About EdgeConnect

EdgeConnect (https://github.com/knazeri/edge-connect) is a Generative Image Inpainting with Adversarial Edge Learning. https://arxiv.org/abs/1901.00212

Code references

Usage

How to convert pytorch model to CoreML model:

  1. Run modified edge-connect code to remove spectral normalization and convert to ONNX model.
python test.py --checkpoints ./checkpoints/places2 --input ./examples/test/places2 --output ./results

Modify line 158 to change input resolution.

Modify checkpoint argument to use other pretrained weights. This example uses places2 weight.

  1. Run ONNX to CoreML converter on ONNX files to get CoreML models.

Todo

  1. Optimize Canny edge detection to get more accurate edge output.
  2. Apply mask from touch screen input.