Skip to content

objdetdataloader

objdetdataloader

Module for ObjDetDataLoader

Classes

ObjDetDataLoader

ObjDetDataLoader()

Bases: DataLoader

DataLoader for ObjDetDataLoader

Source code in niceml/data/dataloaders/dataloader.py
def __init__(self):
    self.data_description = None
Functions
load_data
load_data(data_info)

Loads and returns object detection data (ObjDetData)

Source code in niceml/data/dataloaders/objdetdataloader.py
def load_data(self, data_info: ObjDetDataInfo) -> ObjDetData:
    """Loads and returns object detection data (ObjDetData)"""
    input_data_description: InputImageDataDescription = check_instance(
        self.data_description, InputImageDataDescription
    )
    with open_location(data_info.image_location) as (image_fs, image_path):
        image = load_img_uint8(
            image_path,
            file_system=image_fs,
            target_image_size=input_data_description.get_input_image_size(),
        )

    return ObjDetData(image=image, labels=data_info.labels)

Functions