CenterNet-ResNet50.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. # Runtime
  2. use_gpu: true
  3. use_xpu: false
  4. use_mlu: false
  5. use_npu: false
  6. log_iter: 20
  7. save_dir: output
  8. snapshot_epoch: 1
  9. print_flops: false
  10. print_params: false
  11. use_ema: true
  12. # Dataset
  13. metric: COCO
  14. num_classes: 80
  15. TrainDataset:
  16. name: COCODataSet
  17. image_dir: train2017
  18. anno_path: annotations/instances_train2017.json
  19. dataset_dir: dataset/coco
  20. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd']
  21. EvalDataset:
  22. name: COCODataSet
  23. image_dir: val2017
  24. anno_path: annotations/instances_val2017.json
  25. dataset_dir: dataset/coco
  26. allow_empty: true
  27. TestDataset:
  28. name: ImageFolder
  29. anno_path: annotations/instances_val2017.json # also support txt (like VOC's label_list.txt)
  30. dataset_dir: dataset/coco # if set, anno_path will be 'dataset_dir/anno_path'
  31. # Reader
  32. worker_num: 4
  33. TrainReader:
  34. inputs_def:
  35. image_shape: [3, 512, 512]
  36. sample_transforms:
  37. - Decode: {}
  38. - FlipWarpAffine: {keep_res: False, input_h: 512, input_w: 512, use_random: True}
  39. - CenterRandColor: {}
  40. - Lighting: {eigval: [0.2141788, 0.01817699, 0.00341571], eigvec: [[-0.58752847, -0.69563484, 0.41340352], [-0.5832747, 0.00994535, -0.81221408], [-0.56089297, 0.71832671, 0.41158938]]}
  41. - NormalizeImage: {mean: [0.40789655, 0.44719303, 0.47026116], std: [0.2886383 , 0.27408165, 0.27809834], is_scale: False}
  42. - Permute: {}
  43. - Gt2CenterNetTarget: {down_ratio: 4, max_objs: 128}
  44. batch_size: 16
  45. shuffle: True
  46. drop_last: True
  47. use_shared_memory: True
  48. EvalReader:
  49. sample_transforms:
  50. - Decode: {}
  51. - WarpAffine: {keep_res: True, input_h: 512, input_w: 512}
  52. - NormalizeImage: {mean: [0.40789655, 0.44719303, 0.47026116], std: [0.2886383 , 0.27408165, 0.27809834]}
  53. - Permute: {}
  54. batch_size: 1
  55. TestReader:
  56. inputs_def:
  57. image_shape: [3, 512, 512]
  58. sample_transforms:
  59. - Decode: {}
  60. - WarpAffine: {keep_res: True, input_h: 512, input_w: 512}
  61. - NormalizeImage: {mean: [0.40789655, 0.44719303, 0.47026116], std: [0.2886383 , 0.27408165, 0.27809834], is_scale: True}
  62. - Permute: {}
  63. batch_size: 1
  64. # Model
  65. architecture: CenterNet
  66. pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/ResNet50_vd_ssld_pretrained.pdparams
  67. norm_type: sync_bn
  68. use_ema: true
  69. ema_decay: 0.9998
  70. CenterNet:
  71. backbone: ResNet
  72. neck: CenterNetDLAFPN
  73. head: CenterNetHead
  74. post_process: CenterNetPostProcess
  75. ResNet:
  76. depth: 50
  77. variant: d
  78. return_idx: [0, 1, 2, 3]
  79. freeze_at: -1
  80. norm_decay: 0.
  81. dcn_v2_stages: [3]
  82. CenterNetDLAFPN:
  83. first_level: 0
  84. last_level: 4
  85. down_ratio: 4
  86. dcn_v2: False
  87. CenterNetHead:
  88. head_planes: 256
  89. regress_ltrb: False
  90. CenterNetPostProcess:
  91. max_per_img: 100
  92. regress_ltrb: False
  93. # Optimizer
  94. epoch: 140
  95. LearningRate:
  96. base_lr: 0.0005
  97. schedulers:
  98. - !PiecewiseDecay
  99. gamma: 0.1
  100. milestones: [90, 120]
  101. use_warmup: False
  102. OptimizerBuilder:
  103. optimizer:
  104. type: Adam
  105. regularizer: NULL
  106. # Exporting the model
  107. export:
  108. post_process: True # Whether post-processing is included in the network when export model.
  109. nms: True # Whether NMS is included in the network when export model.
  110. benchmark: False # It is used to testing model performance, if set `True`, post-process and NMS will not be exported.
  111. fuse_conv_bn: False