ImageLabel
Public Method Summary
boolean |
equals( Object o)
Indicates whether some other object is "equal to" this one.
|
float |
|
int |
getIndex()
Gets the index of this label.
|
String
|
getText()
Gets the text of this label.
|
int |
hashCode()
Returns a hash code value for the object.
|
String
|
|
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
public boolean equals (Object o)
Indicates whether some other object is "equal to" this one.
public float getConfidence ()
Gets the confidence of this label.
The range of this confidence depends on the classifier model used, but by convention
it should be [0.0f, 1.0f].
For an ImageLabeler
created with ImageLabelerOptions
,
the range is [0.0f, 1.0f].
public int getIndex ()
Gets the index of this label.
The index maps to the detected label in the entire label map of the corresponding
model.
Indexes can be used as unique identifiers to match detected labels instead of super
long label names.
public String getText ()
Gets the text of this label.
The text returned here depends on the classifier model used.
public int hashCode ()
Returns a hash code value for the object.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["`ImageLabel` represents an image label detected by ML Kit's `ImageLabeler`."],["It provides methods to access the label's text, confidence score, and index."],["Confidence scores range from 0.0f to 1.0f, indicating the likelihood of the label being correct."],["Label indexes can be used as unique identifiers for detected labels."]]],[]]