Spaces:
Sleeping
Sleeping
Upload 9 files
Browse files- model/detect.tflite +3 -0
- model/detect_quant.tflite +3 -0
- model/edgetpu.tflite +3 -0
- model/labelmap.pbtxt +10 -0
- model/labelmap.txt +2 -0
- model/pipeline_file.config +201 -0
- model/saved_model/saved_model.pb +3 -0
- model/saved_model/variables/variables.data-00000-of-00001 +3 -0
- model/saved_model/variables/variables.index +0 -0
model/detect.tflite
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:60a17f18a2be3382d31502db3b251d3bad4b14f49091fba2b4555ace3041fee8
|
3 |
+
size 11500088
|
model/detect_quant.tflite
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0fea11d25221a20464d08f051aa9555c2f61974f13943cf2ac60f11b3c0af881
|
3 |
+
size 3742392
|
model/edgetpu.tflite
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:632ff615f296f02ae6dbb6904a85a4417db0bfc986525f3ff7be4557d4ca3e2d
|
3 |
+
size 4080512
|
model/labelmap.pbtxt
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
item {
|
2 |
+
id: 1
|
3 |
+
name: 'empty'
|
4 |
+
}
|
5 |
+
|
6 |
+
item {
|
7 |
+
id: 2
|
8 |
+
name: 'misalignment'
|
9 |
+
}
|
10 |
+
|
model/labelmap.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
empty
|
2 |
+
misalignment
|
model/pipeline_file.config
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# SSD with Mobilenet v2 FPN-lite (go/fpn-lite) feature extractor, shared box
|
2 |
+
# predictor and focal loss (a mobile version of Retinanet).
|
3 |
+
# Retinanet: see Lin et al, https://arxiv.org/abs/1708.02002
|
4 |
+
# Trained on COCO, initialized from Imagenet classification checkpoint
|
5 |
+
# Train on TPU-8
|
6 |
+
#
|
7 |
+
# Achieves 22.2 mAP on COCO17 Val
|
8 |
+
|
9 |
+
model {
|
10 |
+
ssd {
|
11 |
+
inplace_batchnorm_update: true
|
12 |
+
freeze_batchnorm: false
|
13 |
+
num_classes: 2
|
14 |
+
box_coder {
|
15 |
+
faster_rcnn_box_coder {
|
16 |
+
y_scale: 10.0
|
17 |
+
x_scale: 10.0
|
18 |
+
height_scale: 5.0
|
19 |
+
width_scale: 5.0
|
20 |
+
}
|
21 |
+
}
|
22 |
+
matcher {
|
23 |
+
argmax_matcher {
|
24 |
+
matched_threshold: 0.5
|
25 |
+
unmatched_threshold: 0.5
|
26 |
+
ignore_thresholds: false
|
27 |
+
negatives_lower_than_unmatched: true
|
28 |
+
force_match_for_each_row: true
|
29 |
+
use_matmul_gather: true
|
30 |
+
}
|
31 |
+
}
|
32 |
+
similarity_calculator {
|
33 |
+
iou_similarity {
|
34 |
+
}
|
35 |
+
}
|
36 |
+
encode_background_as_zeros: true
|
37 |
+
anchor_generator {
|
38 |
+
multiscale_anchor_generator {
|
39 |
+
min_level: 3
|
40 |
+
max_level: 7
|
41 |
+
anchor_scale: 4.0
|
42 |
+
aspect_ratios: [1.0, 2.0, 0.5]
|
43 |
+
scales_per_octave: 2
|
44 |
+
}
|
45 |
+
}
|
46 |
+
image_resizer {
|
47 |
+
fixed_shape_resizer {
|
48 |
+
height: 320
|
49 |
+
width: 320
|
50 |
+
}
|
51 |
+
}
|
52 |
+
box_predictor {
|
53 |
+
weight_shared_convolutional_box_predictor {
|
54 |
+
depth: 128
|
55 |
+
class_prediction_bias_init: -4.6
|
56 |
+
conv_hyperparams {
|
57 |
+
activation: RELU_6,
|
58 |
+
regularizer {
|
59 |
+
l2_regularizer {
|
60 |
+
weight: 0.00004
|
61 |
+
}
|
62 |
+
}
|
63 |
+
initializer {
|
64 |
+
random_normal_initializer {
|
65 |
+
stddev: 0.01
|
66 |
+
mean: 0.0
|
67 |
+
}
|
68 |
+
}
|
69 |
+
batch_norm {
|
70 |
+
scale: true,
|
71 |
+
decay: 0.997,
|
72 |
+
epsilon: 0.001,
|
73 |
+
}
|
74 |
+
}
|
75 |
+
num_layers_before_predictor: 4
|
76 |
+
share_prediction_tower: true
|
77 |
+
use_depthwise: true
|
78 |
+
kernel_size: 3
|
79 |
+
}
|
80 |
+
}
|
81 |
+
feature_extractor {
|
82 |
+
type: 'ssd_mobilenet_v2_fpn_keras'
|
83 |
+
use_depthwise: true
|
84 |
+
fpn {
|
85 |
+
min_level: 3
|
86 |
+
max_level: 7
|
87 |
+
additional_layer_depth: 128
|
88 |
+
}
|
89 |
+
min_depth: 16
|
90 |
+
depth_multiplier: 1.0
|
91 |
+
conv_hyperparams {
|
92 |
+
activation: RELU_6,
|
93 |
+
regularizer {
|
94 |
+
l2_regularizer {
|
95 |
+
weight: 0.00004
|
96 |
+
}
|
97 |
+
}
|
98 |
+
initializer {
|
99 |
+
random_normal_initializer {
|
100 |
+
stddev: 0.01
|
101 |
+
mean: 0.0
|
102 |
+
}
|
103 |
+
}
|
104 |
+
batch_norm {
|
105 |
+
scale: true,
|
106 |
+
decay: 0.997,
|
107 |
+
epsilon: 0.001,
|
108 |
+
}
|
109 |
+
}
|
110 |
+
override_base_feature_extractor_hyperparams: true
|
111 |
+
}
|
112 |
+
loss {
|
113 |
+
classification_loss {
|
114 |
+
weighted_sigmoid_focal {
|
115 |
+
alpha: 0.25
|
116 |
+
gamma: 2.0
|
117 |
+
}
|
118 |
+
}
|
119 |
+
localization_loss {
|
120 |
+
weighted_smooth_l1 {
|
121 |
+
}
|
122 |
+
}
|
123 |
+
classification_weight: 1.0
|
124 |
+
localization_weight: 1.0
|
125 |
+
}
|
126 |
+
normalize_loss_by_num_matches: true
|
127 |
+
normalize_loc_loss_by_codesize: 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 |
+
fine_tune_checkpoint_version: V2
|
142 |
+
fine_tune_checkpoint: "/content/models/mymodel/ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8/checkpoint/ckpt-0"
|
143 |
+
fine_tune_checkpoint_type: "detection"
|
144 |
+
batch_size: 8
|
145 |
+
sync_replicas: true
|
146 |
+
startup_delay_steps: 0
|
147 |
+
replicas_to_aggregate: 8
|
148 |
+
num_steps: 5000
|
149 |
+
data_augmentation_options {
|
150 |
+
random_horizontal_flip {
|
151 |
+
}
|
152 |
+
}
|
153 |
+
data_augmentation_options {
|
154 |
+
random_crop_image {
|
155 |
+
min_object_covered: 0.0
|
156 |
+
min_aspect_ratio: 0.75
|
157 |
+
max_aspect_ratio: 3.0
|
158 |
+
min_area: 0.75
|
159 |
+
max_area: 1.0
|
160 |
+
overlap_thresh: 0.0
|
161 |
+
}
|
162 |
+
}
|
163 |
+
optimizer {
|
164 |
+
momentum_optimizer: {
|
165 |
+
learning_rate: {
|
166 |
+
cosine_decay_learning_rate {
|
167 |
+
learning_rate_base: .08
|
168 |
+
total_steps: 50000
|
169 |
+
warmup_learning_rate: .026666
|
170 |
+
warmup_steps: 1000
|
171 |
+
}
|
172 |
+
}
|
173 |
+
momentum_optimizer_value: 0.9
|
174 |
+
}
|
175 |
+
use_moving_average: false
|
176 |
+
}
|
177 |
+
max_number_of_boxes: 100
|
178 |
+
unpad_groundtruth_tensors: false
|
179 |
+
}
|
180 |
+
|
181 |
+
train_input_reader: {
|
182 |
+
label_map_path: "/content/labelmap.pbtxt"
|
183 |
+
tf_record_input_reader {
|
184 |
+
input_path: "/content/train.tfrecord"
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
eval_config: {
|
189 |
+
metrics_set: "coco_detection_metrics"
|
190 |
+
use_moving_averages: false
|
191 |
+
}
|
192 |
+
|
193 |
+
eval_input_reader: {
|
194 |
+
label_map_path: "/content/labelmap.pbtxt"
|
195 |
+
shuffle: false
|
196 |
+
num_epochs: 1
|
197 |
+
tf_record_input_reader {
|
198 |
+
input_path: "/content/val.tfrecord"
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
model/saved_model/saved_model.pb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:239f38b11177b9381683667a8e22d4e38b513b59fdba2361fb49924aea9357c3
|
3 |
+
size 6820129
|
model/saved_model/variables/variables.data-00000-of-00001
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:be82168e6090af9093e021ae0e234ffad2deec17ef209d866197928a35f6db58
|
3 |
+
size 10593838
|
model/saved_model/variables/variables.index
ADDED
Binary file (22.1 kB). View file
|
|