| # E-Signature Verification Model Configuration | |
| # Model Configuration | |
| model: | |
| feature_extractor: "resnet18" # resnet18, resnet34, resnet50, efficientnet_b0, efficientnet_b1, custom | |
| feature_dim: 512 | |
| distance_metric: "cosine" # cosine, euclidean, learned | |
| pretrained: true | |
| # Training Configuration | |
| training: | |
| learning_rate: 1e-4 | |
| weight_decay: 1e-5 | |
| batch_size: 32 | |
| num_epochs: 100 | |
| patience: 10 | |
| loss_type: "contrastive" # contrastive, triplet, combined, adaptive | |
| # Data augmentation | |
| augmentation: | |
| strength: "medium" # light, medium, heavy | |
| target_size: [224, 224] | |
| # Optimizer settings | |
| optimizer: | |
| type: "adam" | |
| lr_scheduler: "reduce_on_plateau" | |
| scheduler_patience: 5 | |
| scheduler_factor: 0.5 | |
| # Data Configuration | |
| data: | |
| target_size: [224, 224] | |
| normalization: | |
| mean: [0.485, 0.456, 0.406] | |
| std: [0.229, 0.224, 0.225] | |
| # Preprocessing | |
| preprocessing: | |
| enhance_signature: true | |
| normalize_signature: true | |
| # Augmentation settings | |
| augmentation: | |
| horizontal_flip_prob: 0.3 | |
| rotation_limit: 15 | |
| brightness_contrast_limit: 0.2 | |
| gauss_noise_var_limit: [10.0, 50.0] | |
| elastic_transform_alpha: 1.0 | |
| elastic_transform_sigma: 50.0 | |
| # Evaluation Configuration | |
| evaluation: | |
| threshold: 0.5 | |
| metrics: | |
| - "accuracy" | |
| - "precision" | |
| - "recall" | |
| - "f1_score" | |
| - "roc_auc" | |
| - "pr_auc" | |
| - "eer" | |
| - "far" | |
| - "frr" | |
| # Cross-validation | |
| cross_validation: | |
| k_folds: 5 | |
| shuffle: true | |
| random_state: 42 | |
| # Logging Configuration | |
| logging: | |
| log_dir: "logs" | |
| tensorboard: true | |
| save_best_model: true | |
| save_final_model: true | |
| # Plotting | |
| plot_training_curves: true | |
| plot_roc_curve: true | |
| plot_confusion_matrix: true | |
| plot_similarity_distribution: true | |
| # Device Configuration | |
| device: | |
| auto_detect: true | |
| preferred: "cuda" # cuda, cpu, auto | |
| allow_fallback: true | |
| # Paths Configuration | |
| paths: | |
| data_dir: "data" | |
| raw_data_dir: "data/raw" | |
| processed_data_dir: "data/processed" | |
| samples_dir: "data/samples" | |
| models_dir: "models" | |
| logs_dir: "logs" | |
| results_dir: "results" | |