- class towhee.data.dataset.image_datasets.PyTorchImageDataset(image_path: str, label_file: str, data_transform: Optional[Compose] = None)¶
PyTorchImageDataset is a dataset class for training.
str) – Path to the images for your dataset.
str) – Path to your label file. The label file should be a csv file. The columns in this file should be [image_name, category], ‘image_name’ is the path of your images, ‘category’ is the label of accordance image. For example: [image_name, dog] for one row. Note that the first row should be[image_name, category]
Compose) – PyTorch transform of the input images.
- __init__(image_path: str, label_file: str, data_transform: Optional[Compose] = None)¶