faster_rcnn_resnet101.config 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. # Faster R-CNN with Resnet-101 (v1), configuration for MSCOCO Dataset.
  2. # Users should configure the fine_tune_checkpoint field in the train config as
  3. # well as the label_map_path and input_path fields in the train_input_reader and
  4. # eval_input_reader. Search for "PATH_TO_BE_CONFIGURED" to find the fields that
  5. # should be configured.
  6. model {
  7. faster_rcnn {
  8. num_classes: 3
  9. image_resizer {
  10. keep_aspect_ratio_resizer {
  11. min_dimension: 600
  12. max_dimension: 1024
  13. }
  14. }
  15. feature_extractor {
  16. type: 'faster_rcnn_resnet101'
  17. first_stage_features_stride: 16
  18. }
  19. first_stage_anchor_generator {
  20. grid_anchor_generator {
  21. scales: [0.25, 0.5, 1.0, 2.0]
  22. aspect_ratios: [0.5, 1.0, 2.0]
  23. height_stride: 16
  24. width_stride: 16
  25. }
  26. }
  27. first_stage_box_predictor_conv_hyperparams {
  28. op: CONV
  29. regularizer {
  30. l2_regularizer {
  31. weight: 0.0
  32. }
  33. }
  34. initializer {
  35. truncated_normal_initializer {
  36. stddev: 0.01
  37. }
  38. }
  39. }
  40. first_stage_nms_score_threshold: 0.0
  41. first_stage_nms_iou_threshold: 0.7
  42. first_stage_max_proposals: 300
  43. first_stage_localization_loss_weight: 2.0
  44. first_stage_objectness_loss_weight: 1.0
  45. initial_crop_size: 14
  46. maxpool_kernel_size: 2
  47. maxpool_stride: 2
  48. second_stage_box_predictor {
  49. mask_rcnn_box_predictor {
  50. use_dropout: false
  51. dropout_keep_probability: 1.0
  52. fc_hyperparams {
  53. op: FC
  54. regularizer {
  55. l2_regularizer {
  56. weight: 0.0
  57. }
  58. }
  59. initializer {
  60. variance_scaling_initializer {
  61. factor: 1.0
  62. uniform: true
  63. mode: FAN_AVG
  64. }
  65. }
  66. }
  67. }
  68. }
  69. second_stage_post_processing {
  70. batch_non_max_suppression {
  71. score_threshold: 0.0
  72. iou_threshold: 0.6
  73. max_detections_per_class: 100
  74. max_total_detections: 300
  75. }
  76. score_converter: SOFTMAX
  77. }
  78. second_stage_localization_loss_weight: 2.0
  79. second_stage_classification_loss_weight: 1.0
  80. }
  81. }
  82. train_config: {
  83. batch_size: 1
  84. optimizer {
  85. momentum_optimizer: {
  86. learning_rate: {
  87. manual_step_learning_rate {
  88. initial_learning_rate: 0.0003
  89. schedule {
  90. step: 900000
  91. learning_rate: .00003
  92. }
  93. schedule {
  94. step: 1200000
  95. learning_rate: .000003
  96. }
  97. }
  98. }
  99. momentum_optimizer_value: 0.9
  100. }
  101. use_moving_average: false
  102. }
  103. gradient_clipping_by_norm: 10.0
  104. fine_tune_checkpoint: "/tensorflow/train/faster_rcnn_resnet101_coco_11_06_2017/model.ckpt"
  105. from_detection_checkpoint: true
  106. data_augmentation_options {
  107. random_horizontal_flip {
  108. }
  109. }
  110. }
  111. train_input_reader: {
  112. tf_record_input_reader {
  113. input_path: "/tensorflow/input/train.record"
  114. }
  115. label_map_path: "/tensorflow/input/annotations/label_map.pbtxt"
  116. }
  117. eval_config: {
  118. num_examples: 8000
  119. # Note: The below line limits the evaluation process to 10 evaluations.
  120. # Remove the below line to evaluate indefinitely.
  121. max_evals: 10
  122. }
  123. eval_input_reader: {
  124. tf_record_input_reader {
  125. input_path: "/tensorflow/input/val.record"
  126. }
  127. label_map_path: "/tensorflow/input/annotations/label_map.pbtxt"
  128. shuffle: false
  129. num_readers: 1
  130. }