Skip to content

Commit 507565b

Browse files
committed
init
0 parents  commit 507565b

File tree

376 files changed

+725
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

376 files changed

+725
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
*/.DS_Store
3+
/logs
4+
.vscode

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# FIREAIOT-AI

config/fyp.config

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

config/labels.pbtxt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
item {
2+
id: 1
3+
name: 'fire'
4+
}

config/test.csv

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
filename,width,height,class,xmin,ymin,xmax,ymax
2+
new-188.jpg,447,299,fire,153,94,237,225
3+
new-86.jpg,424,500,fire,239,14,424,201
4+
new-92.jpg,630,442,fire,104,4,575,403
5+
new-177.jpg,259,194,fire,158,79,259,125
6+
new-79.jpg,800,535,fire,380,52,599,292
7+
new-79.jpg,800,535,fire,224,176,421,327
8+
new-79.jpg,800,535,fire,122,327,350,518
9+
new-163.jpg,280,180,fire,31,83,230,152
10+
new-45.jpg,299,168,fire,110,27,231,138
11+
new-51.jpg,275,183,fire,36,82,272,159
12+
new-201.jpg,275,183,fire,206,37,275,140
13+
new-201.jpg,275,183,fire,5,9,97,157
14+
new-201.jpg,275,183,fire,36,50,275,145
15+
new-215.jpg,852,480,fire,321,32,712,217
16+
new-215.jpg,852,480,fire,119,177,365,352
17+
new-229.jpg,900,600,fire,29,151,885,562
18+
new-7.jpg,640,360,fire,150,26,390,336
19+
new-6.jpg,500,375,fire,117,27,374,224
20+
new-228.jpg,640,360,fire,240,17,453,284
21+
new-214.jpg,800,535,fire,410,70,592,267
22+
new-214.jpg,800,535,fire,225,194,406,313
23+
new-214.jpg,800,535,fire,140,334,302,517
24+
new-214.jpg,800,535,fire,87,50,613,533
25+
new-200.jpg,275,183,fire,184,17,259,118
26+
new-50.jpg,299,168,fire,65,19,235,158
27+
new-44.jpg,500,377,fire,134,59,421,323
28+
new-162.jpg,634,391,fire,110,14,599,235
29+
new-78.jpg,375,500,fire,46,159,220,317
30+
new-78.jpg,375,500,fire,323,37,375,257

config/test.record

1.38 MB
Binary file not shown.

0 commit comments

Comments
 (0)