Skip to content

Commit a93dc96

Browse files
committed
Adding corgi config and label
1 parent a254cdf commit a93dc96

File tree

2 files changed

+195
-0
lines changed

2 files changed

+195
-0
lines changed

corgi.config

+191
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# SSD with Mobilenet v2 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_v2'
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+
}
112+
}
113+
localization_loss {
114+
weighted_smooth_l1 {
115+
}
116+
}
117+
hard_example_miner {
118+
num_hard_examples: 3000
119+
iou_threshold: 0.99
120+
loss_type: CLASSIFICATION
121+
max_negatives_per_positive: 3
122+
min_negatives_per_image: 3
123+
}
124+
classification_weight: 1.0
125+
localization_weight: 1.0
126+
}
127+
normalize_loss_by_num_matches: true
128+
post_processing {
129+
batch_non_max_suppression {
130+
score_threshold: 1e-8
131+
iou_threshold: 0.6
132+
max_detections_per_class: 100
133+
max_total_detections: 100
134+
}
135+
score_converter: SIGMOID
136+
}
137+
}
138+
}
139+
140+
train_config: {
141+
batch_size: 24
142+
optimizer {
143+
rms_prop_optimizer: {
144+
learning_rate: {
145+
exponential_decay_learning_rate {
146+
initial_learning_rate: 0.004
147+
decay_steps: 800720
148+
decay_factor: 0.95
149+
}
150+
}
151+
momentum_optimizer_value: 0.9
152+
decay: 0.9
153+
epsilon: 1.0
154+
}
155+
}
156+
fine_tune_checkpoint: "/Users/hluong/PycharmProjects/ObjectRecognition/ssd_mobilenet_v2_coco_2018_03_29/model.ckpt"
157+
fine_tune_checkpoint_type: "detection"
158+
# Note: The below line limits the training process to 200K steps, which we
159+
# empirically found to be sufficient enough to train the pets dataset. This
160+
# effectively bypasses the learning rate schedule (the learning rate will
161+
# never decay). Remove the below line to train indefinitely.
162+
num_steps: 200000
163+
data_augmentation_options {
164+
random_horizontal_flip {
165+
}
166+
}
167+
data_augmentation_options {
168+
ssd_random_crop {
169+
}
170+
}
171+
}
172+
173+
train_input_reader: {
174+
tf_record_input_reader {
175+
input_path: "/Users/hluong/PycharmProjects/ObjectRecognition/google_images/train.record"
176+
}
177+
label_map_path: "/Users/hluong/PycharmProjects/ObjectRecognition/models/research/object_detection/corgi_training/corgi.pbtxt"
178+
}
179+
180+
eval_config: {
181+
num_examples: 40
182+
}
183+
184+
eval_input_reader: {
185+
tf_record_input_reader {
186+
input_path: "/Users/hluong/PycharmProjects/ObjectRecognition/google_images/test.record"
187+
}
188+
label_map_path: "/Users/hluong/PycharmProjects/ObjectRecognition/models/research/object_detection/corgi_training/corgi.pbtxt"
189+
shuffle: false
190+
num_readers: 1
191+
}

corgi.pbtxt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
item {
2+
id: 1
3+
name: 'corgi'
4+
}

0 commit comments

Comments
 (0)