Background Removal for Images
API Interface of the iOS Framework
Instantiate Background Removal model with preferred confidence threshold
value (might be changed in runtime).
Lower threshold values keep more pixels that possibly correspond to the background. Higher threshold values remove more pixels that possibly correspond to the foreground. The effective range for this parameter is [0., 1.].
Load the model with backgroundRemover.loadModel
method
Example:
Schedule the task with backgroundRemover.removeBackground
method when the model is loaded
Example:
The mask is returned as a UIImage object with non-zero pixels corresponding to the foreground with the defined confidence threshold.
Last updated