From 2bec473e89b88e958172f87bb1e963041d7f1148 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Mon, 3 Aug 2020 17:44:41 +0800 Subject: [PATCH] fix typo and opt doc --- doc/doc_ch/detection.md | 2 +- doc/doc_ch/installation.md | 4 ++-- doc/doc_en/detection_en.md | 2 +- doc/doc_en/installation_en.md | 6 +++--- tools/infer/utility.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/doc_ch/detection.md b/doc/doc_ch/detection.md index cfff12f9..850f67ca 100644 --- a/doc/doc_ch/detection.md +++ b/doc/doc_ch/detection.md @@ -26,7 +26,7 @@ wget -P ./train_data/ https://paddleocr.bj.bcebos.com/dataset/test_icdar2015_la 提供的标注文件格式为,其中中间是"\t"分隔: ``` " 图像文件名 json.dumps编码的图像标注信息" -ch4_test_images/img_61.jpg [{"transcription": "MASA", "points": [[310, 104], [416, 141], [418, 216], [312, 179]], ...}] +ch4_test_images/img_61.jpg [{"transcription": "MASA", "points": [[310, 104], [416, 141], [418, 216], [312, 179]]}, {...}] ``` json.dumps编码前的图像标注信息是包含多个字典的list,字典中的 `points` 表示文本框的四个点的坐标(x, y),从左上角的点开始顺时针排列。 `transcription` 表示当前文本框的文字,在文本检测任务中并不需要这个信息。 diff --git a/doc/doc_ch/installation.md b/doc/doc_ch/installation.md index 8d7b659e..360e0cb6 100644 --- a/doc/doc_ch/installation.md +++ b/doc/doc_ch/installation.md @@ -21,10 +21,10 @@ cd /home/Projects 如果您希望在CPU环境下使用docker,使用docker而不是nvidia-docker创建docker sudo docker run --name ppocr -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-gpu-cuda9.0-cudnn7-dev /bin/bash -如果您的机器安装的是CUDA9,请运行以下命令创建容器 +如果使用CUDA9,请运行以下命令创建容器 sudo nvidia-docker run --name ppocr -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-gpu-cuda9.0-cudnn7-dev /bin/bash -如果您的机器安装的是CUDA10,请运行以下命令创建容器 +如果使用CUDA10,请运行以下命令创建容器 sudo nvidia-docker run --name ppocr -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-gpu-cuda10.0-cudnn7-dev /bin/bash 您也可以访问[DockerHub](https://hub.docker.com/r/paddlepaddle/paddle/tags/)获取与您机器适配的镜像。 diff --git a/doc/doc_en/detection_en.md b/doc/doc_en/detection_en.md index 280c4bf8..f22c574b 100644 --- a/doc/doc_en/detection_en.md +++ b/doc/doc_en/detection_en.md @@ -25,7 +25,7 @@ After decompressing the data set and downloading the annotation file, PaddleOCR/ The provided annotation file format is as follow, seperated by "\t": ``` " Image file name Image annotation information encoded by json.dumps" -ch4_test_images/img_61.jpg [{"transcription": "MASA", "points": [[310, 104], [416, 141], [418, 216], [312, 179]], ...}] +ch4_test_images/img_61.jpg [{"transcription": "MASA", "points": [[310, 104], [416, 141], [418, 216], [312, 179]]}, {...}] ``` The image annotation after json.dumps() encoding is a list containing multiple dictionaries. The `points` in the dictionary represent the coordinates (x, y) of the four points of the text box, arranged clockwise from the point at the upper left corner. diff --git a/doc/doc_en/installation_en.md b/doc/doc_en/installation_en.md index 94aacd6d..c8902ac0 100644 --- a/doc/doc_en/installation_en.md +++ b/doc/doc_en/installation_en.md @@ -18,14 +18,14 @@ cd /home/Projects # You need to create a docker container for the first run, and do not need to run the current command when you run it again # Create a docker container named ppocr and map the current directory to the /paddle directory of the container -#If you want to use docker in a CPU environment, use docker instead of nvidia-docker to create docker +#If using CPU, use docker instead of nvidia-docker to create docker sudo docker run --name ppocr -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-gpu-cuda9.0-cudnn7-dev /bin/bash ``` -If you have cuda9 installed on your machine, please run the following command to create a container: +If using CUDA9, please run the following command to create a container: ``` sudo nvidia-docker run --name ppocr -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-gpu-cuda9.0-cudnn7-dev /bin/bash ``` -If you have cuda10 installed on your machine, please run the following command to create a container: +If using CUDA10, please run the following command to create a container: ``` sudo nvidia-docker run --name ppocr -v $PWD:/paddle --network=host -it hub.baidubce.com/paddlepaddle/paddle:latest-gpu-cuda10.0-cudnn7-dev /bin/bash ``` diff --git a/tools/infer/utility.py b/tools/infer/utility.py index bab211a8..fc91880e 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -95,7 +95,7 @@ def create_predictor(args, mode): config.set_cpu_math_library_num_threads(6) if args.enable_mkldnn: config.enable_mkldnn() - + #config.enable_memory_optim() config.disable_glog_info() @@ -169,7 +169,7 @@ def draw_ocr_box_txt(image, boxes, txts): img_right = Image.new('RGB', (w, h), (255, 255, 255)) import random - # 每次使用相同的随机种子 ,可以保证两次颜色一致 + random.seed(0) draw_left = ImageDraw.Draw(img_left) draw_right = ImageDraw.Draw(img_right) -- GitLab