public class ObjectDetectionRecordReader extends BaseImageRecordReader
| 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, nchw_channels_first, pattern, patternPosition, record, width, WIDTH, writeLabellisteners, streamCreatorFnAPPEND_LABEL, LABELS, NAME_SPACE| Constructor and Description |
|---|
ObjectDetectionRecordReader(int height,
int width,
int channels,
int gridH,
int gridW,
boolean nchw,
ImageObjectLabelProvider labelProvider)
Create ObjectDetectionRecordReader with
|
ObjectDetectionRecordReader(int height,
int width,
int channels,
int gridH,
int gridW,
boolean nchw,
ImageObjectLabelProvider labelProvider,
ImageTransform imageTransform)
When imageTransform != null, object is removed if new center is outside of transformed image bounds.
|
ObjectDetectionRecordReader(int height,
int width,
int channels,
int gridH,
int gridW,
ImageObjectLabelProvider labelProvider)
As per
ObjectDetectionRecordReader(int, int, int, int, int, boolean, ImageObjectLabelProvider) but hardcoded
to NCHW format |
ObjectDetectionRecordReader(int height,
int width,
int channels,
int gridH,
int gridW,
ImageObjectLabelProvider labelProvider,
ImageTransform imageTransform)
As per
ObjectDetectionRecordReader(int, int, int, int, int, boolean, ImageObjectLabelProvider, ImageTransform)
but hardcoded to NCHW format |
| 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)
ObjectDetectionRecordReader(int, int, int, int, int, boolean, ImageObjectLabelProvider) but hardcoded
to NCHW formatpublic ObjectDetectionRecordReader(int height,
int width,
int channels,
int gridH,
int gridW,
boolean nchw,
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 axisnchw - If true: return NCHW format labels with array shape [minibatch, 4+C, h, w]; if false, return
NHWC format labels with array shape [minibatch, h, w, 4+C]labelProvider - 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)
ObjectDetectionRecordReader(int, int, int, int, int, boolean, ImageObjectLabelProvider, ImageTransform)
but hardcoded to NCHW formatpublic ObjectDetectionRecordReader(int height,
int width,
int channels,
int gridH,
int gridW,
boolean nchw,
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 imagenchw - If true: return NCHW format labels with array shape [minibatch, 4+C, h, w]; if false, return
NHWC format labels with array shape [minibatch, h, w, 4+C]imageTransform - 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 © 2022. All rights reserved.