Class AbstractImageFolder.ImageFolderBuilder<T extends AbstractImageFolder.ImageFolderBuilder<T>>

java.lang.Object
ai.djl.training.dataset.RandomAccessDataset.BaseBuilder<T>
ai.djl.basicdataset.cv.ImageDataset.BaseBuilder<T>
ai.djl.basicdataset.cv.classification.AbstractImageFolder.ImageFolderBuilder<T>
Type Parameters:
T - the builder type
Direct Known Subclasses:
FruitsFreshAndRotten.Builder, ImageFolder.Builder, ImageNet.Builder
Enclosing class:
AbstractImageFolder

public abstract static class AbstractImageFolder.ImageFolderBuilder<T extends AbstractImageFolder.ImageFolderBuilder<T>> extends ImageDataset.BaseBuilder<T>
Used to build an AbstractImageFolder.
  • Field Summary

    Fields inherited from class ai.djl.training.dataset.RandomAccessDataset.BaseBuilder

    dataBatchifier, device, labelBatchifier, limit, pipeline, prefetchNumber, sampler, targetPipeline
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    optImageHeight(int height)
    Sets the height of the images.
    optImageSize(int size)
    Sets the size of the images.
    optImageWidth(int width)
    Sets the width of the images.
    optMaxDepth(int maxDepth)
    Sets the depth of the image folder.
    setRepository(ai.djl.repository.Repository repository)
    Sets the repository containing the image folder.
    Sets the repository file path containing the image folder.
    Sets the repository file path containing the image folder.

    Methods inherited from class ai.djl.basicdataset.cv.ImageDataset.BaseBuilder

    optFlag

    Methods inherited from class ai.djl.training.dataset.RandomAccessDataset.BaseBuilder

    addTargetTransform, addTransform, getSampler, optDataBatchifier, optDevice, optLabelBatchifier, optLimit, optPipeline, optPrefetchNumber, optTargetPipeline, self, setSampling, setSampling, setSampling

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ImageFolderBuilder

      protected ImageFolderBuilder()
  • Method Details

    • setRepository

      public T setRepository(ai.djl.repository.Repository repository)
      Sets the repository containing the image folder.
      Parameters:
      repository - the repository containing the image folder
      Returns:
      this builder
    • setRepositoryPath

      public T setRepositoryPath(String path)
      Sets the repository file path containing the image folder.
      Parameters:
      path - the repository file path containing the image folder
      Returns:
      this builder
    • setRepositoryPath

      public T setRepositoryPath(Path path)
      Sets the repository file path containing the image folder.
      Parameters:
      path - the repository file path containing the image folder
      Returns:
      this builder
    • optMaxDepth

      public T optMaxDepth(int maxDepth)
      Sets the depth of the image folder.
      Parameters:
      maxDepth - the maximum number of directory levels to visit
      Returns:
      this builder
    • optImageSize

      public T optImageSize(int size)
      Sets the size of the images.
      Parameters:
      size - the size (both width and height)
      Returns:
      this builder
    • optImageWidth

      public T optImageWidth(int width)
      Sets the width of the images.
      Parameters:
      width - the width of the images
      Returns:
      this builder
    • optImageHeight

      public T optImageHeight(int height)
      Sets the height of the images.
      Parameters:
      height - the height of the images
      Returns:
      this builder