Created
June 2, 2020 07:58
-
-
Save ozgurshn/eeed0c9a5e29cc889cde41080b668f33 to your computer and use it in GitHub Desktop.
Playground Core ML model loading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// URL of model assuming it was installed in the same bundle as this class | |
// class var urlOfModelInThisBundle : URL { | |
// let bundle = Bundle(for: ObjectDetectionAccurate.self) | |
// return bundle.url(forResource: "ObjectDetectionAccurate", withExtension:"mlmodelc")! | |
// } | |
class var urlOfModelInThisBundle: URL { | |
return try! MLModel.compileModel(at: URL(fileURLWithPath:"/Users/ozgur/Library/Autosave Information/ThermDetector.playground/Resources/ObjectDetectionAccurate.mlmodel")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment