ImageSegmenterGraph set activation type from metadata, and remove the activation config in C++ ImageSegmenterOptions.

PiperOrigin-RevId: 516893115
This commit is contained in:
MediaPipe Team
2023-03-15 12:13:00 -07:00
committed by Copybara-Service
parent a323825134
commit 59962bed27
6 changed files with 46 additions and 38 deletions
@@ -64,15 +64,6 @@ struct ImageSegmenterOptions {
OutputType output_type = OutputType::CATEGORY_MASK;
// The activation function used on the raw segmentation model output.
enum Activation {
NONE = 0, // No activation function is used.
SIGMOID = 1, // Assumes 1-channel input tensor.
SOFTMAX = 2, // Assumes multi-channel input tensor.
};
Activation activation = Activation::NONE;
// The user-defined result callback for processing live stream data.
// The result callback should only be specified when the running mode is set
// to RunningMode::LIVE_STREAM.