From 08055099a80c0c31d48d83e9cdd3e3f03c8667ce Mon Sep 17 00:00:00 2001 From: "shaohua.zhang" Date: Mon, 3 Aug 2020 21:01:53 +0800 Subject: [PATCH 1/2] add a file separator add a file separator, it mainly to avoid missing the file path separator in yml --- ppocr/data/det/east_process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppocr/data/det/east_process.py b/ppocr/data/det/east_process.py index f9a07440..8da0ab3d 100755 --- a/ppocr/data/det/east_process.py +++ b/ppocr/data/det/east_process.py @@ -52,7 +52,7 @@ class EASTProcessTrain(object): label_infor = label_infor.decode() label_infor = label_infor.encode('utf-8').decode('utf-8-sig') substr = label_infor.strip("\n").split("\t") - img_path = self.img_set_dir + substr[0] + img_path = self.img_set_dir + "/" + substr[0] label = json.loads(substr[1]) nBox = len(label) wordBBs, txts, txt_tags = [], [], [] From c12e9ec564f8dee45df331f5bf582373c54c1d39 Mon Sep 17 00:00:00 2001 From: "shaohua.zhang" Date: Mon, 3 Aug 2020 21:47:25 +0800 Subject: [PATCH 2/2] Update east_process.py --- ppocr/data/det/east_process.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ppocr/data/det/east_process.py b/ppocr/data/det/east_process.py index 8da0ab3d..e2581caa 100755 --- a/ppocr/data/det/east_process.py +++ b/ppocr/data/det/east_process.py @@ -17,6 +17,7 @@ import cv2 import numpy as np import json import sys +import os class EASTProcessTrain(object): def __init__(self, params): @@ -52,7 +53,7 @@ class EASTProcessTrain(object): label_infor = label_infor.decode() label_infor = label_infor.encode('utf-8').decode('utf-8-sig') substr = label_infor.strip("\n").split("\t") - img_path = self.img_set_dir + "/" + substr[0] + img_path = os.path.join(self.img_set_dir, substr[0]) label = json.loads(substr[1]) nBox = len(label) wordBBs, txts, txt_tags = [], [], []