train_sup_us_template.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. trainer:
  2. name: supervised_segmentation
  3. train:
  4. seed: 42
  5. deterministic: false
  6. epochs: 200
  7. batch_size: 4
  8. val_batch_size: 4
  9. accum_steps: 1
  10. amp: true
  11. num_workers: 4
  12. pin_memory: true
  13. persistent_workers: true
  14. prefetch_factor: 2
  15. device: cuda
  16. grad_clip:
  17. enabled: true
  18. max_norm: 1.0
  19. norm_type: 2.0
  20. auto_batch_size:
  21. enabled: false
  22. target_memory_fraction: 0.75
  23. reference_gpu_gb: 8.0
  24. reference_batch_size: 4
  25. min_batch_size: 1
  26. max_batch_size: 8
  27. metrics:
  28. task_mode: binary
  29. metrics:
  30. - name: dice
  31. - name: iou
  32. loss:
  33. name: dicece
  34. task_mode: binary
  35. params:
  36. include_background: true
  37. lambda_dice: 0.7
  38. lambda_ce: 0.3
  39. validation:
  40. enabled: true
  41. interval: 1
  42. threshold: 0.5
  43. early_stopping: true
  44. early_stopping_patience: 40
  45. early_stopping_min_delta: 0.0
  46. metrics:
  47. task_mode: binary
  48. metrics:
  49. - name: dice
  50. - name: iou
  51. dataset:
  52. name: ultrasound_sup_seg
  53. dataset_name: BUSI
  54. root: data/BUSI
  55. split: train
  56. split_file: null
  57. val_split: val
  58. val_split_file: null
  59. image_size: [256, 256]
  60. in_channels: 3
  61. num_classes: 1
  62. model:
  63. model_name: swinv2_tiny_patch4_window8_256
  64. load_weights: false
  65. decoder_channels: [384, 192, 96, 96]
  66. use_multiscale_features: true
  67. include_patch_embed: true
  68. optimizer:
  69. name: adamw
  70. lr: 1.0e-4
  71. weight_decay: 0.05
  72. scheduler:
  73. name: cosine
  74. warmup:
  75. name: linear
  76. params:
  77. start_factor: 0.1
  78. total_iters: 10
  79. params:
  80. T_max: 190
  81. eta_min: 1.0e-6
  82. augmentation:
  83. train:
  84. random_flip: true
  85. random_rotate_90: true
  86. random_brightness_contrast: true
  87. brightness_limit: 0.15
  88. contrast_limit: 0.15
  89. random_gaussian_noise: true
  90. gaussian_noise_std: 0.03
  91. val: {}
  92. checkpoint:
  93. dir: outputs/supervised_segmentation/train_sup_us_template
  94. save: true
  95. save_last: true
  96. monitor: dice
  97. monitor_mode: max
  98. resume: null
  99. resume_strict: true
  100. resume_training: true
  101. logging:
  102. log_interval: 10
  103. print_training_setup: true
  104. use_swanlab: true
  105. project: X_SSL_Net
  106. experiment_name: supervised_segmentation
  107. swanlab_mode: null