Last active
August 5, 2017 06:41
-
-
Save m25lazi/2dd3105ffcca36edcab153da68b7d14c to your computer and use it in GitHub Desktop.
Prediction API generated by Xcode from Inceptionv3 model
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
/** | |
Make a prediction using the convenience interface | |
- parameters: | |
- image: Input image to be classified as RGB image buffer, 299 pixels wide by 299 pixels high | |
- throws: an NSError object that describes the problem | |
- returns: the result of the prediction as Inceptionv3Output | |
*/ | |
func prediction(image: CVPixelBuffer) throws -> Inceptionv3Output { | |
let input_ = Inceptionv3Input(image: image) | |
return try self.prediction(input: input_) | |
} | |
/// Model Prediction Output Type | |
class Inceptionv3Output : MLFeatureProvider { | |
/// Probability of each category as dictionary of strings to doubles | |
let classLabelProbs: [String : Double] | |
/// Most likely image category as string value | |
let classLabel: String | |
// Class has other APIs and properties. | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment