|
|
|
|
|
|
| system:
|
| device: cuda
|
| num_workers: 0
|
| pin_memory: true
|
| seed: 42
|
|
|
|
|
| data:
|
| image_size: 384
|
| batch_size: 8
|
| num_classes: 3
|
|
|
|
|
| datasets:
|
| doctamper:
|
| path: datasets/DocTamper
|
| type: lmdb
|
| has_pixel_mask: true
|
| min_region_area: 0.001
|
|
|
| rtm:
|
| path: datasets/RealTextManipulation
|
| type: folder
|
| has_pixel_mask: true
|
| min_region_area: 0.0003
|
|
|
| casia:
|
| path: datasets/CASIA 1.0 dataset
|
| type: folder
|
| has_pixel_mask: false
|
| min_region_area: 0.001
|
| skip_deskew: true
|
| skip_denoising: true
|
|
|
| receipts:
|
| path: datasets/findit2
|
| type: folder
|
| has_pixel_mask: true
|
| min_region_area: 0.0005
|
|
|
| fcd:
|
| path: datasets/DocTamper/DocTamperV1-FCD
|
| type: lmdb
|
| has_pixel_mask: true
|
| min_region_area: 0.00035
|
|
|
| scd:
|
| path: datasets/DocTamper/DocTamperV1-SCD
|
| type: lmdb
|
| has_pixel_mask: true
|
| min_region_area: 0.00009
|
|
|
|
|
| chunked_training:
|
| enabled: true
|
| dataset: doctamper
|
| chunks:
|
| - {start: 0.0, end: 0.25, name: "chunk_1"}
|
| - {start: 0.25, end: 0.5, name: "chunk_2"}
|
| - {start: 0.5, end: 0.75, name: "chunk_3"}
|
| - {start: 0.75, end: 1.0, name: "chunk_4"}
|
|
|
|
|
| mixing_ratios:
|
| doctamper: 0.70
|
| scd: 0.20
|
| fcd: 0.10
|
|
|
|
|
| preprocessing:
|
| deskew: true
|
| normalize: true
|
| noise_threshold: 15.0
|
| median_filter_size: 3
|
| gaussian_sigma: 0.8
|
|
|
|
|
| dataset_specific:
|
| casia:
|
| deskew: false
|
| denoising: false
|
|
|
|
|
| augmentation:
|
| enabled: true
|
|
|
|
|
| common:
|
| - {type: "noise", prob: 0.3}
|
| - {type: "motion_blur", prob: 0.2}
|
| - {type: "jpeg_compression", prob: 0.3, quality: [60, 95]}
|
| - {type: "lighting", prob: 0.3}
|
| - {type: "perspective", prob: 0.2}
|
|
|
|
|
| receipts:
|
| - {type: "stain", prob: 0.2}
|
| - {type: "fold", prob: 0.15}
|
|
|
|
|
| model:
|
|
|
| encoder:
|
| name: mobilenetv3_small_100
|
| pretrained: true
|
| features_only: true
|
|
|
|
|
| decoder:
|
| name: unet_lite
|
| channels: [16, 24, 40, 48, 96]
|
| upsampling: bilinear
|
| use_depthwise_separable: true
|
|
|
|
|
| output_channels: 1
|
|
|
|
|
| loss:
|
|
|
| use_dice: true
|
| bce_weight: 1.0
|
| dice_weight: 1.0
|
|
|
|
|
| training:
|
| epochs: 30
|
| learning_rate: 0.001
|
| weight_decay: 0.0001
|
|
|
|
|
| optimizer: adamw
|
|
|
|
|
| scheduler:
|
| type: cosine_annealing_warm_restarts
|
| T_0: 10
|
| T_mult: 2
|
| warmup_epochs: 3
|
| min_lr: 0.00001
|
|
|
|
|
| early_stopping:
|
| enabled: true
|
| patience: 10
|
| min_delta: 0.0005
|
| restore_best_weights: true
|
| monitor: val_dice
|
| mode: max
|
|
|
|
|
| checkpoint:
|
| save_best: true
|
| save_every: 5
|
| save_last: true
|
| monitor: val_dice
|
|
|
|
|
| mask_refinement:
|
| threshold: 0.5
|
| morphology:
|
| closing_kernel: 5
|
| opening_kernel: 3
|
|
|
|
|
| min_region_area:
|
| rtm: 0.0003
|
| receipts: 0.0005
|
| default: 0.001
|
|
|
|
|
| features:
|
|
|
| deep:
|
| enabled: true
|
| pooling: gap
|
|
|
|
|
| statistical:
|
| enabled: true
|
| features:
|
| - area
|
| - perimeter
|
| - aspect_ratio
|
| - solidity
|
| - eccentricity
|
| - entropy
|
|
|
|
|
| frequency:
|
| enabled: true
|
| features:
|
| - dct_coefficients
|
| - high_frequency_energy
|
| - wavelet_energy
|
|
|
|
|
| noise:
|
| enabled: true
|
| features:
|
| - ela_mean
|
| - ela_variance
|
| - noise_residual
|
|
|
|
|
| ocr:
|
| enabled: true
|
| gated: true
|
| features:
|
| - confidence_deviation
|
| - spacing_irregularity
|
| - stroke_width_variation
|
|
|
|
|
| normalization:
|
| method: standard_scaler
|
| handle_missing: true
|
|
|
|
|
| classifier:
|
| model: lightgbm
|
| params:
|
| objective: multiclass
|
| num_class: 3
|
| boosting_type: gbdt
|
| num_leaves: 31
|
| learning_rate: 0.05
|
| n_estimators: 200
|
| max_depth: 7
|
| min_child_samples: 20
|
| subsample: 0.8
|
| colsample_bytree: 0.8
|
| reg_alpha: 0.1
|
| reg_lambda: 0.1
|
| random_state: 42
|
|
|
|
|
| confidence_threshold: 0.6
|
|
|
|
|
| metrics:
|
|
|
| localization:
|
| - iou
|
| - dice
|
| - precision
|
| - recall
|
|
|
|
|
| classification:
|
| - accuracy
|
| - f1_score
|
| - precision
|
| - recall
|
| - confusion_matrix
|
|
|
|
|
| compute_localization:
|
| doctamper: true
|
| rtm: true
|
| casia: false
|
| receipts: true
|
|
|
|
|
| outputs:
|
| base_dir: outputs
|
|
|
|
|
| checkpoints: outputs/checkpoints
|
| logs: outputs/logs
|
| plots: outputs/plots
|
| results: outputs/results
|
|
|
|
|
| visualization:
|
| save_mask: true
|
| save_overlay: true
|
| save_json: true
|
| overlay_alpha: 0.5
|
| colormap: jet
|
|
|
|
|
| deployment:
|
| export_onnx: true
|
| onnx_path: outputs/model.onnx
|
| quantization: false
|
| opset_version: 14
|
|
|
|
|
| logging:
|
| level: INFO
|
| tensorboard: true
|
| csv: true
|
| console: true
|
|
|