DAPPER (Document Analysis, Processing, and Pattern Extraction Repository)
Statistical Learning Final Project for Document Classification
 
Loading...
Searching...
No Matches
classification.datasets.loader_rvl_cdip.RVLCDIPLoader Class Reference

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

Collaboration diagram for classification.datasets.loader_rvl_cdip.RVLCDIPLoader:
Collaboration graph

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

classification.datasets.loader_rvl_cdip.RVLCDIPLoader.__init__ (   self,
MinioManager  minio_manager,
Augmentor  augmentor,
int   seed = 42,
bool   apply_ocr = False 
)

Constructor for RVLCDIPLoader class.

Parameters
minio_managerMinIO manager instance for data storage
augmentorAugmentor instance for data augmentation
seedRandom seed for reproducibility
apply_ocrWhether to apply OCR processing to the images

Member Function Documentation

◆ group_classes()

pd.DataFrame classification.datasets.loader_rvl_cdip.RVLCDIPLoader.group_classes (   self,
pd.DataFrame  df 
)

Groups document classes into broader categories.

Parameters
dfDataFrame containing document data with 'class' column
Returns
DataFrame with grouped labels in 'label' column

◆ load_dataset()

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.

Parameters
chunk_sizeNumber of samples to process in each chunk
total_samplesTotal number of samples to load (None for all)
apply_augmentationWhether to apply data augmentation
augmentation_factorNumber of augmented versions to create per image
Returns
DataFrame containing processed dataset

Member Data Documentation

◆ apply_ocr

classification.datasets.loader_rvl_cdip.RVLCDIPLoader.apply_ocr

◆ augmentor

classification.datasets.loader_rvl_cdip.RVLCDIPLoader.augmentor

◆ minio_manager

classification.datasets.loader_rvl_cdip.RVLCDIPLoader.minio_manager

◆ seed

classification.datasets.loader_rvl_cdip.RVLCDIPLoader.seed

The documentation for this class was generated from the following file: