Created
June 24, 2019 14:59
-
-
Save hsiaoer/407c8be5a4c26911d2b0113ef1e7a7c9 to your computer and use it in GitHub Desktop.
This file contains 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
private lazy var visionModel = FritzVisionSkySegmentationModel() | |
/// ... | |
func createSticker(_ image: UIImage) { | |
/// Use the result to build a mask | |
guard let result = try? visionModel.predict(fritzImage), | |
let mask = result.buildSingleClassMask( | |
forClass: FritzVisionSkyClass.none, | |
clippingScoresAbove: clippingScoresAbove, | |
zeroingScoresBelow: zeroingScoresBelow | |
) | |
else { return } | |
/// Display the mask... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment