diff --git a/tools/end2end/convert_ppocr_label.py b/tools/end2end/convert_ppocr_label.py index a230a14a9392a555db058dce57cf32fb2fdf4ece..8084cac785125f23885399931f98531326b6fb20 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 5f9a4719ba09d9b49d1b920ed397237d485eb925..7b094c01a04fdc8a8a73ce55aff479eca5ee2f0f 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("