File tree Expand file tree Collapse file tree 5 files changed +37
-9
lines changed Expand file tree Collapse file tree 5 files changed +37
-9
lines changed Original file line number Diff line number Diff line change @@ -128,4 +128,9 @@ dmypy.json
128
128
* .txt
129
129
/object_detection /test_ckpt /
130
130
/object_detection /test_data /
131
- /object_detection /test_images /
131
+ /object_detection /test_images /
132
+ * .meta
133
+ * .index
134
+ model_file /pretrain /checkpoint
135
+ * .pb
136
+ * .data-00000-of-00001
Original file line number Diff line number Diff line change 11
11
- Tensorflow 1.15.2
12
12
- lxml 4.5.0
13
13
- Pillow 7.0.0
14
- - Matplotlib 3.2.0
14
+ - matplotlib 3.2.0
15
+ - PyYaml 5.3
Original file line number Diff line number Diff line change
1
+ import os
2
+ import shutil
3
+ import argparse
4
+ import sys
5
+
6
+ parser = argparse .ArgumentParser ()
7
+ parser .add_argument ("-path" , help = "Specify the absolute path to the compressed file" )
8
+ args = parser .parse_args ()
9
+
10
+ if not hasattr (args , 'path' ):
11
+ print ("Please specify the absolute path with \" -path\" " )
12
+ else :
13
+ os .chdir (sys .path [0 ])
14
+
15
+ if len (os .listdir ('model_file/pretrain' )) > 1 :
16
+ pass
17
+ else :
18
+ shutil .copy (args .path , 'model_file/pretrain' )
19
+ os .system ('pip install -e slim' )
20
+ os .system ('python object_detection/legacy/train.py --train_dir=model_file/train ' +
21
+ '--pipeline_config_path=ssd_resnet50_v1_fpn.config' )
Original file line number Diff line number Diff line change 91
91
@contrib_framework .deprecated (None , 'Use object_detection/model_main.py.' )
92
92
def main (_ ):
93
93
assert FLAGS .train_dir , '`train_dir` is missing.'
94
- if FLAGS .task == 0 : tf .gfile .MakeDirs (FLAGS .train_dir )
94
+ if FLAGS .task == 0 :
95
+ tf .gfile .MakeDirs (FLAGS .train_dir )
95
96
if FLAGS .pipeline_config_path :
96
97
configs = config_util .get_configs_from_pipeline_file (
97
98
FLAGS .pipeline_config_path )
Original file line number Diff line number Diff line change @@ -127,13 +127,13 @@ model {
127
127
}
128
128
129
129
train_config: {
130
- fine_tune_checkpoint:"/Users/widget/Documents/Projects.nosync/Python.nosyc/sonar_baseline_with_tensorflow/ model_file/pretrain/model.ckpt"
130
+ fine_tune_checkpoint:"model_file/pretrain/model.ckpt"
131
131
from_detection_checkpoint: true
132
132
batch_size: 16
133
133
sync_replicas: true
134
134
startup_delay_steps: 0
135
135
replicas_to_aggregate: 8
136
- num_steps: 25000
136
+ num_steps: 50000
137
137
data_augmentation_options {
138
138
random_horizontal_flip {
139
139
}
@@ -168,9 +168,9 @@ from_detection_checkpoint: true
168
168
169
169
train_input_reader: {
170
170
tf_record_input_reader {
171
- input_path:"/Users/widget/Documents/Projects.nosync/Python.nosyc/sonar_baseline_with_tensorflow/ dataset/tfrecords/pascal_train.record"
171
+ input_path:"dataset/tfrecords/pascal_train.record"
172
172
}
173
- label_map_path:"/Users/widget/Documents/Projects.nosync/Python.nosyc/sonar_baseline_with_tensorflow/ dataset/pascal_label_map.pbtxt"
173
+ label_map_path:"dataset/pascal_label_map.pbtxt"
174
174
}
175
175
176
176
eval_config: {
@@ -181,9 +181,9 @@ eval_config: {
181
181
182
182
eval_input_reader: {
183
183
tf_record_input_reader {
184
- input_path:"/Users/widget/Documents/Projects.nosync/Python.nosyc/sonar_baseline_with_tensorflow/ dataset/tfrecords/pascal_val.record"
184
+ input_path:"dataset/tfrecords/pascal_val.record"
185
185
}
186
- label_map_path:"/Users/widget/Documents/Projects.nosync/Python.nosyc/sonar_baseline_with_tensorflow/ dataset/pascal_label_map.pbtxt"
186
+ label_map_path:"dataset/pascal_label_map.pbtxt"
187
187
shuffle: false
188
188
num_readers: 1
189
189
}
You can’t perform that action at this time.
0 commit comments