FirebaseVisionObject

public class FirebaseVisionObject extends Object

This class is deprecated.
The standalone ML Kit SDK replaces this API. For more information, refer to the migration guide.

Represents a detected object by FirebaseVisionObjectDetector.

Nested Class Summary

@interface FirebaseVisionObject.Category Classification category of detected objects. 

Constant Summary

Public Method Summary

Rect
getBoundingBox()
Gets the axis-aligned bounding rectangle of the detected object.
int
Float
getClassificationConfidence()
Gets the confidence of the on-device object classification.
Integer
getTrackingId()
Gets the tracking ID of the object.

Inherited Method Summary

Object
clone()
boolean
equals(Object arg0)
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()

Constants

public static final int CATEGORY_FASHION_GOOD

Constant Value: 2

public static final int CATEGORY_FOOD

Constant Value: 3

public static final int CATEGORY_HOME_GOOD

Constant Value: 1

public static final int CATEGORY_PLACE

Constant Value: 4

public static final int CATEGORY_PLANT

Constant Value: 5

public static final int CATEGORY_UNKNOWN

Constant Value: 0

Public Methods

public Rect getBoundingBox ()

Gets the axis-aligned bounding rectangle of the detected object.

public int getClassificationCategory ()

Gets the FirebaseVisionObject.Category of the object. If on-device classification is disabled, it returns CATEGORY_UNKNOWN.

public Float getClassificationConfidence ()

Gets the confidence of the on-device object classification. To be valid, the confidence must be in the range [0.0, 1.0]. If the confidence is CATEGORY_UNKNOWN, the call will return null.

public Integer getTrackingId ()

Gets the tracking ID of the object. The ID is a non-negative number in STREAM_MODE and null in SINGLE_IMAGE_MODE.

ML Kit for Firebase provided ready-to-use ML solutions for app developers. New apps should use the standalone ML Kit library for on-device ML and Firebase ML for cloud-based ML.

Updated Feb 20, 2025

Firebase gives you the tools and infrastructure you need to build better mobile and web apps, improve app quality, and grow your business.

Updated Aug 14, 2020

ML Kit for Firebase provided ready-to-use ML solutions for app developers. New apps should use the standalone ML Kit library for on-device ML and Firebase ML for cloud-based ML.

Updated Feb 21, 2025