From 782b6caba753f136236b25afd45081cbef5ff3c7 Mon Sep 17 00:00:00 2001 From: da-head0 <61692777+da-head0@users.noreply.github.com> Date: Sun, 25 Apr 2021 20:14:02 +0900 Subject: [PATCH 1/5] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index a8f2b07..de0ef47 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,15 @@ Example results of TextFuseNet on different datasets. ![image](https://github.com/ying09/TextFuseNet/blob/master/example_results.png) +# To get prediction character +open 'TextFuseNet/detectron2/utils/visualizer.py' file. +about line 201, add this code +`print("labels: ", labels)` + +Then, once you run `!python demo/icdar2013_detection.py`, the prediction outcome will come as well. +[more info](https://github.com/ying09/TextFuseNet/issues/57) + + Evaluation of TextFuseNet on different datasets with ResNet-101 backbone: |Datasets|Model|Recall|Precision|F-measure| |:------:|:------:|:------:|:------:|:------:| From 8a46c753dcca7f4da390088a7c643bf5614c1305 Mon Sep 17 00:00:00 2001 From: da-head0 <61692777+da-head0@users.noreply.github.com> Date: Sun, 25 Apr 2021 20:15:13 +0900 Subject: [PATCH 2/5] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de0ef47..093ae5f 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Example results of TextFuseNet on different datasets. ![image](https://github.com/ying09/TextFuseNet/blob/master/example_results.png) -# To get prediction character -open 'TextFuseNet/detectron2/utils/visualizer.py' file. +# To get prediction as text +open `TextFuseNet/detectron2/utils/visualizer.py` file. about line 201, add this code `print("labels: ", labels)` @@ -48,6 +48,7 @@ Then, once you run `!python demo/icdar2013_detection.py`, the prediction outcome [more info](https://github.com/ying09/TextFuseNet/issues/57) + Evaluation of TextFuseNet on different datasets with ResNet-101 backbone: |Datasets|Model|Recall|Precision|F-measure| |:------:|:------:|:------:|:------:|:------:| From 1fbb010e627425800218f76db8c42b1c97b51368 Mon Sep 17 00:00:00 2001 From: da-head0 <61692777+da-head0@users.noreply.github.com> Date: Sun, 25 Apr 2021 20:15:52 +0900 Subject: [PATCH 3/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 093ae5f..12e030b 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ Then, once you run `!python demo/icdar2013_detection.py`, the prediction outcome +# Evaluation Evaluation of TextFuseNet on different datasets with ResNet-101 backbone: |Datasets|Model|Recall|Precision|F-measure| |:------:|:------:|:------:|:------:|:------:| From 73c8db9a87b76a270088ec237f24435e2be7cfaf Mon Sep 17 00:00:00 2001 From: da-head0 <61692777+da-head0@users.noreply.github.com> Date: Sun, 25 Apr 2021 20:18:48 +0900 Subject: [PATCH 4/5] to get a prediction text --- detectron2/utils/visualizer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/detectron2/utils/visualizer.py b/detectron2/utils/visualizer.py index 12f2652..2a1d416 100644 --- a/detectron2/utils/visualizer.py +++ b/detectron2/utils/visualizer.py @@ -199,6 +199,7 @@ def _create_text_labels(classes, scores, class_names): labels = None if classes is not None and class_names is not None and len(class_names) > 1: labels = [class_names[i] for i in classes] + print("prediction: ", labels) if scores is not None: if labels is None: labels = ["{:.0f}%".format(s * 100) for s in scores] From 498fc7174f0ceb400d0976a119119d061b8f1e5e Mon Sep 17 00:00:00 2001 From: da-head0 <61692777+da-head0@users.noreply.github.com> Date: Sun, 25 Apr 2021 20:20:13 +0900 Subject: [PATCH 5/5] Update README.md --- README.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 12e030b..42f6ac7 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,10 @@ There is also a Dockerfile for testing purposes available. See [docker](docker). A demo program can be found in demo. Before running the demo, download our pretrained models from [Baidu Netdisk](https://pan.baidu.com/s/1wSjZPRh3SL1rpNMtZSHodQ) (Extraction code:8op1) or [Google Driver](https://drive.google.com/drive/folders/18Ll-3bAmi4CR2eGTuM-j6fkMrSAaBV4Z?usp=sharing). Set the path of files (include model, testing images, configs, output etc.) in demo/***_detection.py. Then launch demo by: python demo/icdar2013_detection.py + +the prediction outcome will come as well. +[more info](https://github.com/ying09/TextFuseNet/issues/57) + # Evaluation Our detection code will save text contours to a txt file for each image. For calculating F-measure, Recall, and Precision, please refer to the following links: @@ -39,15 +43,6 @@ Example results of TextFuseNet on different datasets. ![image](https://github.com/ying09/TextFuseNet/blob/master/example_results.png) -# To get prediction as text -open `TextFuseNet/detectron2/utils/visualizer.py` file. -about line 201, add this code -`print("labels: ", labels)` - -Then, once you run `!python demo/icdar2013_detection.py`, the prediction outcome will come as well. -[more info](https://github.com/ying09/TextFuseNet/issues/57) - - # Evaluation Evaluation of TextFuseNet on different datasets with ResNet-101 backbone: