Package ai.djl.modality.cv.output
Class DetectedObjects.DetectedObject
- java.lang.Object
-
- ai.djl.modality.Classifications.Classification
-
- ai.djl.modality.cv.output.DetectedObjects.DetectedObject
-
- Enclosing class:
- DetectedObjects
public static final class DetectedObjects.DetectedObject extends Classifications.Classification
ADetectedObjectrepresents a single potential detected Object for an image.
-
-
Constructor Summary
Constructors Constructor Description DetectedObject(java.lang.String className, double probability, BoundingBox boundingBox)Constructs a bounding box with the given data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoundingBoxgetBoundingBox()Returns theBoundingBoxof the detected object.java.lang.StringtoString()-
Methods inherited from class ai.djl.modality.Classifications.Classification
getClassName, getProbability
-
-
-
-
Constructor Detail
-
DetectedObject
public DetectedObject(java.lang.String className, double probability, BoundingBox boundingBox)Constructs a bounding box with the given data.- Parameters:
className- name of the type of objectprobability- probability that the object is correctboundingBox- the location of the object
-
-
Method Detail
-
getBoundingBox
public BoundingBox getBoundingBox()
Returns theBoundingBoxof the detected object.- Returns:
- the
BoundingBoxof the detected object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classClassifications.Classification
-
-