public class ObjectDetectionRecordReader extends BaseImageRecordReader
Format of returned values: 4d array, with dimensions [minibatch, 4+C, h, w] Where the image is quantized into h x w grid locations.
Note that this matches the format required for Deeplearning4j's Yolo2OutputLayer
| Modifier and Type | Field and Description |
|---|---|
protected Image |
currentImage |
appendLabel, channels, CHANNELS, conf, CROP_IMAGE, cropImage, currentFile, fileNameMap, finishedInputStreamSplit, height, HEIGHT, hitImage, IMAGE_LOADER, imageLoader, imageTransform, inputSplit, iter, labelGenerator, labelMultiGenerator, labels, logLabelCountOnInit, pattern, patternPosition, record, width, WIDTH, writeLabellistenersAPPEND_LABEL, LABELS, NAME_SPACE| Constructor and Description |
|---|
ObjectDetectionRecordReader(int height,
int width,
int channels,
int gridH,
int gridW,
ImageObjectLabelProvider labelProvider) |
ObjectDetectionRecordReader(int height,
int width,
int channels,
int gridH,
int gridW,
ImageObjectLabelProvider labelProvider,
ImageTransform imageTransform)
When imageTransform != null, object is removed if new center is outside of transformed image bounds.
|
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(InputSplit split) |
List<Writable> |
next() |
List<List<Writable>> |
next(int num) |
Record |
nextRecord() |
List<Writable> |
record(URI uri,
DataInputStream dataInputStream) |
accumulateLabel, batchesSupported, close, containsFormat, getConf, getCurrentFile, getLabel, getLabels, hasNext, initialize, initialize, initialize, loadFromMetaData, loadFromMetaData, numLabels, reset, resetSupported, setConf, setCurrentFile, setLabelsgetListeners, invokeListeners, setListeners, setListenersprotected Image currentImage
public ObjectDetectionRecordReader(int height,
int width,
int channels,
int gridH,
int gridW,
ImageObjectLabelProvider labelProvider)
height - Height of the output imageswidth - Width of the output imageschannels - Number of channels for the output imagesgridH - Grid/quantization size (along height dimension) - Y axisgridW - Grid/quantization size (along height dimension) - X axislabelProvider - ImageObjectLabelProvider - used to look up which objects are in each imagepublic ObjectDetectionRecordReader(int height,
int width,
int channels,
int gridH,
int gridW,
ImageObjectLabelProvider labelProvider,
ImageTransform imageTransform)
height - Height of the output imageswidth - Width of the output imageschannels - Number of channels for the output imagesgridH - Grid/quantization size (along height dimension) - Y axisgridW - Grid/quantization size (along height dimension) - X axislabelProvider - ImageObjectLabelProvider - used to look up which objects are in each imageimageTransform - ImageTransform - used to transform image and coordinatespublic List<Writable> next()
next in interface RecordReadernext in class BaseImageRecordReaderpublic void initialize(InputSplit split) throws IOException
initialize in interface RecordReaderinitialize in class BaseImageRecordReaderIOExceptionpublic List<List<Writable>> next(int num)
next in interface RecordReadernext in class BaseImageRecordReaderpublic List<Writable> record(URI uri, DataInputStream dataInputStream) throws IOException
record in interface RecordReaderrecord in class BaseImageRecordReaderIOExceptionpublic Record nextRecord()
nextRecord in interface RecordReadernextRecord in class BaseImageRecordReaderCopyright © 2018. All rights reserved.