CenterNet-DLA-34.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Runtime
  2. use_ema: true
  3. use_gpu: true
  4. use_xpu: false
  5. use_mlu: false
  6. use_npu: false
  7. log_iter: 20
  8. save_dir: output
  9. snapshot_epoch: 1
  10. print_flops: false
  11. print_params: false
  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://bj.bcebos.com/v1/paddledet/models/pretrained/DLA34_pretrain.pdparams
  67. CenterNet:
  68. backbone: DLA
  69. neck: CenterNetDLAFPN
  70. head: CenterNetHead
  71. post_process: CenterNetPostProcess
  72. DLA:
  73. depth: 34
  74. CenterNetDLAFPN:
  75. down_ratio: 4
  76. CenterNetHead:
  77. head_planes: 256
  78. regress_ltrb: False
  79. CenterNetPostProcess:
  80. max_per_img: 100
  81. regress_ltrb: False
  82. # Optimizer
  83. epoch: 140
  84. LearningRate:
  85. base_lr: 0.0005
  86. schedulers:
  87. - !PiecewiseDecay
  88. gamma: 0.1
  89. milestones: [90, 120]
  90. use_warmup: False
  91. OptimizerBuilder:
  92. optimizer:
  93. type: Adam
  94. regularizer: NULL
  95. # Exporting the model
  96. export:
  97. post_process: True # Whether post-processing is included in the network when export model.
  98. nms: True # Whether NMS is included in the network when export model.
  99. benchmark: False # It is used to testing model performance, if set `True`, post-process and NMS will not be exported.
  100. fuse_conv_bn: False