public class CocoDetection extends ObjectDetectionDataset
Each image might have different Shapes.
| Modifier and Type | Class and Description |
|---|---|
static class |
CocoDetection.Builder
A builder to construct a
CocoDetection. |
ImageDataset.BaseBuilder<T extends ImageDataset.BaseBuilder<T>>flag| Modifier and Type | Method and Description |
|---|---|
protected long |
availableSize() |
static CocoDetection.Builder |
builder()
Creates a builder to build a
CocoDetection. |
protected ai.djl.modality.cv.Image |
getImage(long index)
Returns the image at the given index in the dataset.
|
java.util.Optional<java.lang.Integer> |
getImageHeight()
Returns the height of the images in the dataset.
|
java.util.Optional<java.lang.Integer> |
getImageWidth()
Returns the width of the images in the dataset.
|
ai.djl.util.PairList<java.lang.Long,ai.djl.modality.cv.output.Rectangle> |
getObjects(long index)
Returns the list of objects in the image at the given index.
|
void |
prepare(ai.djl.util.Progress progress) |
getgetImageChannels, getRecordImagegetData, getData, getData, getData, randomSplit, size, subDataset, toArraypublic static CocoDetection.Builder builder()
CocoDetection.public ai.djl.util.PairList<java.lang.Long,ai.djl.modality.cv.output.Rectangle> getObjects(long index)
ObjectDetectionDatasetgetObjects in class ObjectDetectionDatasetindex - the index (if the dataset is a list of data items)public void prepare(ai.djl.util.Progress progress)
throws java.io.IOException
java.io.IOExceptionprotected long availableSize()
availableSize in class ai.djl.training.dataset.RandomAccessDatasetprotected ai.djl.modality.cv.Image getImage(long index)
throws java.io.IOException
ImageDatasetgetImage in class ImageDatasetindex - the index (if the dataset is a list of data items)java.io.IOException - if the image could not be loadedpublic java.util.Optional<java.lang.Integer> getImageWidth()
ImageDatasetgetImageWidth in class ImageDatasetpublic java.util.Optional<java.lang.Integer> getImageHeight()
ImageDatasetgetImageHeight in class ImageDataset