Skip to content

Instantly share code, notes, and snippets.

@hsiaoer
Created June 24, 2019 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hsiaoer/eafcfad65e18265e75edcd38852a0b55 to your computer and use it in GitHub Desktop.
Save hsiaoer/eafcfad65e18265e75edcd38852a0b55 to your computer and use it in GitHub Desktop.
Model Output Params
class ViewController: UIViewController {
@IBOutlet var imageView: UIImageView!
var backgroundView: UIImageView!
var backgroundViewDelayed: UIImageView!
let context = CIContext()
// ------------------
// Step 1
// ------------------
/// Scores output from model greater than this value will be set as 1.
/// Lowering this value will make the mask more intense for lower confidence values.
var clippingScoresAbove: Double { return 0.5 }
/// Values lower than this value will not appear in the mask.
var zeroingScoresBelow: Double { return 0.3 }
/// Controls the opacity the mask is applied to the base image.
var opacity: CGFloat { return 1.0 }
/// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment