You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.py 3.1 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # Copyright 2020 Huawei Technologies Co., Ltd
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # ============================================================================
  15. cfg_unet_medical = {
  16. 'model': 'unet_medical',
  17. 'crop': [388 / 572, 388 / 572],
  18. 'img_size': [572, 572],
  19. 'lr': 0.0001,
  20. 'epochs': 400,
  21. 'distribute_epochs': 1600,
  22. 'batchsize': 16,
  23. 'cross_valid_ind': 1,
  24. 'num_classes': 2,
  25. 'num_channels': 1,
  26. 'keep_checkpoint_max': 10,
  27. 'weight_decay': 0.0005,
  28. 'loss_scale': 1024.0,
  29. 'FixedLossScaleManager': 1024.0,
  30. 'resume': False,
  31. 'resume_ckpt': './',
  32. 'transfer_training': False,
  33. 'filter_weight': ['outc.weight', 'outc.bias']
  34. }
  35. cfg_unet_nested = {
  36. 'model': 'unet_nested',
  37. 'crop': None,
  38. 'img_size': [576, 576],
  39. 'lr': 0.0001,
  40. 'epochs': 400,
  41. 'distribute_epochs': 1600,
  42. 'batchsize': 16,
  43. 'cross_valid_ind': 1,
  44. 'num_classes': 2,
  45. 'num_channels': 1,
  46. 'keep_checkpoint_max': 10,
  47. 'weight_decay': 0.0005,
  48. 'loss_scale': 1024.0,
  49. 'FixedLossScaleManager': 1024.0,
  50. 'use_bn': True,
  51. 'use_ds': True,
  52. 'use_deconv': True,
  53. 'resume': False,
  54. 'resume_ckpt': './',
  55. 'transfer_training': False,
  56. 'filter_weight': ['final1.weight', 'final2.weight', 'final3.weight', 'final4.weight']
  57. }
  58. cfg_unet_nested_cell = {
  59. 'model': 'unet_nested',
  60. 'dataset': 'Cell_nuclei',
  61. 'crop': None,
  62. 'img_size': [96, 96],
  63. 'lr': 3e-4,
  64. 'epochs': 200,
  65. 'distribute_epochs': 1600,
  66. 'batchsize': 16,
  67. 'cross_valid_ind': 1,
  68. 'num_classes': 2,
  69. 'num_channels': 3,
  70. 'keep_checkpoint_max': 10,
  71. 'weight_decay': 0.0005,
  72. 'loss_scale': 1024.0,
  73. 'FixedLossScaleManager': 1024.0,
  74. 'use_bn': True,
  75. 'use_ds': True,
  76. 'use_deconv': True,
  77. 'resume': False,
  78. 'resume_ckpt': './',
  79. 'transfer_training': False,
  80. 'filter_weight': ['final1.weight', 'final2.weight', 'final3.weight', 'final4.weight']
  81. }
  82. cfg_unet_simple = {
  83. 'model': 'unet_simple',
  84. 'crop': None,
  85. 'img_size': [576, 576],
  86. 'lr': 0.0001,
  87. 'epochs': 400,
  88. 'distribute_epochs': 1600,
  89. 'batchsize': 16,
  90. 'cross_valid_ind': 1,
  91. 'num_classes': 2,
  92. 'num_channels': 1,
  93. 'keep_checkpoint_max': 10,
  94. 'weight_decay': 0.0005,
  95. 'loss_scale': 1024.0,
  96. 'FixedLossScaleManager': 1024.0,
  97. 'resume': False,
  98. 'resume_ckpt': './',
  99. 'transfer_training': False,
  100. 'filter_weight': ["final.weight"]
  101. }
  102. cfg_unet = cfg_unet_medical