Skip to content

Sample code for Core ML using ResNet50 provided by Apple and a custom model generated by coremltools.

License

Notifications You must be signed in to change notification settings

ytakzk/CoreML-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoreML-samples

This is the sample code for Core ML using ResNet50 provided by Apple.
ResNet50 can categorize the input image to 1000 pre-trained categories.
What's more, this includes a sample code for coremltools converting keras model to mlmodel.

demo

Source Code for the prediction

guard let image = imageView.image, let ref = image.buffer() else {

        return
}

do {

    // predict
    let output = try model.prediction(image: ref)

    print(output.classLabel)
    print(output.classLabelProbs)

} catch {

    print(error)
}

About

Sample code for Core ML using ResNet50 provided by Apple and a custom model generated by coremltools.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published