From fc0a376918bb9d126fde79370cbc884eaf0c21f5 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Fri, 25 Mar 2022 14:23:29 +0800 Subject: [PATCH] fix comment --- tools/end2end/convert_ppocr_label.py | 13 +++++++++++ tools/end2end/draw_html.py | 32 ++++++++++++++++++---------- tools/end2end/eval_end2end.py | 31 ++++++++++++++++++--------- 3 files changed, 55 insertions(+), 21 deletions(-) diff --git a/tools/end2end/convert_ppocr_label.py b/tools/end2end/convert_ppocr_label.py index a230a14a..8084cac7 100644 --- a/tools/end2end/convert_ppocr_label.py +++ b/tools/end2end/convert_ppocr_label.py @@ -1,3 +1,16 @@ +# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import numpy as np import json import os diff --git a/tools/end2end/draw_html.py b/tools/end2end/draw_html.py index 5f9a4719..7b094c01 100644 --- a/tools/end2end/draw_html.py +++ b/tools/end2end/draw_html.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import os @@ -12,7 +26,6 @@ def draw_debug_img(html_path): ) image_list = [] path = "./det_results/310_gt/" - #path = "infer_results/" for i, filename in enumerate(sorted(os.listdir(path))): if filename.endswith("txt"): continue print(filename) @@ -23,16 +36,14 @@ def draw_debug_img(html_path): base_3 = "../PaddleOCR/det_results/ch_ppocr_mobile_infer/{}".format( filename) - if True: - html.write("\n") - html.write(f' {filename}\n GT') - html.write('GT\n' % (base)) - html.write('PPOCRV2\n' % - (base_2)) - html.write('ppocr_mobile\n' % - (base_3)) + html.write("\n") + html.write(f' {filename}\n GT') + html.write('GT\n' % (base)) + html.write('PPOCRV2\n' % (base_2)) + html.write('ppocr_mobile\n' % + (base_3)) - html.write("\n") + html.write("\n") html.write('