Class Recognition
-
- All Implemented Interfaces:
public final class RecognitionRecognition class representing object recognitions during inference.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringlabelprivate final Floatconfidenceprivate final BoundingBoxboundingBox
-
Constructor Summary
Constructors Constructor Description Recognition(String label, Float confidence)Create a recognition from a label and confidence. Recognition(String label, Float confidence, BoundingBox boundingBox)Create a recognition from a label, confidence, and bounding box.
-
Method Summary
Modifier and Type Method Description final StringgetLabel()Retrieves the label of this recognition. final FloatgetConfidence()Retrieves the confidence of this recognition. final BoundingBoxgetBoundingBox()final Optional<BoundingBox>getBoundingBox()Retrieves the bounding box associated with this recognition. StringtoString(){@inheritDoc} -
-
Constructor Detail
-
Recognition
Recognition(String label, Float confidence)
Create a recognition from a label and confidence.- Parameters:
label- the label of the object being recognisedconfidence- the confidence of the object recognition
-
Recognition
Recognition(String label, Float confidence, BoundingBox boundingBox)
Create a recognition from a label, confidence, and bounding box.- Parameters:
label- the label of the object being recognisedconfidence- the confidence of the object recognitionboundingBox- the bounds of the object in the image
-
-
Method Detail
-
getLabel
final String getLabel()
Retrieves the label of this recognition.
- Returns:
a String label value.
-
getConfidence
final Float getConfidence()
Retrieves the confidence of this recognition.
- Returns:
a float confidence value.
-
getBoundingBox
final BoundingBox getBoundingBox()
-
getBoundingBox
final Optional<BoundingBox> getBoundingBox()
Retrieves the bounding box associated with this recognition.
- Returns:
an optional BoundingBox.
-
-
-
-