AI-generated Key Takeaways
-
SubjectSegmenter is an interface for generating SubjectSegmentationResult from an image.
-
The SubjectSegmenter interface includes methods for closing the segmenter, getting the initialization task, and processing images.
-
The
processmethod takes either anMlImageor anInputImageand returns a Task that provides the SubjectSegmentationResult asynchronously.
An SubjectSegmentation
client for generating
SubjectSegmentationResult in a supplied image.
Public Method Summary
| abstract void |
close()
Closes the segmenter and releases its resources.
|
| abstract Task<Void> |
getInitTask()
Returns the task for initializing the
SubjectSegmenter.
|
| abstract Task<SubjectSegmentationResult> | |
| abstract Task<SubjectSegmentationResult> |
process(InputImage image)
Generates
SubjectSegmentationResult from a supplied InputImage.
|
Inherited Method Summary
Public Methods
public abstract void close ()
Closes the segmenter and releases its resources.
public abstract Task<Void> getInitTask ()
Returns the task for initializing the
SubjectSegmenter.
The initialization is triggered in the background when a
SubjectSegmenter instance is created. The first
process(InputImage) or
process(MlImage) call will wait for the initialization to be finished.
If you want to optimize the latency of the first process call for better user experience, you could call this method to track initialization progress and only make the process call when the segmenter is successfully initialized.
public abstract Task<SubjectSegmentationResult> process (MlImage image)
Generates
SubjectSegmentationResult from a supplied MlImage.
This is an experimental API in beta version.
Returns
- a
Taskthat asynchronously returnsSubjectSegmentationResult.
public abstract Task<SubjectSegmentationResult> process (InputImage image)
Generates
SubjectSegmentationResult from a supplied InputImage.
Returns
- a
Taskthat asynchronously returnsSubjectSegmentationResult.