◆ __init__()
| layout.LayoutLMv3Dataset.__init__ |
( |
|
self, |
|
|
|
dataframe, |
|
|
|
bucket_name, |
|
|
|
transform, |
|
|
** |
label_map |
|
) |
| |
Constructor for MinioImageDataset class.
- Parameters
-
| dataframe | DataFrame containing 'image' URLs and 'label' columns |
| bucket_name | Name of the MinIO bucket to fetch images from |
| transform | Optional transformations to apply to the images |
| label_map | Optional dictionary mapping label strings to integers |
Constructor for MinioImageDataset class
Args:
dataframe: DataFrame containing 'image' URLs and 'label' columns
bucket_name: Name of the MinIO bucket to fetch images from
transform: Optional transformations to apply to the images
label_map: Optional dictionary mapping label strings to integers
Reimplemented from classification.data.minio_dataset.MinioImageDataset.
◆ __getitem__()
| layout.LayoutLMv3Dataset.__getitem__ |
( |
|
self, |
|
|
|
idx |
|
) |
| |
Fetches and processes a single item from the dataset.
- Parameters
-
| idx | Index of the item to fetch |
- Returns
- Tuple of (transformed image tensor, class label tensor)
Fetches and processes a single item from the dataset
Args:
idx: Index of the item to fetch
Returns:
Tuple of (transformed image tensor, class label tensor)
Reimplemented from classification.data.minio_dataset.MinioImageDataset.
◆ get_image_path()
| layout.LayoutLMv3Dataset.get_image_path |
( |
|
self, |
|
|
|
idx |
|
) |
| |
Get the image path for the given index from the dataframe.
◆ apply_ocr
| layout.LayoutLMv3Dataset.apply_ocr |
◆ dataframe
| layout.LayoutLMv3Dataset.dataframe |
◆ labels
| layout.LayoutLMv3Dataset.labels |
◆ ocr_cache
| layout.LayoutLMv3Dataset.ocr_cache |
◆ processor
| layout.LayoutLMv3Dataset.processor |
The documentation for this class was generated from the following file: