From 2eb36c58b22aa41f75d004b52d6a50453e011a7d Mon Sep 17 00:00:00 2001 From: chenjian Date: Thu, 29 Dec 2022 10:10:25 +0800 Subject: [PATCH] fix doc error (#1854) Co-authored-by: jm12138 <2286040843@qq.com> --- .../yolov3_darknet53_venus/README.md | 33 ------------------- .../README.md | 4 +-- .../text/language_model/slda_novel/README.md | 2 +- 3 files changed, 3 insertions(+), 36 deletions(-) diff --git a/modules/image/object_detection/yolov3_darknet53_venus/README.md b/modules/image/object_detection/yolov3_darknet53_venus/README.md index f2898cbe..41230f30 100644 --- a/modules/image/object_detection/yolov3_darknet53_venus/README.md +++ b/modules/image/object_detection/yolov3_darknet53_venus/README.md @@ -59,39 +59,6 @@ - outputs (dict): 模型的输出。如果 get\_prediction 为 False,输出 'head\_features'、'body\_features',否则输出 'bbox\_out' - context\_prog (Program): 用于迁移学习的 Program - - ```python - def object_detection(paths=None, - images=None, - batch_size=1, - use_gpu=False, - score_thresh=0.5, - visualization=True, - output_dir='detection_result') - ``` - - - 预测API,检测输入图片中的所有目标的位置。 - - - **参数** - - - paths (list\[str\]): 图片的路径;
- - images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],BGR格式;
- - batch\_size (int): batch 的大小;
- - use\_gpu (bool): 是否使用 GPU;
- - score\_thresh (float): 识别置信度的阈值;
- - visualization (bool): 是否将识别结果保存为图片文件;
- - output\_dir (str): 图片的保存路径,默认设为 detection\_result。 - - - **返回** - - - res (list\[dict\]): 识别结果的列表,列表中每一个元素为 dict,各字段为: - - data (list): 检测结果,list的每一个元素为 dict,各字段为: - - confidence (float): 识别的置信度 - - label (str): 标签 - - left (int): 边界框的左上角x坐标 - - top (int): 边界框的左上角y坐标 - - right (int): 边界框的右下角x坐标 - - bottom (int): 边界框的右下角y坐标 - - save\_path (str, optional): 识别结果的保存路径 (仅当visualization=True时存在) - ```python def save_inference_model(dirname, diff --git a/modules/image/text_recognition/chinese_text_detection_db_server/README.md b/modules/image/text_recognition/chinese_text_detection_db_server/README.md index b8c5882b..d0af17f9 100644 --- a/modules/image/text_recognition/chinese_text_detection_db_server/README.md +++ b/modules/image/text_recognition/chinese_text_detection_db_server/README.md @@ -73,7 +73,7 @@ import paddlehub as hub import cv2 - text_detector = hub.Module(name="chinese_text_detection_db_server"), enable_mkldnn=True) # mkldnn加速仅在CPU下有效 + text_detector = hub.Module(name="chinese_text_detection_db_server", enable_mkldnn=True) # mkldnn加速仅在CPU下有效 result = text_detector.detect_text(images=[cv2.imread('/PATH/TO/IMAGE')]) # or @@ -174,7 +174,7 @@ * 1.0.3 移除 fluid api - + - ```shell $ hub install chinese_text_detection_db_server==1.0.3 ``` diff --git a/modules/text/language_model/slda_novel/README.md b/modules/text/language_model/slda_novel/README.md index a08ae571..94db5737 100644 --- a/modules/text/language_model/slda_novel/README.md +++ b/modules/text/language_model/slda_novel/README.md @@ -44,7 +44,7 @@ ``` python import paddlehub as hub -slda_novel = hub.Module("slda_novel") +slda_novel = hub.Module(name="slda_novel") topic_dist = slda_novel.infer_doc_topic_distribution("妈妈告诉女儿,今天爸爸过生日,放学后要早点回家一起庆祝") # [{'topic id': 222, 'distribution': 0.5}, {'topic id': 362, 'distribution': 0.5}] -- GitLab