class documentation

Class for iterating over the labeled/unlabeled image patches in a collection.

By default, this class emits only the image patches, but you can set include_labels to True to emit (img_patch, label) tuples.

Parameters
samplesa fiftyone.core.collections.SampleCollection
patches_fieldthe name of the field defining the image patches in each sample to extract. Must be of type fiftyone.core.labels.Detection, fiftyone.core.labels.Detections, fiftyone.core.labels.Polyline, or fiftyone.core.labels.Polylines. This can be automatically inferred (only) if samples is a patches view
include_labelswhether to emit (img_patch, label) tuples rather than just image patches
force_rgbwhether to force convert the images to RGB
force_squarewhether to minimally manipulate the patch bounding boxes into squares prior to extraction
alphaan optional expansion/contraction to apply to the patches before extracting them, in [-1, inf). If provided, the length and width of the box are expanded (or contracted, when alpha < 0) by (100 * alpha)%. For example, set alpha = 0.1 to expand the boxes by 10%, and set alpha = -0.1 to contract the boxes by 10%
Method __init__ Undocumented
Method __iter__ Undocumented
Method __len__ Undocumented
Instance Variable alpha Undocumented
Instance Variable force_rgb Undocumented
Instance Variable force_square Undocumented
Instance Variable include_labels Undocumented
Instance Variable patches_field Undocumented
Instance Variable samples Undocumented
def __init__(self, samples, patches_field=None, include_labels=False, force_rgb=False, force_square=False, alpha=None): (source)

Undocumented

def __iter__(self): (source)

Undocumented

def __len__(self): (source)

Undocumented

Undocumented

force_rgb: False = (source)

Undocumented

force_square: False = (source)

Undocumented

include_labels: False = (source)

Undocumented

patches_field: None = (source)

Undocumented

Undocumented