|
1 | 1 | model { |
2 | | - faster_rcnn { |
| 2 | + ssd { |
3 | 3 | num_classes: 1 |
4 | 4 | image_resizer { |
5 | | - keep_aspect_ratio_resizer { |
6 | | - # Raw KITTI images have a resolution of 1242x375, if we wish to resize |
7 | | - # them to have a height of 600 then their width should be |
8 | | - # 1242/(375/600)=1987.2 |
9 | | - min_dimension: 600 |
10 | | - max_dimension: 1987 |
| 5 | + fixed_shape_resizer { |
| 6 | + height: 300 |
| 7 | + width: 300 |
11 | 8 | } |
12 | 9 | } |
13 | 10 | feature_extractor { |
14 | | - type: 'faster_rcnn_resnet101' |
15 | | - first_stage_features_stride: 16 |
| 11 | + type: "ssd_mobilenet_v2" |
| 12 | + depth_multiplier: 1.0 |
| 13 | + min_depth: 16 |
| 14 | + conv_hyperparams { |
| 15 | + regularizer { |
| 16 | + l2_regularizer { |
| 17 | + weight: 3.99999989895e-05 |
| 18 | + } |
| 19 | + } |
| 20 | + initializer { |
| 21 | + truncated_normal_initializer { |
| 22 | + mean: 0.0 |
| 23 | + stddev: 0.0299999993294 |
| 24 | + } |
| 25 | + } |
| 26 | + activation: RELU_6 |
| 27 | + batch_norm { |
| 28 | + decay: 0.999700009823 |
| 29 | + center: true |
| 30 | + scale: true |
| 31 | + epsilon: 0.0010000000475 |
| 32 | + train: true |
| 33 | + } |
| 34 | + } |
16 | 35 | } |
17 | | - first_stage_anchor_generator { |
18 | | - grid_anchor_generator { |
19 | | - scales: [0.25, 0.5, 1.0, 2.0] |
20 | | - aspect_ratios: [0.5, 1.0, 2.0] |
21 | | - height_stride: 16 |
22 | | - width_stride: 16 |
| 36 | + box_coder { |
| 37 | + faster_rcnn_box_coder { |
| 38 | + y_scale: 10.0 |
| 39 | + x_scale: 10.0 |
| 40 | + height_scale: 5.0 |
| 41 | + width_scale: 5.0 |
23 | 42 | } |
24 | 43 | } |
25 | | - first_stage_box_predictor_conv_hyperparams { |
26 | | - op: CONV |
27 | | - regularizer { |
28 | | - l2_regularizer { |
29 | | - weight: 0.0 |
30 | | - } |
| 44 | + matcher { |
| 45 | + argmax_matcher { |
| 46 | + matched_threshold: 0.5 |
| 47 | + unmatched_threshold: 0.5 |
| 48 | + ignore_thresholds: false |
| 49 | + negatives_lower_than_unmatched: true |
| 50 | + force_match_for_each_row: true |
31 | 51 | } |
32 | | - initializer { |
33 | | - truncated_normal_initializer { |
34 | | - stddev: 0.01 |
35 | | - } |
| 52 | + } |
| 53 | + similarity_calculator { |
| 54 | + iou_similarity { |
36 | 55 | } |
37 | 56 | } |
38 | | - first_stage_nms_score_threshold: 0.0 |
39 | | - first_stage_nms_iou_threshold: 0.7 |
40 | | - first_stage_max_proposals: 300 |
41 | | - first_stage_localization_loss_weight: 2.0 |
42 | | - first_stage_objectness_loss_weight: 1.0 |
43 | | - initial_crop_size: 14 |
44 | | - maxpool_kernel_size: 2 |
45 | | - maxpool_stride: 2 |
46 | | - second_stage_box_predictor { |
47 | | - mask_rcnn_box_predictor { |
48 | | - use_dropout: false |
49 | | - dropout_keep_probability: 1.0 |
50 | | - fc_hyperparams { |
51 | | - op: FC |
| 57 | + box_predictor { |
| 58 | + convolutional_box_predictor { |
| 59 | + conv_hyperparams { |
52 | 60 | regularizer { |
53 | 61 | l2_regularizer { |
54 | | - weight: 0.0 |
| 62 | + weight: 3.99999989895e-05 |
55 | 63 | } |
56 | 64 | } |
57 | 65 | initializer { |
58 | | - variance_scaling_initializer { |
59 | | - factor: 1.0 |
60 | | - uniform: true |
61 | | - mode: FAN_AVG |
| 66 | + truncated_normal_initializer { |
| 67 | + mean: 0.0 |
| 68 | + stddev: 0.0299999993294 |
62 | 69 | } |
63 | 70 | } |
| 71 | + activation: RELU_6 |
| 72 | + batch_norm { |
| 73 | + decay: 0.999700009823 |
| 74 | + center: true |
| 75 | + scale: true |
| 76 | + epsilon: 0.0010000000475 |
| 77 | + train: true |
| 78 | + } |
64 | 79 | } |
| 80 | + min_depth: 0 |
| 81 | + max_depth: 0 |
| 82 | + num_layers_before_predictor: 0 |
| 83 | + use_dropout: false |
| 84 | + dropout_keep_probability: 0.800000011921 |
| 85 | + kernel_size: 1 |
| 86 | + box_code_size: 4 |
| 87 | + apply_sigmoid_to_scores: false |
65 | 88 | } |
66 | 89 | } |
67 | | - second_stage_post_processing { |
| 90 | + anchor_generator { |
| 91 | + ssd_anchor_generator { |
| 92 | + num_layers: 6 |
| 93 | + min_scale: 0.20000000298 |
| 94 | + max_scale: 0.949999988079 |
| 95 | + aspect_ratios: 1.0 |
| 96 | + aspect_ratios: 2.0 |
| 97 | + aspect_ratios: 0.5 |
| 98 | + aspect_ratios: 3.0 |
| 99 | + aspect_ratios: 0.333299994469 |
| 100 | + } |
| 101 | + } |
| 102 | + post_processing { |
68 | 103 | batch_non_max_suppression { |
69 | | - score_threshold: 0.0 |
70 | | - iou_threshold: 0.6 |
| 104 | + score_threshold: 9.99999993923e-09 |
| 105 | + iou_threshold: 0.649999976158 |
71 | 106 | max_detections_per_class: 100 |
72 | | - max_total_detections: 300 |
| 107 | + max_total_detections: 100 |
73 | 108 | } |
74 | | - score_converter: SOFTMAX |
| 109 | + score_converter: SIGMOID |
75 | 110 | } |
76 | | - second_stage_localization_loss_weight: 2.0 |
77 | | - second_stage_classification_loss_weight: 1.0 |
78 | | - } |
79 | | -} |
80 | | - |
81 | | -train_config: { |
82 | | - batch_size: 8 |
83 | | - optimizer { |
84 | | - momentum_optimizer: { |
85 | | - learning_rate: { |
86 | | - manual_step_learning_rate { |
87 | | - initial_learning_rate: 0.005 |
88 | | - schedule { |
89 | | - step: 500000 |
90 | | - learning_rate: .00001 |
91 | | - } |
92 | | - schedule { |
93 | | - step: 700000 |
94 | | - learning_rate: .000001 |
95 | | - } |
| 111 | + normalize_loss_by_num_matches: true |
| 112 | + loss { |
| 113 | + localization_loss { |
| 114 | + weighted_smooth_l1 { |
| 115 | + } |
| 116 | + } |
| 117 | + classification_loss { |
| 118 | + weighted_sigmoid { |
96 | 119 | } |
97 | 120 | } |
98 | | - momentum_optimizer_value: 0.9 |
| 121 | + hard_example_miner { |
| 122 | + num_hard_examples: 3000 |
| 123 | + iou_threshold: 0.990000009537 |
| 124 | + loss_type: CLASSIFICATION |
| 125 | + max_negatives_per_positive: 3 |
| 126 | + min_negatives_per_image: 3 |
| 127 | + } |
| 128 | + classification_weight: 1.0 |
| 129 | + localization_weight: 1.0 |
99 | 130 | } |
100 | | - use_moving_average: false |
101 | 131 | } |
102 | | - gradient_clipping_by_norm: 10.0 |
103 | | - fine_tune_checkpoint: "brain/model/model.ckpt" |
104 | | - from_detection_checkpoint: true |
105 | | - num_steps: 800000 |
| 132 | +} |
| 133 | +train_config { |
| 134 | + batch_size: 128 |
106 | 135 | data_augmentation_options { |
107 | 136 | random_horizontal_flip { |
108 | 137 | } |
109 | 138 | } |
| 139 | + data_augmentation_options { |
| 140 | + ssd_random_crop { |
| 141 | + } |
| 142 | + } |
| 143 | + optimizer { |
| 144 | + rms_prop_optimizer { |
| 145 | + learning_rate { |
| 146 | + exponential_decay_learning_rate { |
| 147 | + initial_learning_rate: 0.01 |
| 148 | + decay_steps: 800720 |
| 149 | + decay_factor: 0.949999988079 |
| 150 | + } |
| 151 | + } |
| 152 | + momentum_optimizer_value: 0.899999976158 |
| 153 | + decay: 0.899999976158 |
| 154 | + epsilon: 1.0 |
| 155 | + } |
| 156 | + } |
| 157 | + fine_tune_checkpoint: "brain/preTrianedModel/model.ckpt" |
| 158 | + fine_tune_checkpoint_type: "detection" |
110 | 159 | } |
111 | | - |
112 | | -train_input_reader: { |
| 160 | +train_input_reader { |
113 | 161 | label_map_path: "brain/config/labels.pbtxt" |
114 | | - tf_record_input_reader: { |
| 162 | + tf_record_input_reader { |
115 | 163 | input_path: "brain/config/train.record" |
116 | 164 | } |
117 | 165 | } |
118 | | - |
119 | | -eval_config: { |
| 166 | +eval_config { |
| 167 | + num_visualizations: 20 |
| 168 | + num_examples: 20 |
120 | 169 | use_moving_averages: false |
121 | | - num_examples: 10 |
122 | | - num_visualizations: 10 |
123 | 170 | } |
124 | | - |
125 | | -eval_input_reader: { |
| 171 | +eval_input_reader { |
126 | 172 | label_map_path: "brain/config/labels.pbtxt" |
127 | | - tf_record_input_reader: { |
| 173 | + shuffle: false |
| 174 | + num_readers: 1 |
| 175 | + tf_record_input_reader { |
128 | 176 | input_path: "brain/config/test.record" |
129 | 177 | } |
130 | 178 | } |
0 commit comments