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 anAbstractImageFolder
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ImageFolderBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
optImageHeight(int height)
Sets the height of the images.T
optImageSize(int size)
Sets the size of the images.T
optImageWidth(int width)
Sets the width of the images.T
optMaxDepth(int maxDepth)
Sets the depth of the image folder.T
setRepository(ai.djl.repository.Repository repository)
Sets the repository containing the image folder.T
setRepositoryPath(java.lang.String path)
Sets the repository file path containing the image folder.T
setRepositoryPath(java.nio.file.Path path)
Sets the repository file path containing the image folder.-
Methods inherited from class ai.djl.basicdataset.cv.ImageDataset.BaseBuilder
optFlag
-
-
-
-
Method Detail
-
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(java.lang.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(java.nio.file.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
-
-