public class BananaDetection extends ObjectDetectionDataset
| Modifier and Type | Class and Description |
|---|---|
static class |
BananaDetection.Builder
A builder for a
BananaDetection. |
ImageDataset.BaseBuilder<T extends ImageDataset.BaseBuilder<T>>flag| Constructor and Description |
|---|
BananaDetection(BananaDetection.Builder builder)
Creates a new instance of
RandomAccessDataset with the given necessary
configurations. |
| Modifier and Type | Method and Description |
|---|---|
protected long |
availableSize() |
static BananaDetection.Builder |
builder()
Creates a new builder to build a
BananaDetection. |
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 BananaDetection(BananaDetection.Builder builder)
RandomAccessDataset with the given necessary
configurations.builder - a builder with the necessary configurationspublic static BananaDetection.Builder builder()
BananaDetection.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)protected long availableSize()
availableSize in class ai.djl.training.dataset.RandomAccessDatasetpublic void prepare(ai.djl.util.Progress progress)
throws java.io.IOException,
ai.djl.translate.TranslateException
java.io.IOExceptionai.djl.translate.TranslateExceptionprotected 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