diff --git a/README.md b/README.md
index b8996346a0b03c9a4b727bae3c9c37019abfb9c7..5f85aaaa1409acc755b4bbb45df7c2ee7bd29429 100644
--- a/README.md
+++ b/README.md
@@ -190,7 +190,7 @@ PaddleOCR support a variety of cutting-edge algorithms related to OCR, and devel
- SER (Semantic entity recognition)
-
+
diff --git a/README_ch.md b/README_ch.md
index f7338c072653efb8bcc62a47e4fb0954e1c87ca4..8e1cfeacd5795bb100c0e1d33e605178144f6cbe 100755
--- a/README_ch.md
+++ b/README_ch.md
@@ -222,7 +222,7 @@ PaddleOCR旨在打造一套丰富、领先、且实用的OCR工具库,助力
-
+
- RE(关系提取)
diff --git a/ppocr/utils/visual.py b/ppocr/utils/visual.py
index 5bd805ea6e76be37612a142102beab492bece941..b6de446593984788bea5c03026f4a5b8c0187909 100644
--- a/ppocr/utils/visual.py
+++ b/ppocr/utils/visual.py
@@ -51,20 +51,22 @@ def draw_ser_results(image,
bbox = trans_poly_to_bbox(ocr_info["points"])
draw_box_txt(bbox, text, draw, font, font_size, color)
- img_new = Image.blend(image, img_new, 0.5)
+ img_new = Image.blend(image, img_new, 0.7)
return np.array(img_new)
def draw_box_txt(bbox, text, draw, font, font_size, color):
+
# draw ocr results outline
bbox = ((bbox[0], bbox[1]), (bbox[2], bbox[3]))
draw.rectangle(bbox, fill=color)
# draw ocr results
- start_y = max(0, bbox[0][1] - font_size)
tw = font.getsize(text)[0]
+ th = font.getsize(text)[1]
+ start_y = max(0, bbox[0][1] - th)
draw.rectangle(
- [(bbox[0][0] + 1, start_y), (bbox[0][0] + tw + 1, start_y + font_size)],
+ [(bbox[0][0] + 1, start_y), (bbox[0][0] + tw + 1, start_y + th)],
fill=(0, 0, 255))
draw.text((bbox[0][0] + 1, start_y), text, fill=(255, 255, 255), font=font)
diff --git a/ppstructure/README.md b/ppstructure/README.md
index 9d503ca8e45f21407afc5a1df04d0ecb690f94f9..e44ba588601b1049ccb087bf5985f2c13d6f451d 100644
--- a/ppstructure/README.md
+++ b/ppstructure/README.md
@@ -62,7 +62,7 @@ The following figure shows the effect of layout recovery based on the results of
Different colored boxes in the figure represent different categories.
-
+
diff --git a/ppstructure/README_ch.md b/ppstructure/README_ch.md
index 050740b3b319ff1e685926b5b85282e5730edb77..53c251d15417291a0d024ef90d0013fe30ef42d3 100644
--- a/ppstructure/README_ch.md
+++ b/ppstructure/README_ch.md
@@ -78,7 +78,7 @@ PP-StructureV2支持各个模块独立使用或灵活搭配,如,可以单独
-
+