Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Shun14 committed Dec 30, 2018
2 parents 9ccbfca + d2bbe18 commit c794716
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
Binary file modified datasets/dataset_utils.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion datasets/xml_to_tfrecords.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _process_image(train_img_path, train_xml_path, name):

for obj in root.findall('object'):
label = obj.find('name').text
if label == '###' or label == 'none':
if label == 'none':
label = 'none'
else:
label = 'text'
Expand Down
2 changes: 1 addition & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ def nms_eff(boxes_list, score, overlap):
out_dir,
nms_th,
score_th,
scales=[(768, 768)],
scales=[(384, 384)],
save_res_path=save_res_path
)
instance.start_inference()
10 changes: 6 additions & 4 deletions tools/gen_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def process_convert(txt_name, DIRECTORY_ANNOTATIONS, new_version=True):
nodeSize.appendChild(nodeDepth)
root.appendChild(nodeSize)
for l in lines:
l = l.encode('utf-8').decode('utf-8-sig')
l = l.strip().split(',')
difficult = 0
label = 1
Expand All @@ -60,7 +61,7 @@ def process_convert(txt_name, DIRECTORY_ANNOTATIONS, new_version=True):

if new_version is True:
label_name = str(l[-1])
if label_name == 'none' or label_name == '###':
if label_name == 'none':
difficult = 1
else:
difficult = 0
Expand All @@ -79,6 +80,7 @@ def process_convert(txt_name, DIRECTORY_ANNOTATIONS, new_version=True):
y3_text = ymax_text
y4_text = ymax_text
else:
print(l)
xs = [ int(l[i]) for i in (0, 2, 4, 6)]
ys = [ int(l[i]) for i in (1, 3, 5, 7)]
xmin_text = str(min(xs))
Expand All @@ -88,12 +90,12 @@ def process_convert(txt_name, DIRECTORY_ANNOTATIONS, new_version=True):
x1_text = str(xs[0])
x2_text = str(xs[1])
x3_text = str(xs[2])
x4_text = str(x3[3])
x4_text = str(xs[3])

y1_text = str(ys[0])
y2_text = str(ys[1])
y3_text = str(ys[2])
y4_text = str(y3[3])
y4_text = str(ys[3])


nodeObject = annotation_xml.createElement('object')
Expand Down Expand Up @@ -178,4 +180,4 @@ def get_all_txt(directory, new_version=False):
parser.add_argument('--in_dir','-i', default='/home/zsz/datasets/icdar15_anno/eval_img_2018.9.25/icdar15_eval_final', type=str)
args = parser.parse_args()
directory = args.in_dir
get_all_txt(directory, True)
get_all_txt(directory, False)
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
tf.app.flags.DEFINE_integer('train_image_size', None, 'Train image size')
tf.app.flags.DEFINE_string('training_image_crop_area', '0.1, 1.0',
'the area of image process for training')
tf.app.flags.DEFINE_integer('max_number_of_steps', 60000,
tf.app.flags.DEFINE_integer('max_number_of_steps', 120000,
'The maxim number of training steps.')
# =========================================================================== #
# Fine-Tuning Flags.
Expand Down

0 comments on commit c794716

Please sign in to comment.