Package org.datavec.image.recordreader
Class ImageRecordReader
- java.lang.Object
-
- org.datavec.api.records.reader.BaseRecordReader
-
- org.datavec.image.recordreader.BaseImageRecordReader
-
- org.datavec.image.recordreader.ImageRecordReader
-
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,Configurable,RecordReader
public class ImageRecordReader extends BaseImageRecordReader
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.datavec.image.recordreader.BaseImageRecordReader
appendLabel, channels, CHANNELS, conf, CROP_IMAGE, cropImage, currentFile, fileNameMap, finishedInputStreamSplit, height, HEIGHT, hitImage, IMAGE_LOADER, imageLoader, imageTransform, inputSplit, iter, labelGenerator, labelMultiGenerator, labels, logLabelCountOnInit, nchw_channels_first, pattern, patternPosition, record, width, WIDTH, writeLabel
-
Fields inherited from class org.datavec.api.records.reader.BaseRecordReader
listeners, streamCreatorFn
-
Fields inherited from interface org.datavec.api.records.reader.RecordReader
APPEND_LABEL, LABELS, NAME_SPACE
-
-
Constructor Summary
Constructors Constructor Description ImageRecordReader()Loads images with height = 28, width = 28, and channels = 1, appending no labels.ImageRecordReader(long height, long width)Loads images with given height, width, and channels = 1, appending no labels.ImageRecordReader(long height, long width, long channels)Loads images with given height, width, and channels, appending no labels - in NCHW (channels first) formatImageRecordReader(long height, long width, long channels, boolean nchw_channels_first)Loads images with given height, width, and channels, appending no labels - in specified format
Ifnchw_channels_first == trueoutput format is NCHW (channels first) - [numExamples, channels, height, width]
Ifnchw_channels_first == falseoutput format is NHWC (channels last) - [numExamples, height, width, channels]ImageRecordReader(long height, long width, long channels, boolean nchw_channels_first, PathLabelGenerator labelGenerator, ImageTransform imageTransform)Loads images with given height, width, and channels, appending labels returned by the generator.
Ifnchw_channels_first == trueoutput format is NCHW (channels first) - [numExamples, channels, height, width]
Ifnchw_channels_first == falseoutput format is NHWC (channels last) - [numExamples, height, width, channels]ImageRecordReader(long height, long width, long channels, PathLabelGenerator labelGenerator)Loads images with given height, width, and channels, appending labels returned by the generator.ImageRecordReader(long height, long width, long channels, PathLabelGenerator labelGenerator, ImageTransform imageTransform)Loads images with given height, width, and channels, appending labels returned by the generator.ImageRecordReader(long height, long width, long channels, PathMultiLabelGenerator labelGenerator)Loads images with given height, width, and channels, appending labels returned by the generator.ImageRecordReader(long height, long width, long channels, ImageTransform imageTransform)Loads images with given height, width, and channels, appending no labels.ImageRecordReader(long height, long width, PathLabelGenerator labelGenerator)Loads images with given height, width, and channels, appending labels returned by the generator Output format is NCHW (channels first) - [numExamples, channels, height, width]
-
Method Summary
-
Methods inherited from class org.datavec.image.recordreader.BaseImageRecordReader
accumulateLabel, batchesSupported, close, containsFormat, getConf, getCurrentFile, getLabel, getLabels, hasNext, initialize, initialize, initialize, initialize, loadFromMetaData, loadFromMetaData, next, next, nextRecord, numLabels, record, reset, resetSupported, setConf, setCurrentFile, setLabels
-
Methods inherited from class org.datavec.api.records.reader.BaseRecordReader
getListeners, invokeListeners, setListeners, setListeners
-
-
-
-
Constructor Detail
-
ImageRecordReader
public ImageRecordReader()
Loads images with height = 28, width = 28, and channels = 1, appending no labels. Output format is NCHW (channels first) - [numExamples, 1, 28, 28]
-
ImageRecordReader
public ImageRecordReader(long height, long width, long channels, PathLabelGenerator labelGenerator)Loads images with given height, width, and channels, appending labels returned by the generator. Output format is NCHW (channels first) - [numExamples, channels, height, width]
-
ImageRecordReader
public ImageRecordReader(long height, long width, long channels, PathMultiLabelGenerator labelGenerator)Loads images with given height, width, and channels, appending labels returned by the generator. Output format is NCHW (channels first) - [numExamples, channels, height, width]
-
ImageRecordReader
public ImageRecordReader(long height, long width, long channels)Loads images with given height, width, and channels, appending no labels - in NCHW (channels first) format
-
ImageRecordReader
public ImageRecordReader(long height, long width, long channels, boolean nchw_channels_first)Loads images with given height, width, and channels, appending no labels - in specified format
Ifnchw_channels_first == trueoutput format is NCHW (channels first) - [numExamples, channels, height, width]
Ifnchw_channels_first == falseoutput format is NHWC (channels last) - [numExamples, height, width, channels]
-
ImageRecordReader
public ImageRecordReader(long height, long width, long channels, PathLabelGenerator labelGenerator, ImageTransform imageTransform)Loads images with given height, width, and channels, appending labels returned by the generator. Output format is NCHW (channels first) - [numExamples, channels, height, width]
-
ImageRecordReader
public ImageRecordReader(long height, long width, long channels, boolean nchw_channels_first, PathLabelGenerator labelGenerator, ImageTransform imageTransform)Loads images with given height, width, and channels, appending labels returned by the generator.
Ifnchw_channels_first == trueoutput format is NCHW (channels first) - [numExamples, channels, height, width]
Ifnchw_channels_first == falseoutput format is NHWC (channels last) - [numExamples, height, width, channels]
-
ImageRecordReader
public ImageRecordReader(long height, long width, long channels, ImageTransform imageTransform)Loads images with given height, width, and channels, appending no labels. Output format is NCHW (channels first) - [numExamples, channels, height, width]
-
ImageRecordReader
public ImageRecordReader(long height, long width, PathLabelGenerator labelGenerator)Loads images with given height, width, and channels, appending labels returned by the generator Output format is NCHW (channels first) - [numExamples, channels, height, width]
-
ImageRecordReader
public ImageRecordReader(long height, long width)Loads images with given height, width, and channels = 1, appending no labels. Output format is NCHW (channels first) - [numExamples, channels, height, width]
-
-