Skip to content

Ios integrated deeplab model Implementation of the Semantic Segmentation

Notifications You must be signed in to change notification settings

ismaeIfm/image-segmenter-ios-deeplabv3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Segmenter ios

Core ML Image Segmentation on ios

Examples

mlmodel

Core ML model file are converted from deeplab MobileNetv2

Example

Download checkpoint and uncompress it

wget http://download.tensorflow.org/models/deeplabv3_mnv2_pascal_trainval_2018_01_29.tar.gz
tar xvf deeplabv3_mnv2_pascal_trainval_2018_01_29.tar.gz

Then convert to mlmodel with tfcoreml

import tfcoreml as tf_converter 
tf_converter.convert(
    tf_model_path = 'deeplabv3_mnv2_pascal_trainval/frozen_inference_graph.pb', 
    mlmodel_path = 'Deeplab.mlmodel', 
    image_input_names=["ImageTensor:0"], 
    output_feature_names = ['ResizeBilinear_3:0'], 
    input_name_shape_dict = {'ImageTensor:0' : [1, 513, 513, 3]}, 
    use_coreml_3 = False) 

Usage

 let sourceImg = UIImage.init(named: "test.jpg")!
 let segmentImg = sourceImg.segmentation()

About

Ios integrated deeplab model Implementation of the Semantic Segmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Swift 100.0%