DetectionEngine.dataset

DetectionEngine.dataset(
    model,
    split,
    *,
    anchors=None,
    only_images=False,
    augmented=False,
)

The dataset for one split: images letterboxed to input_shape, boxes encoded.

Parameters

Name Type Description Default
model DetectionModel Which model’s settings to read. required
split str "train", "validation" or "test". required
anchors Anchors to encode the targets against. Unset means the model’s own - either the ones it declares or the ones fitted for it, and the encoding is meaningless against any others. None
only_images bool Read images alone, with no boxes. What a split with no annotations gets, so predict works on it while evaluate refuses it by name. False
augmented bool Apply the model’s augmentation. Every geometric transform in albumentations moves the boxes with the pixels, measured over 24 configurations, worst disagreement one pixel from anti-aliasing. False

Returns

Name Type Description
DetectionDataset A DetectionDataset, whose source_image(index) also reads an image at its
DetectionDataset native size through the same reader - which is what crops cuts from, since
DetectionDataset cropping the letterboxed frame would cut a downscaled object.