Advertisement
Guest User

ssd_mobilenet_v1_coco.config

a guest
Feb 19th, 2018
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.78 KB | None | 0 0
  1. # SSD with Mobilenet 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.  
  7. model {
  8. ssd {
  9. num_classes: 1
  10. box_coder {
  11. faster_rcnn_box_coder {
  12. y_scale: 10.0
  13. x_scale: 10.0
  14. height_scale: 5.0
  15. width_scale: 5.0
  16. }
  17. }
  18. matcher {
  19. argmax_matcher {
  20. matched_threshold: 0.5
  21. unmatched_threshold: 0.5
  22. ignore_thresholds: false
  23. negatives_lower_than_unmatched: true
  24. force_match_for_each_row: true
  25. }
  26. }
  27. similarity_calculator {
  28. iou_similarity {
  29. }
  30. }
  31. anchor_generator {
  32. ssd_anchor_generator {
  33. num_layers: 6
  34. min_scale: 0.2
  35. max_scale: 0.95
  36. aspect_ratios: 1.0
  37. aspect_ratios: 2.0
  38. aspect_ratios: 0.5
  39. aspect_ratios: 3.0
  40. aspect_ratios: 0.3333
  41. }
  42. }
  43. image_resizer {
  44. fixed_shape_resizer {
  45. height: 300
  46. width: 300
  47. }
  48. }
  49. box_predictor {
  50. convolutional_box_predictor {
  51. min_depth: 0
  52. max_depth: 0
  53. num_layers_before_predictor: 0
  54. use_dropout: false
  55. dropout_keep_probability: 0.8
  56. kernel_size: 1
  57. box_code_size: 4
  58. apply_sigmoid_to_scores: false
  59. conv_hyperparams {
  60. activation: RELU_6,
  61. regularizer {
  62. l2_regularizer {
  63. weight: 0.00004
  64. }
  65. }
  66. initializer {
  67. truncated_normal_initializer {
  68. stddev: 0.03
  69. mean: 0.0
  70. }
  71. }
  72. batch_norm {
  73. train: true,
  74. scale: true,
  75. center: true,
  76. decay: 0.9997,
  77. epsilon: 0.001,
  78. }
  79. }
  80. }
  81. }
  82. feature_extractor {
  83. type: 'ssd_mobilenet_v1'
  84. min_depth: 16
  85. depth_multiplier: 1.0
  86. conv_hyperparams {
  87. activation: RELU_6,
  88. regularizer {
  89. l2_regularizer {
  90. weight: 0.00004
  91. }
  92. }
  93. initializer {
  94. truncated_normal_initializer {
  95. stddev: 0.03
  96. mean: 0.0
  97. }
  98. }
  99. batch_norm {
  100. train: true,
  101. scale: true,
  102. center: true,
  103. decay: 0.9997,
  104. epsilon: 0.001,
  105. }
  106. }
  107. }
  108. loss {
  109. classification_loss {
  110. weighted_sigmoid {
  111. anchorwise_output: true
  112. }
  113. }
  114. localization_loss {
  115. weighted_smooth_l1 {
  116. anchorwise_output: true
  117. }
  118. }
  119. hard_example_miner {
  120. num_hard_examples: 3000
  121. iou_threshold: 0.99
  122. loss_type: CLASSIFICATION
  123. max_negatives_per_positive: 3
  124. min_negatives_per_image: 0
  125. }
  126. classification_weight: 1.0
  127. localization_weight: 1.0
  128. }
  129. normalize_loss_by_num_matches: true
  130. post_processing {
  131. batch_non_max_suppression {
  132. score_threshold: 1e-8
  133. iou_threshold: 0.6
  134. max_detections_per_class: 100
  135. max_total_detections: 100
  136. }
  137. score_converter: SIGMOID
  138. }
  139. }
  140. }
  141.  
  142. train_config: {
  143. batch_size: 2
  144. optimizer {
  145. rms_prop_optimizer: {
  146. learning_rate: {
  147. exponential_decay_learning_rate {
  148. initial_learning_rate: 0.004
  149. decay_steps: 800720
  150. decay_factor: 0.95
  151. }
  152. }
  153. momentum_optimizer_value: 0.9
  154. decay: 0.9
  155. epsilon: 1.0
  156. }
  157. }
  158. fine_tune_checkpoint: "ssd_mobilenet_v1_coco_2017_11_17/model.ckpt"
  159. from_detection_checkpoint: true
  160. # Note: The below line limits the training process to 200K steps, which we
  161. # empirically found to be sufficient enough to train the pets dataset. This
  162. # effectively bypasses the learning rate schedule (the learning rate will
  163. # never decay). Remove the below line to train indefinitely.
  164. num_steps: 200000
  165. data_augmentation_options {
  166. random_horizontal_flip {
  167. }
  168. }
  169. data_augmentation_options {
  170. ssd_random_crop {
  171. }
  172. }
  173. }
  174.  
  175. train_input_reader: {
  176. tf_record_input_reader {
  177. input_path: "data/train.record"
  178. }
  179. label_map_path: "data/object-detection.pbtxt"
  180. }
  181.  
  182. eval_config: {
  183. num_examples: 8000
  184. # Note: The below line limits the evaluation process to 10 evaluations.
  185. # Remove the below line to evaluate indefinitely.
  186. max_evals: 10
  187. }
  188.  
  189. eval_input_reader: {
  190. tf_record_input_reader {
  191. input_path: "data/test.record"
  192. }
  193. label_map_path: "data/object-detection.pbtxt"
  194. shuffle: false
  195. num_readers: 1
  196. num_epochs: 1
  197. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement