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 -
Method Summary
Modifier and TypeMethodDescriptionoptImageHeight(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.setRepositoryPath(String path) Sets the repository file path containing the image folder.setRepositoryPath(Path path) Sets the repository file path containing the image folder.Methods inherited from class ai.djl.basicdataset.cv.ImageDataset.BaseBuilder
optFlagMethods inherited from class ai.djl.training.dataset.RandomAccessDataset.BaseBuilder
addTargetTransform, addTransform, getSampler, optDataBatchifier, optDevice, optLabelBatchifier, optLimit, optPipeline, optPrefetchNumber, optTargetPipeline, self, setSampling, setSampling, setSampling
-
Constructor Details
-
ImageFolderBuilder
protected ImageFolderBuilder()
-
-
Method Details
-
setRepository
Sets the repository containing the image folder.- Parameters:
repository- the repository containing the image folder- Returns:
- this builder
-
setRepositoryPath
Sets the repository file path containing the image folder.- Parameters:
path- the repository file path containing the image folder- Returns:
- this builder
-
setRepositoryPath
Sets the repository file path containing the image folder.- Parameters:
path- the repository file path containing the image folder- Returns:
- this builder
-
optMaxDepth
Sets the depth of the image folder.- Parameters:
maxDepth- the maximum number of directory levels to visit- Returns:
- this builder
-
optImageSize
Sets the size of the images.- Parameters:
size- the size (both width and height)- Returns:
- this builder
-
optImageWidth
Sets the width of the images.- Parameters:
width- the width of the images- Returns:
- this builder
-
optImageHeight
Sets the height of the images.- Parameters:
height- the height of the images- Returns:
- this builder
-