Explorar o código

Update docs for CHANGLOG & text_detection_module (#2231)

* update docs for CHANGLOG & text_detection_module

* update text_detection_en.md
cuicheng01 hai 1 ano
pai
achega
954ae3204f

+ 1 - 1
docs/CHANGLOG.md

@@ -58,7 +58,7 @@ PaddleX 3.0beta 集成了飞桨生态的优势能力,覆盖 7 大场景任务
 * 语义分割任务新增实时分割模型[BiSeNetV2](https://github.com/PaddlePaddle/PaddleX/blob/release/2.0-rc/tutorials/train/semantic_segmentation/bisenetv2.py)
 * C++部署模块全面升级
     * PaddleInference部署适配2.0预测库[(使用文档)](https://github.com/PaddlePaddle/PaddleX/tree/release/2.0-rc/deploy/cpp)
-    * 支持飞桨[PaddleDetection]( https://github.com/PaddlePaddle/PaddleX/blob/release/2.0-rc/deploy/cpp/docs/models/paddledetection.md)、[PaddleSeg]( https://github.com/PaddlePaddle/PaddleX/blob/release/2.0-rc/deploy/cpp/docs/models/paddleseg.md)、[PaddleClas](https://github.com/PaddlePaddle/PaddleX/blob/release/2.0-rc/deploy/cpp/docs/models/paddleclas.md)以及PaddleX的模型部署
+    * 支持飞桨[PaddleDetection]( https://github.com/PaddlePaddle/PaddleX/blob/release/2.0-rc/deploy/cpp/docs/models/paddledetection.md)、[PaddleSeg](https://github.com/PaddlePaddle/PaddleX/blob/release/2.0-rc/deploy/cpp/docs/models/paddleseg.md)、[PaddleClas](https://github.com/PaddlePaddle/PaddleX/blob/release/2.0-rc/deploy/cpp/docs/models/paddleclas.md)以及PaddleX的模型部署
     * 新增基于PaddleInference的GPU多卡预测[(使用文档)](https://github.com/PaddlePaddle/PaddleX/blob/release/2.0-rc/deploy/cpp/docs/demo/multi_gpu_model_infer.md)
     * GPU部署新增基于ONNX的的TensorRT高性能加速引擎部署方式
     * GPU部署新增基于ONNX的Triton服务化部署方式[(使用文档)](https://github.com/PaddlePaddle/PaddleX/blob/release/2.0-rc/deploy/cpp/docs/compile/triton/docker.md)

+ 9 - 9
docs/CHANGLOG_en.md

@@ -82,27 +82,27 @@ Added lightweight Python-based service deployment. Experience it now!
 A new RESTful API module is added, enabling developers to quickly develop training platforms based on PaddleX.
  > - Added an HTML Demo based on RESTful API.
  > - Added a Remote version of the visualization client based on RESTful API.
-Added deployment solutions for models through OpenVINO [Detailed Link](https://paddlex.readthedocs.io/en/develop/deploy/openvino/index.html)
+Added deployment solutions for models through OpenVINO.
 
 ### PaddleX v1.2.0 (9.9/2020)
 - Model Updates
-  > - Added the object detection model PPYOLO [Detailed Link](https://paddlex.readthedocs.io/en/develop/apis/models/detection.html#paddlex-det-ppyolo)
+  > - Added the object detection model PPYOLO.
   > - FasterRCNN, MaskRCNN, YOLOv3, DeepLabv3p, and other models now have pre-trained models on the COCO dataset.
-  > - Object Detection models FasterRCNN and MaskRCNN add the backbone HRNet_W18 [Detailed Link](https://paddlex.readthedocs.io/en/develop/apis/models/detection.html#paddlex-det-fasterrcnn)
-  > - Semantic Segmentation model DeepLabv3p adds the backbone MobileNetV3_large_ssld [Detailed Link](https://paddlex.readthedocs.io/en/develop/apis/models/semantic_segmentation.html#paddlex-seg-deeplabv3p)
+  > - Object Detection models FasterRCNN and MaskRCNN add the backbone HRNet_W18.
+  > - Semantic Segmentation model DeepLabv3p adds the backbone MobileNetV3_large_ssld.
 
 - Model Deployment Updates
-  > - Added deployment solutions for models through OpenVINO [Detailed Link](https://paddlex.readthedocs.io/en/develop/deploy/openvino/index.html)
-  > - Added deployment solutions for models on Raspberry Pi [Detailed Link](https://paddlex.readthedocs.io/en/develop/deploy/raspberry/index.html)
+  > - Added deployment solutions for models through OpenVINO.
+  > - Added deployment solutions for models on Raspberry Pi.
   > - Optimized data preprocessing and postprocessing code performance for PaddleLite Android deployment.
   > - Optimized Paddle Server-side C++ deployment code, added parameters such as use_mkl, significantly improving model prediction performance on CPUs through mkldnn.
 
 - Industry Case Updates
-  > - Added an RGB image remote sensing segmentation case [Detailed Link](https://paddlex.readthedocs.io/en/develop/examples/remote_sensing.html)
-  > - Added a multi-channel remote sensing segmentation case [Detailed Link](https://paddlex.readthedocs.io/en/develop/examples/multi-channel_remote_sensing/README.html)
+  > - Added an RGB image remote sensing segmentation case.
+  > - Added a multi-channel remote sensing segmentation case.
 
 - Others
-  > - Added a dataset splitting function, supporting command-line splitting of ImageNet, PascalVOC, MSCOCO, and semantic segmentation datasets [Detailed Link](https://paddlex.readthedocs.io/en/develop/data/format/classification.html#id2)
+  > - Added a dataset splitting function, supporting command-line splitting of ImageNet, PascalVOC, MSCOCO, and semantic segmentation datasets.
 
   ### PaddleX v1.1.0 (7.13/2020)
 - Model Updates

+ 6 - 6
docs/module_usage/tutorials/ocr_modules/text_detection.md

@@ -31,14 +31,14 @@ for res in output:
     res.save_to_img("./output/")
     res.save_to_json("./output/res.json")
 ```
-关于更多 PaddleX 的单模型推理的 API 的使用方法,可以参考 [PaddleX单模型Python脚本使用说明](../../../module_usage/instructions/model_python_API.MD)。
+关于更多 PaddleX 的单模型推理的 API 的使用方法,可以参考 [PaddleX单模型Python脚本使用说明](../../../module_usage/instructions/model_python_API.md)。
 
 ## 四、二次开发
 如果你追求更高精度的现有模型,可以使用 PaddleX 的二次开发能力开发更好的文本检测模型。在使用 PaddleX 开发文本检测模型之前,请务必安装 PaddleX 的 PaddleOCR 插件,安装过程可以参考 [PaddleX本地安装教程](../../../installation/installation.md)。
 
 ### 4.1 数据准备
 在进行模型训练前,需要准备相应任务模块的数据集。PaddleX 针对每一个模块提供了数据校验功能,**只有通过数据校验的数据才可以进行模型训练**。
-此外,PaddleX 为每一个模块都提供了 Demo 数据集,您可以基于官方提供的 Demo 数据完成后续的开发。若您希望用私有数据集进行后续的模型训练,可以参考 [PaddleX文本检测/文本识别任务模块数据标注教程](../../../data_annotations/ocr_modules/text_detection_regognition.md)。
+此外,PaddleX 为每一个模块都提供了 Demo 数据集,您可以基于官方提供的 Demo 数据完成后续的开发。若您希望用私有数据集进行后续的模型训练,可以参考 [PaddleX文本检测/文本识别任务模块数据标注教程](../../../data_annotations/ocr_modules/text_detection_recognition.md)。
 
 #### 4.1.1 Demo 数据下载
 
@@ -97,7 +97,7 @@ python main.py -c paddlex/configs/text_detection/PP-OCRv4_mobile_det.yaml \
 
 另外,数据集校验还对数据集中所有图片的长宽分布情况进行了分析分析,并绘制了分布直方图(histogram.png): 
 
-![](/tmp/images/modules/text_det/01.png)
+![](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/main/images/modules/text_det/01.png)
 </details>
 
 #### 4.1.3 数据集格式转换/数据集划分(可选)
@@ -168,7 +168,7 @@ python main.py -c paddlex/configs/text_detection/PP-OCRv4_mobile_det.yaml \
 * 指定模型的`.yaml` 配置文件路径(此处为`PP-OCRv4_mobile_det.yaml`)
 * 指定模式为模型训练:`-o Global.mode=train`
 * 指定训练数据集路径:`-o Global.dataset_dir`
-其他相关参数均可通过修改`.yaml`配置文件中的`Global`和`Train`下的字段来进行设置,也可以通过在命令行中追加参数来进行调整。如指定前 2 卡 gpu 训练:`-o Global.device=gpu:0,1`;设置训练轮次数为 10:`-o Train.epochs_iters=10`。更多可修改的参数及其详细解释,可以查阅查阅模型对应任务模块的配置文件说明 [PaddleX通用模型配置文件参数说明](../../../module_usage/instructions/config_parameters_common.md)。
+其他相关参数均可通过修改`.yaml`配置文件中的`Global`和`Train`下的字段来进行设置,也可以通过在命令行中追加参数来进行调整。如指定前 2 卡 gpu 训练:`-o Global.device=gpu:0,1`;设置训练轮次数为 10:`-o Train.epochs_iters=10`。更多可修改的参数及其详细解释,可以查阅模型对应任务模块的配置文件说明 [PaddleX通用模型配置文件参数说明](../../../module_usage/instructions/config_parameters_common.md)。
 
 <details>
   <summary>👉 <b>更多说明(点击展开)</b></summary>
@@ -205,7 +205,7 @@ python main.py -c paddlex/configs/text_detection/PP-OCRv4_mobile_det.yaml \
 
 在模型评估时,需要指定模型权重文件路径,每个配置文件中都内置了默认的权重保存路径,如需要改变,只需要通过追加命令行参数的形式进行设置即可,如`-o Evaluate.weight_path=./output/best_accuracy/best_accuracy.pdparams`。
 
-在完成模型评估后,会产出`evaluate_result.json,其记录了`评估的结果,具体来说,记录了评估任务是否正常完成,以及模型的评估指标,包含 `precision`、`recall`、`hmean`。
+在完成模型评估后,会产出`evaluate_result.json`,其记录了评估的结果,具体来说,记录了评估任务是否正常完成,以及模型的评估指标,包含 `precision`、`recall`、`hmean`。
 
 </details>
 
@@ -235,7 +235,7 @@ python main.py -c paddlex/configs/text_detection/PP-OCRv4_mobile_det.yaml \
 
 1.**产线集成**
 
-文本检测模块可以集成的 PaddleX 产线有[通用 OCR 产线](../../../pipeline_usage/tutorials/ocr_pipelies/OCR.md)、[表格识别产线](../../../pipeline_usage/tutorials/ocr_pipelies/table_recognition.md)、[文档场景信息抽取产线v3(PP-ChatOCRv3)](../../../pipeline_usage/tutorials/information_extration_pipelines/document_scene_information_extraction.md),只需要替换模型路径即可完成相关产线的文本检测模块的模型更新。
+文本检测模块可以集成的 PaddleX 产线有[通用 OCR 产线](../../../pipeline_usage/tutorials/ocr_pipelines/OCR.md)、[表格识别产线](../../../pipeline_usage/tutorials/ocr_pipelines/table_recognition.md)、[文档场景信息抽取产线v3(PP-ChatOCRv3)](../../../pipeline_usage/tutorials/information_extration_pipelines/document_scene_information_extraction.md),只需要替换模型路径即可完成相关产线的文本检测模块的模型更新。
 
 2.**模块集成**
 

+ 41 - 6
docs/module_usage/tutorials/ocr_modules/text_detection_en.md

@@ -3,7 +3,7 @@
 # Text Detection Module Development Tutorial
 
 ## I. Overview
-The text detection module is a crucial component in OCR (Optical Character Recognition) systems, responsible for locating and marking regions containing text within images. The performance of this module directly impacts the accuracy and efficiency of the entire OCR system. The text detection module typically outputs bounding boxes (Bounding Boxes) for text regions, which are then passed on to the text recognition module for further processing.
+The text detection module is a crucial component in OCR (Optical Character Recognition) systems, responsible for locating and marking regions containing text within images. The performance of this module directly impacts the accuracy and efficiency of the entire OCR system. The text detection module typically outputs bounding boxes for text regions, which are then passed on to the text recognition module for further processing.
 
 ## II. Supported Models
 | Model | Detection Hmean (%) | GPU Inference Time (ms) | CPU Inference Time (ms) | Model Size (M) | Description |
@@ -52,13 +52,48 @@ python main.py -c paddlex/configs/text_detection/PP-OCRv4_mobile_det.yaml \
     -o Global.mode=check_dataset \
     -o Global.dataset_dir=./dataset/ocr_det_dataset_examples
 ```
-After executing the above command, PaddleX will validate the dataset, summarize its basic information, and print `Check dataset passed !` in the log upon successful completion. 
+
+After executing the above command, PaddleX will validate the dataset and gather basic information about it. Once the command runs successfully, `Check dataset passed !` will be printed in the log. The validation result file is saved in `./output/check_dataset_result.json`, and related outputs will be stored in the `./output/check_dataset` directory in the current directory. The output directory includes sample images and histograms of sample distribution.
 
 <details>
-<summary>👉 <b>Validation Results Details (Click to Expand)</b></summary>
+  <summary>👉 <b>Validation Result Details (Click to Expand)</b></summary>
+The specific content of the validation result file is:
+
+```bash
+{
+  "done_flag": true,
+  "check_pass": true,
+  "attributes": {
+    "train_samples": 200,
+    "train_sample_paths": [
+      "../dataset/ocr_det_dataset_examples/images/train_img_61.jpg",
+      "../dataset/ocr_det_dataset_examples/images/train_img_289.jpg"
+    ],
+    "val_samples": 50,
+    "val_sample_paths": [
+      "../dataset/ocr_det_dataset_examples/images/val_img_61.jpg",
+      "../dataset/ocr_det_dataset_examples/images/val_img_137.jpg"
+    ]
+  },
+  "analysis": {
+    "histogram": "check_dataset/histogram.png"
+  },
+  "dataset_path": "./dataset/ocr_det_dataset_examples",
+  "show_type": "image",
+  "dataset_type": "TextDetDataset"
+}
+```
+
+In the above validation result, `check_pass` being `true` indicates that the dataset format meets the requirements. The explanation of other metrics is as follows:
+
+* `attributes.train_samples`: The number of training samples in the dataset is 200;
+* `attributes.val_samples`: The number of validation samples in the dataset is 50;
+* `attributes.train_sample_paths`: List of relative paths for visualizing training sample images in the dataset;
+* `attributes.val_sample_paths`: List of relative paths for visualizing validation sample images in the dataset;
 
-The validation results file is saved in `./output/check_dataset_result.json`, and related outputs are saved in the current directory's `./output/check_dataset` directory, including visualized sample images and sample distribution histograms.
+Additionally, the dataset validation also analyzed the distribution of the length and width of all images in the dataset and plotted a distribution histogram (histogram.png):
 
+![](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/main/images/modules/text_det/01.png)
 </details>
 
 ### 4.1.3 Dataset Format Conversion/Dataset Splitting (Optional)
@@ -154,7 +189,7 @@ Similar to model training and evaluation, the following steps are required:
 * Specify the `.yaml` configuration file path of the model (here it's `PP-OCRv4_mobile_det.yaml`)
 * Set the mode to model inference prediction: `-o Global.mode=predict`
 * Specify the model weights path: `-o Predict.model_dir="./output/best_accuracy/inference"`
-* Specify the input data path: `-o Predict.inputh="..."`
+* Specify the input data path: `-o Predict.input="..."`
 Other related parameters can be set by modifying the fields under `Global` and `Predict` in the `.yaml` configuration file. For details, refer to [PaddleX Common Model Configuration File Parameter Description](../../../module_usage/instructions/config_parameters_common_en.md).
 
 * Alternatively, you can use the PaddleX wheel package for inference, easily integrating the model into your own projects.
@@ -164,7 +199,7 @@ Models can be directly integrated into PaddleX pipelines or into your own projec
 
 1.**Pipeline Integration**
 
-The text detection module can be integrated into PaddleX pipelines such as the [General OCR Pipeline](../../../pipeline_usage/tutorials/ocr_pipelines/OCR_en.md), [Table Recognition Pipeline](../../../pipeline_usage/tutorials/ocr_pipelines/table_recognition_en.md), and [Document Scene Information Extraction Pipeline v3 (PP-ChatOCRv3)](../../../pipeline_usage/tutorials/information_extration_pipelines/document_scene_information_extraction_en.md). Simply replace the model path to update the text detection module of the relevant pipeline.
+The text detection module can be integrated into PaddleX pipelines such as the [General OCR Pipeline](../../../pipeline_usage/tutorials/ocr_pipelines/OCR_en.md), [Table Recognition Pipeline](../../../pipeline_usage/tutorials/ocr_pipelines/table_recognition_en.md), and [PP-ChatOCRv3-doc](../../../pipeline_usage/tutorials/information_extration_pipelines/document_scene_information_extraction_en.md). Simply replace the model path to update the text detection module of the relevant pipeline.
 
 2.**Module Integration**