torchsig.image_datasets.datasets.yolo_datasets.YOLOImageCompositeDataset¶
- class torchsig.image_datasets.datasets.yolo_datasets.YOLOImageCompositeDataset(composite_scale, transforms=None, components=[], dataset_size=10, max_add=False)[source]¶
Bases:
DatasetA Dataset class generating synthetic composite images in yolo format from other image datasets Inputs:
composite_scale: a tuple of the form (height, width, num_channels) specifying the scale of the image compisites to be generated; (if a 2d tuple is passed in, it will work in greyscale) transforms: either a single function or list of functions from images to images to be applied to each SOI; used for adding noise and impairments to data; defaults to None
<NOTE>: The dataset will not have any components to add to the composite at initialization; these must be added by calling my_instance.add_component(image_dataset_to_add) All components should be torch datasets which output an image in the form of an ndarray and an integer class id label as: (image_height, image_width, ?image_depth), class_id
Methods