Package ai.djl.basicdataset.cv
Class CocoMetadata.Annotation
java.lang.Object
ai.djl.basicdataset.cv.CocoMetadata.Annotation
- Enclosing class:
- CocoMetadata
An annotation applied to an image in the coco dataset.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getArea()
Returns the area of this annotation.double[]
Returns the bounding box of this annotation.long
Returns the category id of this annotation.long
getId()
Returns the id of this annotation.long
Returns the id of the image this annotation applies to.
-
Constructor Details
-
Annotation
public Annotation()
-
-
Method Details
-
getImageId
public long getImageId()Returns the id of the image this annotation applies to.- Returns:
- the id of the image this annotation applies to
-
getId
public long getId()Returns the id of this annotation.- Returns:
- the id of this annotation
-
getBoundingBox
public double[] getBoundingBox()Returns the bounding box of this annotation.- Returns:
- the bounding box of this annotation
-
getCategoryId
public long getCategoryId()Returns the category id of this annotation.- Returns:
- the category id of this annotation
-
getArea
public double getArea()Returns the area of this annotation.- Returns:
- the area of this annotation
-