From 530fb7c442e3143dd50b678c40a3e554c5639d60 Mon Sep 17 00:00:00 2001 From: Shuangchi He <34329208+Yulv-git@users.noreply.github.com> Date: Fri, 29 Apr 2022 20:02:57 +0800 Subject: [PATCH] Fix some typos. (#5860) * Fix some typos in *.md. * Fix some typos in code. --- configs/picodet/README.md | 6 +++--- configs/picodet/README_en.md | 10 +++++----- configs/rcnn_enhance/README.md | 2 +- deploy/pptracking/python/mot/tracker/jde_tracker.py | 2 +- deploy/python/keypoint_postprocess.py | 2 +- .../FAQ/FAQ\347\254\254\351\233\266\346\234\237.md" | 2 +- .../faster_rcnn_r50_fpn_1x_coco_annotation.md | 6 +++--- .../ppyolo_r50vd_dcn_1x_coco_annotation.md | 2 +- ppdet/data/transform/mot_operators.py | 2 +- ppdet/data/transform/operators.py | 4 ++-- ppdet/metrics/mot_metrics.py | 2 +- ppdet/modeling/architectures/keypoint_hrhrnet.py | 2 +- ppdet/modeling/losses/sparsercnn_loss.py | 2 +- ppdet/modeling/mot/tracker/jde_tracker.py | 2 +- ppdet/modeling/ops.py | 2 +- static/configs/iou_loss/README_cn.md | 2 +- static/configs/ppyolo/README.md | 2 +- static/configs/rcnn_enhance/README.md | 2 +- static/deploy/android_demo/app/build.gradle | 2 +- static/ppdet/data/transform/operators.py | 4 ++-- 20 files changed, 30 insertions(+), 30 deletions(-) diff --git a/configs/picodet/README.md b/configs/picodet/README.md index f04ff139a..1ee508f7a 100644 --- a/configs/picodet/README.md +++ b/configs/picodet/README.md @@ -232,9 +232,9 @@ paddle2onnx --model_dir output_inference/picodet_s_320_coco_lcnet/ \ | Paddle Lite | - | [C++](../../deploy/lite) | ✔︎ | | Android Demo | - | [Paddle Lite](https://github.com/PaddlePaddle/Paddle-Lite-Demo/tree/develop/object_detection/android/app/cxx/picodet_detection_demo) | ✔︎ | | PaddleInference | [Python](../../deploy/python) | [C++](../../deploy/cpp) | ✔︎ | -| ONNXRuntime | [Python](../../deploy/third_engine/demo_onnxruntime) | Comming soon | ✔︎ | -| NCNN | Comming soon | [C++](../../deploy/third_engine/demo_ncnn) | ✘ | -| MNN | Comming soon | [C++](../../deploy/third_engine/demo_mnn) | ✘ | +| ONNXRuntime | [Python](../../deploy/third_engine/demo_onnxruntime) | Coming soon | ✔︎ | +| NCNN | Coming soon | [C++](../../deploy/third_engine/demo_ncnn) | ✘ | +| MNN | Coming soon | [C++](../../deploy/third_engine/demo_mnn) | ✘ | diff --git a/configs/picodet/README_en.md b/configs/picodet/README_en.md index 6b0a50414..3e1c50608 100644 --- a/configs/picodet/README_en.md +++ b/configs/picodet/README_en.md @@ -223,13 +223,13 @@ paddle2onnx --model_dir output_inference/picodet_s_320_coco_lcnet/ \ | Infer Engine | Python | C++ | Predict With Postprocess | | :-------- | :--------: | :---------------------: | :----------------: | -| OpenVINO | [Python](../../deploy/third_engine/demo_openvino/python) | [C++](../../deploy/third_engine/demo_openvino)(postprocess comming soon) | ✔︎ | +| OpenVINO | [Python](../../deploy/third_engine/demo_openvino/python) | [C++](../../deploy/third_engine/demo_openvino)(postprocess coming soon) | ✔︎ | | Paddle Lite | - | [C++](../../deploy/lite) | ✔︎ | | Android Demo | - | [Paddle Lite](https://github.com/PaddlePaddle/Paddle-Lite-Demo/tree/develop/object_detection/android/app/cxx/picodet_detection_demo) | ✔︎ | | PaddleInference | [Python](../../deploy/python) | [C++](../../deploy/cpp) | ✔︎ | -| ONNXRuntime | [Python](../../deploy/third_engine/demo_onnxruntime) | Comming soon | ✔︎ | -| NCNN | Comming soon | [C++](../../deploy/third_engine/demo_ncnn) | ✘ | -| MNN | Comming soon | [C++](../../deploy/third_engine/demo_mnn) | ✘ | +| ONNXRuntime | [Python](../../deploy/third_engine/demo_onnxruntime) | Coming soon | ✔︎ | +| NCNN | Coming soon | [C++](../../deploy/third_engine/demo_ncnn) | ✘ | +| MNN | Coming soon | [C++](../../deploy/third_engine/demo_mnn) | ✘ | Android demo visualization: @@ -277,7 +277,7 @@ python tools/train.py -c configs/picodet/picodet_s_416_coco_lcnet.yml \ ## Unstructured Pruning
-Toturial: +Tutorial: Please refer this [documentation](https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.4/configs/picodet/legacy_model/pruner/README.md) for details such as requirements, training and deployment. diff --git a/configs/rcnn_enhance/README.md b/configs/rcnn_enhance/README.md index 946774b46..e6afd916b 100644 --- a/configs/rcnn_enhance/README.md +++ b/configs/rcnn_enhance/README.md @@ -2,7 +2,7 @@ ### 简介 -* 近年来,学术界和工业界广泛关注图像中目标检测任务。基于[PaddleClas](https://github.com/PaddlePaddle/PaddleClas)中SSLD蒸馏方案训练得到的ResNet50_vd预训练模型(ImageNet1k验证集上Top1 Acc为82.39%),结合PaddleDetection中的丰富算子,飞桨提供了一种面向服务器端实用的目标检测方案PSS-DET(Practical Server Side Detection)。基于COCO2017目标检测数据集,V100单卡预测速度为为61FPS时,COCO mAP可达41.2%。 +* 近年来,学术界和工业界广泛关注图像中目标检测任务。基于[PaddleClas](https://github.com/PaddlePaddle/PaddleClas)中SSLD蒸馏方案训练得到的ResNet50_vd预训练模型(ImageNet1k验证集上Top1 Acc为82.39%),结合PaddleDetection中的丰富算子,飞桨提供了一种面向服务器端实用的目标检测方案PSS-DET(Practical Server Side Detection)。基于COCO2017目标检测数据集,V100单卡预测速度为61FPS时,COCO mAP可达41.2%。 ### 模型库 diff --git a/deploy/pptracking/python/mot/tracker/jde_tracker.py b/deploy/pptracking/python/mot/tracker/jde_tracker.py index df6783259..f412842a0 100644 --- a/deploy/pptracking/python/mot/tracker/jde_tracker.py +++ b/deploy/pptracking/python/mot/tracker/jde_tracker.py @@ -116,7 +116,7 @@ class JDETracker(object): Return: output_stracks_dict (dict(list)): The list contains information - regarding the online_tracklets for the recieved image tensor. + regarding the online_tracklets for the received image tensor. """ self.frame_id += 1 if self.frame_id == 1: diff --git a/deploy/python/keypoint_postprocess.py b/deploy/python/keypoint_postprocess.py index 2275df78a..69f1d3fd9 100644 --- a/deploy/python/keypoint_postprocess.py +++ b/deploy/python/keypoint_postprocess.py @@ -35,7 +35,7 @@ class HrHRNetPostProcess(object): heat_thresh (float): value of topk below this threshhold will be ignored tag_thresh (float): coord's value sampled in tagmap below this threshold belong to same people for init - inputs(list[heatmap]): the output list of modle, [heatmap, heatmap_maxpool, tagmap], heatmap_maxpool used to get topk + inputs(list[heatmap]): the output list of model, [heatmap, heatmap_maxpool, tagmap], heatmap_maxpool used to get topk original_height, original_width (float): the original image size """ diff --git "a/docs/tutorials/FAQ/FAQ\347\254\254\351\233\266\346\234\237.md" "b/docs/tutorials/FAQ/FAQ\347\254\254\351\233\266\346\234\237.md" index 5d45d1404..4478495bf 100644 --- "a/docs/tutorials/FAQ/FAQ\347\254\254\351\233\266\346\234\237.md" +++ "b/docs/tutorials/FAQ/FAQ\347\254\254\351\233\266\346\234\237.md" @@ -59,7 +59,7 @@ TrainReader: - Gt2YoloTarget: {anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]], anchors: [[10, 13], [16, 30], [33, 23], [30, 61], [62, 45], [59, 119], [116, 90], [156, 198], [373, 326]], downsample_ratios: [32, 16, 8]} # 训练时batch_size batch_size: 24 - # 读取数据是是否乱序 + # 读取数据是否乱序 shuffle: true # 是否丢弃最后不能完整组成batch的数据 drop_last: true diff --git a/docs/tutorials/config_annotation/faster_rcnn_r50_fpn_1x_coco_annotation.md b/docs/tutorials/config_annotation/faster_rcnn_r50_fpn_1x_coco_annotation.md index 460af362b..32b9024bf 100644 --- a/docs/tutorials/config_annotation/faster_rcnn_r50_fpn_1x_coco_annotation.md +++ b/docs/tutorials/config_annotation/faster_rcnn_r50_fpn_1x_coco_annotation.md @@ -90,7 +90,7 @@ TrainReader: - PadBatch: {pad_to_stride: 32} # 训练时batch_size batch_size: 1 - # 读取数据是是否乱序 + # 读取数据是否乱序 shuffle: true # 是否丢弃最后不能完整组成batch的数据 drop_last: true @@ -110,7 +110,7 @@ EvalReader: - PadBatch: {pad_to_stride: 32} # 评估时batch_size batch_size: 1 - # 读取数据是是否乱序 + # 读取数据是否乱序 shuffle: false # 是否丢弃最后不能完整组成batch的数据 drop_last: false @@ -130,7 +130,7 @@ TestReader: - PadBatch: {pad_to_stride: 32} # 测试时batch_size batch_size: 1 - # 读取数据是是否乱序 + # 读取数据是否乱序 shuffle: false # 是否丢弃最后不能完整组成batch的数据 drop_last: false diff --git a/docs/tutorials/config_annotation/ppyolo_r50vd_dcn_1x_coco_annotation.md b/docs/tutorials/config_annotation/ppyolo_r50vd_dcn_1x_coco_annotation.md index 9c7985fd2..2cbc188dc 100644 --- a/docs/tutorials/config_annotation/ppyolo_r50vd_dcn_1x_coco_annotation.md +++ b/docs/tutorials/config_annotation/ppyolo_r50vd_dcn_1x_coco_annotation.md @@ -102,7 +102,7 @@ TrainReader: - Gt2YoloTarget: {anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]], anchors: [[10, 13], [16, 30], [33, 23], [30, 61], [62, 45], [59, 119], [116, 90], [156, 198], [373, 326]], downsample_ratios: [32, 16, 8]} # 训练时batch_size batch_size: 24 - # 读取数据是是否乱序 + # 读取数据是否乱序 shuffle: true # 是否丢弃最后不能完整组成batch的数据 drop_last: true diff --git a/ppdet/data/transform/mot_operators.py b/ppdet/data/transform/mot_operators.py index ef7d7be45..e533ea3dc 100644 --- a/ppdet/data/transform/mot_operators.py +++ b/ppdet/data/transform/mot_operators.py @@ -529,7 +529,7 @@ class Gt2FairMOTTarget(Gt2TTFTarget): Generate FairMOT targets by ground truth data. Difference between Gt2FairMOTTarget and Gt2TTFTarget are: 1. the gaussian kernal radius to generate a heatmap. - 2. the targets needed during traing. + 2. the targets needed during training. Args: num_classes(int): the number of classes. diff --git a/ppdet/data/transform/operators.py b/ppdet/data/transform/operators.py index 8227b1db8..721f6d033 100644 --- a/ppdet/data/transform/operators.py +++ b/ppdet/data/transform/operators.py @@ -1054,7 +1054,7 @@ class CropWithSampling(BaseOperator): [max sample, max trial, min scale, max scale, min aspect ratio, max aspect ratio, min overlap, max overlap] - avoid_no_bbox (bool): whether to to avoid the + avoid_no_bbox (bool): whether to avoid the situation where the box does not appear. """ super(CropWithSampling, self).__init__() @@ -1145,7 +1145,7 @@ class CropWithDataAchorSampling(BaseOperator): das_anchor_scales (list[float]): a list of anchor scales in data anchor smapling. min_size (float): minimum size of sampled bbox. - avoid_no_bbox (bool): whether to to avoid the + avoid_no_bbox (bool): whether to avoid the situation where the box does not appear. """ super(CropWithDataAchorSampling, self).__init__() diff --git a/ppdet/metrics/mot_metrics.py b/ppdet/metrics/mot_metrics.py index 117525df2..22f90d688 100644 --- a/ppdet/metrics/mot_metrics.py +++ b/ppdet/metrics/mot_metrics.py @@ -557,7 +557,7 @@ class KITTIEvaluation(object): "track ids are not unique for sequence %d: frame %d" % (seq, t_data.frame)) logger.info( - "track id %d occured at least twice for this frame" + "track id %d occurred at least twice for this frame" % t_data.track_id) logger.info("Exiting...") #continue # this allows to evaluate non-unique result files diff --git a/ppdet/modeling/architectures/keypoint_hrhrnet.py b/ppdet/modeling/architectures/keypoint_hrhrnet.py index 6f62b4b21..366e9e3ee 100644 --- a/ppdet/modeling/architectures/keypoint_hrhrnet.py +++ b/ppdet/modeling/architectures/keypoint_hrhrnet.py @@ -153,7 +153,7 @@ class HrHRNetPostProcess(object): heat_thresh (float): value of topk below this threshhold will be ignored tag_thresh (float): coord's value sampled in tagmap below this threshold belong to same people for init - inputs(list[heatmap]): the output list of modle, [heatmap, heatmap_maxpool, tagmap], heatmap_maxpool used to get topk + inputs(list[heatmap]): the output list of model, [heatmap, heatmap_maxpool, tagmap], heatmap_maxpool used to get topk original_height, original_width (float): the original image size ''' diff --git a/ppdet/modeling/losses/sparsercnn_loss.py b/ppdet/modeling/losses/sparsercnn_loss.py index 2d36b21a2..8b7db92fa 100644 --- a/ppdet/modeling/losses/sparsercnn_loss.py +++ b/ppdet/modeling/losses/sparsercnn_loss.py @@ -198,7 +198,7 @@ class SparseRCNNLoss(nn.Layer): # Retrieve the matching between the outputs of the last layer and the targets indices = self.matcher(outputs_without_aux, targets) - # Compute the average number of target boxes accross all nodes, for normalization purposes + # Compute the average number of target boxes across all nodes, for normalization purposes num_boxes = sum(len(t["labels"]) for t in targets) num_boxes = paddle.to_tensor( [num_boxes], diff --git a/ppdet/modeling/mot/tracker/jde_tracker.py b/ppdet/modeling/mot/tracker/jde_tracker.py index a00174ff3..9796e6ceb 100644 --- a/ppdet/modeling/mot/tracker/jde_tracker.py +++ b/ppdet/modeling/mot/tracker/jde_tracker.py @@ -122,7 +122,7 @@ class JDETracker(object): Return: output_stracks_dict (dict(list)): The list contains information - regarding the online_tracklets for the recieved image tensor. + regarding the online_tracklets for the received image tensor. """ self.frame_id += 1 if self.frame_id == 1: diff --git a/ppdet/modeling/ops.py b/ppdet/modeling/ops.py index 9db6b88cf..76b4201e9 100644 --- a/ppdet/modeling/ops.py +++ b/ppdet/modeling/ops.py @@ -280,7 +280,7 @@ def roi_align(input, rois_num = paddle.static.data(name='rois_num', shape=[None], dtype='int32') align_out = ops.roi_align(input=x, rois=rois, - ouput_size=(7, 7), + output_size=(7, 7), spatial_scale=0.5, sampling_ratio=-1, rois_num=rois_num) diff --git a/static/configs/iou_loss/README_cn.md b/static/configs/iou_loss/README_cn.md index 3288e587d..5ec3d0a10 100644 --- a/static/configs/iou_loss/README_cn.md +++ b/static/configs/iou_loss/README_cn.md @@ -28,7 +28,7 @@ PaddleDetection也开源了基于faster rcnn的GIOU loss实现。使用GIOU loss GIOU loss解决了IOU loss中预测边框A与真值B的交并比为0时,模型无法给出优化方向的问题,但是仍然有2种情况难以解决, 1. 当边框A和边框B处于包含关系的时候,GIOU loss退化为IOU loss,此时模型收敛较慢。 -2. 当A与B相交,若A和B的的x1与x2均相等或者y1与y2均相等,GIOU loss仍然会退化为IOU loss,收敛很慢。 +2. 当A与B相交,若A和B的x1与x2均相等或者y1与y2均相等,GIOU loss仍然会退化为IOU loss,收敛很慢。 基于此,论文提出了DIOU loss与CIOU loss,解决收敛速度慢以及部分条件下无法收敛的问题。 为加速收敛,论文在改进的loss中引入距离的概念,具体地,边框loss可以定义为如下形式: diff --git a/static/configs/ppyolo/README.md b/static/configs/ppyolo/README.md index a993e119f..811b055a0 100644 --- a/static/configs/ppyolo/README.md +++ b/static/configs/ppyolo/README.md @@ -90,7 +90,7 @@ PP-YOLO and PP-YOLOv2 improved performance and speed of YOLOv3 with following me |:----------------------------:|:----------:|:----------:| :---------: | :-----------------------: | :--------: | :----------:| :------------------: | :-------------------: | :------: | :----------------------: | :-----: | | PP-YOLO_MobileNetV3_small | 4 | 32 | 75% | PP-YOLO_MobileNetV3_large | 4.2MB | 320 | 16.2 | 39.8 | [model](https://paddlemodels.bj.bcebos.com/object_detection/ppyolo_mobilenet_v3_small_prune75_distillby_mobilenet_v3_large.pdparams) | [model](https://paddlemodels.bj.bcebos.com/object_detection/ppyolo_mobilenet_v3_small_prune75_distillby_mobilenet_v3_large.tar) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/develop/static/configs/ppyolo/ppyolo_mobilenet_v3_small.yml) | -- Slim PP-YOLO is trained by slim traing method from [Distill pruned model](../../slim/extensions/distill_pruned_model/README.md),distill training pruned PP-YOLO_MobileNetV3_small model with PP-YOLO_MobileNetV3_large model as the teacher model +- Slim PP-YOLO is trained by slim training method from [Distill pruned model](../../slim/extensions/distill_pruned_model/README.md),distill training pruned PP-YOLO_MobileNetV3_small model with PP-YOLO_MobileNetV3_large model as the teacher model - Pruning detectiom head of PP-YOLO model with ratio as 75%, while the arguments are `--pruned_params="yolo_block.0.2.conv.weights,yolo_block.0.tip.conv.weights,yolo_block.1.2.conv.weights,yolo_block.1.tip.conv.weights" --pruned_ratios="0.75,0.75,0.75,0.75"` - For Slim PP-YOLO training, evaluation, inference and model exporting, please see [Distill pruned model](../../slim/extensions/distill_pruned_model/README.md) diff --git a/static/configs/rcnn_enhance/README.md b/static/configs/rcnn_enhance/README.md index 7fc757fc1..ab07e29c7 100644 --- a/static/configs/rcnn_enhance/README.md +++ b/static/configs/rcnn_enhance/README.md @@ -2,7 +2,7 @@ ### 简介 -* 近年来,学术界和工业界广泛关注图像中目标检测任务。基于[PaddleClas](https://github.com/PaddlePaddle/PaddleClas)中SSLD蒸馏方案训练得到的ResNet50_vd预训练模型(ImageNet1k验证集上Top1 Acc为82.39%),结合PaddleDetection中的丰富算子,飞桨提供了一种面向服务器端实用的目标检测方案PSS-DET(Practical Server Side Detection)。基于COCO2017目标检测数据集,V100单卡预测速度为为61FPS时,COCO mAP可达41.6%;预测速度为20FPS时,COCO mAP可达47.8%。 +* 近年来,学术界和工业界广泛关注图像中目标检测任务。基于[PaddleClas](https://github.com/PaddlePaddle/PaddleClas)中SSLD蒸馏方案训练得到的ResNet50_vd预训练模型(ImageNet1k验证集上Top1 Acc为82.39%),结合PaddleDetection中的丰富算子,飞桨提供了一种面向服务器端实用的目标检测方案PSS-DET(Practical Server Side Detection)。基于COCO2017目标检测数据集,V100单卡预测速度为61FPS时,COCO mAP可达41.6%;预测速度为20FPS时,COCO mAP可达47.8%。 * 以标准的Faster RCNN ResNet50_vd FPN为例,下表给出了PSS-DET不同的模块的速度与精度收益。 diff --git a/static/deploy/android_demo/app/build.gradle b/static/deploy/android_demo/app/build.gradle index 759a09aba..cee901b0a 100644 --- a/static/deploy/android_demo/app/build.gradle +++ b/static/deploy/android_demo/app/build.gradle @@ -65,7 +65,7 @@ def archives = [ 'src' : 'https://paddlelite-demo.bj.bcebos.com/models/yolov3_mobilenet_v3_prune86_FPGM_320_fp32_for_hybrid_cpu_npu_v2_6_1.tar.gz', 'dest' : 'src/main/assets/models/yolov3_mobilenet_v3_for_hybrid_cpu_npu' ], - // pp-yolo tiny comming soon + // pp-yolo tiny coming soon // ssd_mobilenet_v1 voc [ 'src' : 'https://paddlelite-demo.bj.bcebos.com/models/ssdlite_mobilenet_v3_large_for_cpu_nb.tar.gz', diff --git a/static/ppdet/data/transform/operators.py b/static/ppdet/data/transform/operators.py index 62a9efc38..d398bec1d 100644 --- a/static/ppdet/data/transform/operators.py +++ b/static/ppdet/data/transform/operators.py @@ -955,7 +955,7 @@ class CropImage(BaseOperator): [max sample, max trial, min scale, max scale, min aspect ratio, max aspect ratio, min overlap, max overlap] - avoid_no_bbox (bool): whether to to avoid the + avoid_no_bbox (bool): whether to avoid the situation where the box does not appear. """ super(CropImage, self).__init__() @@ -1047,7 +1047,7 @@ class CropImageWithDataAchorSampling(BaseOperator): das_anchor_scales (list[float]): a list of anchor scales in data anchor smapling. min_size (float): minimum size of sampled bbox. - avoid_no_bbox (bool): whether to to avoid the + avoid_no_bbox (bool): whether to avoid the situation where the box does not appear. """ super(CropImageWithDataAchorSampling, self).__init__() -- GitLab