View source on GitHub |
2D-array representing the confidence mask in row major order.
tflite_support.task.processor.ConfidenceMask(
value: np.ndarray
)
For each pixel, the value indicates the prediction confidence usually in the [0, 1] range where higher values represent a stronger confidence. Ultimately this is model specific, and other range of values might be used.
Attributes | |
---|---|
value
|
A NumPy 2D-array indicating the prediction confidence values usually in the range [0, 1]. |
Methods
create_from_pb2
@classmethod
create_from_pb2( pb2_obj: _ConfidenceMaskProto, height: int, width: int ) -> 'ConfidenceMask'
Creates a ConfidenceMask
object from the given protobuf and size.
to_pb2
to_pb2() -> _ConfidenceMaskProto
Generates a protobuf object to pass to the C++ layer.
__eq__
__eq__(
other: Any
) -> bool
Checks if this object is equal to the given object.
Args | |
---|---|
other
|
The object to be compared with. |
Returns | |
---|---|
True if the objects are equal. |