# Data Augmentation Configuration
# Main configuration file for image data augmentation

# Paths configuration
paths:
  input_dir: "data/IDcards/raw/test"
  output_dir: "out1"
  log_file: "logs/data_augmentation.log"

# Data augmentation parameters - ROTATION and RANDOM CROPPING
augmentation:
  # Geometric transformations
  rotation:
    enabled: true
    angles: [30, 60, 120, 150, 180, 210, 240, 300, 330]  # Specific rotation angles
    probability: 1.0  # Always apply rotation
  
  # Random cropping to simulate partially visible ID cards
  random_cropping:
    enabled: true
    ratio_range: [0.7, 1.0]  # Crop ratio range (min, max)
    probability: 1.0  # Always apply cropping
  
  # Random noise to simulate worn-out ID cards
  random_noise:
    enabled: true
    mean_range: [0.0, 0.7]  # Noise mean range (min, max)
    variance_range: [0.0, 0.1]  # Noise variance range (min, max)
    probability: 1.0  # Always apply noise
  
  # Partial blockage to simulate occluded card details
  partial_blockage:
    enabled: true
    num_occlusions_range: [1, 100]  # Number of occlusion lines (min, max)
    coverage_range: [0.0, 0.25]  # Coverage ratio (min, max)
    variance_range: [0.0, 0.1]  # Line thickness variance (min, max)
    probability: 1.0  # Always apply blockage
  
  # Grayscale transformation to mimic Xerox/scan copies
  grayscale:
    enabled: true
    probability: 1.0  # Always apply grayscale
  
  # Blurring to simulate blurred card images that are still readable
  blurring:
    enabled: true
    kernel_ratio_range: [0.0, 0.0084]  # Kernel ratio range (min, max)
    probability: 1.0  # Always apply blurring
  
  # Brightness and contrast adjustment to mimic different environmental lighting conditions
  brightness_contrast:
    enabled: true
    alpha_range: [0.4, 3.0]  # Contrast range (min, max)
    beta_range: [1, 100]  # Brightness range (min, max)
    probability: 1.0  # Always apply brightness/contrast adjustment

# Processing configuration
processing:
  target_size: [640, 640]  # [width, height] - Increased for better coverage
  batch_size: 32
  num_augmentations: 3  # number of augmented versions per image
  save_format: "jpg"
  quality: 95

# Supported image formats
supported_formats:
  - ".jpg"
  - ".jpeg"
  - ".png"
  - ".bmp"
  - ".tiff"

# Logging configuration
logging:
  level: "INFO"  # DEBUG, INFO, WARNING, ERROR
  format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
  handlers:
    - type: "file"
      filename: "logs/data_augmentation.log"
    - type: "console"

# Performance settings
performance:
  num_workers: 4
  prefetch_factor: 2
  pin_memory: true
  use_gpu: false 