Attention: This MediaPipe Solutions Preview is an early release. Learn more.

Detection

Stay organized with collections Save and categorize content based on your preferences.
public abstract class Detection

Represents one detected object in the results of ERROR(/com.google.mediapipe.tasks.version.objectdetector.ObjectDetector).

Public Constructors

Public Methods

abstract RectF
boundingBox()
A ERROR(/RectF) object to represent the bounding box of the detected object.
abstract List<Category>
categories()
A list of Category objects.
static Detection
create(List<Category> categories, RectF boundingBox)
Creates a Detection instance from a list of Category and a bounding box.

Inherited Methods

Public Constructors

public Detection ()

Public Methods

public abstract RectF boundingBox ()

A ERROR(/RectF) object to represent the bounding box of the detected object.

public abstract List<Category> categories ()

A list of Category objects.

public static Detection create (List<Category> categories, RectF boundingBox)

Creates a Detection instance from a list of Category and a bounding box.

Parameters
categories a list of Category objects that contain category name, display name, score, and the label index.
boundingBox a ERROR(/RectF) object to represent the bounding box.