Loader class for RVL-CDIP dataset. More...

Public Member Functions | |
| __init__ (self, MinioManager minio_manager, Augmentor augmentor, int seed=42, bool apply_ocr=False) | |
| Constructor for RVLCDIPLoader class. | |
| pd.DataFrame | group_classes (self, pd.DataFrame df) |
| Groups document classes into broader categories. | |
| pd.DataFrame | load_dataset (self, int chunk_size=2000, Optional[int] total_samples=10000, bool apply_augmentation=True, int augmentation_factor=2) |
| Loads and processes the RVL-CDIP dataset. | |
Public Attributes | |
| minio_manager | |
| augmentor | |
| seed | |
| apply_ocr | |
Loader class for RVL-CDIP dataset.
This class provides methods for loading and processing document images from the RVL-CDIP dataset. It handles data loading, class grouping, augmentation, and integration with MinIO storage for document classification tasks.
| classification.datasets.loader_rvl_cdip.RVLCDIPLoader.__init__ | ( | self, | |
| MinioManager | minio_manager, | ||
| Augmentor | augmentor, | ||
| int | seed = 42, |
||
| bool | apply_ocr = False |
||
| ) |
Constructor for RVLCDIPLoader class.
| minio_manager | MinIO manager instance for data storage |
| augmentor | Augmentor instance for data augmentation |
| seed | Random seed for reproducibility |
| apply_ocr | Whether to apply OCR processing to the images |
| pd.DataFrame classification.datasets.loader_rvl_cdip.RVLCDIPLoader.group_classes | ( | self, | |
| pd.DataFrame | df | ||
| ) |
Groups document classes into broader categories.
| df | DataFrame containing document data with 'class' column |
| pd.DataFrame classification.datasets.loader_rvl_cdip.RVLCDIPLoader.load_dataset | ( | self, | |
| int | chunk_size = 2000, |
||
| Optional[int] | total_samples = 10000, |
||
| bool | apply_augmentation = True, |
||
| int | augmentation_factor = 2 |
||
| ) |
Loads and processes the RVL-CDIP dataset.
| chunk_size | Number of samples to process in each chunk |
| total_samples | Total number of samples to load (None for all) |
| apply_augmentation | Whether to apply data augmentation |
| augmentation_factor | Number of augmented versions to create per image |
| classification.datasets.loader_rvl_cdip.RVLCDIPLoader.apply_ocr |
| classification.datasets.loader_rvl_cdip.RVLCDIPLoader.augmentor |
| classification.datasets.loader_rvl_cdip.RVLCDIPLoader.minio_manager |
| classification.datasets.loader_rvl_cdip.RVLCDIPLoader.seed |