From d0ccdf8fc187acc4b38c6a48bee337c247953ce7 Mon Sep 17 00:00:00 2001 From: buxingyuan Date: Thu, 18 Oct 2018 16:32:24 +0800 Subject: [PATCH] follow comments test=develop --- .../operators/detection/generate_proposal_labels_op.cc | 8 ++++---- python/paddle/fluid/layers/detection.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/paddle/fluid/operators/detection/generate_proposal_labels_op.cc b/paddle/fluid/operators/detection/generate_proposal_labels_op.cc index c5b2f97b1..4a45dfa23 100644 --- a/paddle/fluid/operators/detection/generate_proposal_labels_op.cc +++ b/paddle/fluid/operators/detection/generate_proposal_labels_op.cc @@ -507,16 +507,16 @@ class GenerateProposalLabelsOpMaker : public framework::OpProtoAndCheckerMaker { AddComment(R"DOC( This operator can be, for given the GenerateProposalOp output bounding boxes and groundtruth, -to sample foregroud boxes and background boxes, and compute loss target. +to sample foreground boxes and background boxes, and compute loss target. RpnRois is the output boxes of RPN and was processed by generate_proposal_op, these boxes were combined with groundtruth boxes and sampled according to batch_size_per_im and fg_fraction, -If an instance with a groundtruth overlap greater than fg_thresh, then it was considered as a foregroud sample. +If an instance with a groundtruth overlap greater than fg_thresh, then it was considered as a foreground sample. If an instance with a groundtruth overlap greater than bg_thresh_lo and lower than bg_thresh_hi, then it was considered as a background sample. -After all foregroud and background boxes are chosen (so called Rois), +After all foreground and background boxes are chosen (so called Rois), then we apply random sampling to make sure -the number of foregroud boxes is no more than batch_size_per_im * fg_fraction. +the number of foreground boxes is no more than batch_size_per_im * fg_fraction. For each box in Rois, we assign the classification (class label) and regression targets (box label) to it. Finally BboxInsideWeights and BboxOutsideWeights are used to specify whether it would contribute to training loss. diff --git a/python/paddle/fluid/layers/detection.py b/python/paddle/fluid/layers/detection.py index cc107fc74..73de5d590 100644 --- a/python/paddle/fluid/layers/detection.py +++ b/python/paddle/fluid/layers/detection.py @@ -1414,16 +1414,16 @@ def generate_proposal_labels(rpn_rois, """ ** Generate proposal labels Faster-RCNN ** This operator can be, for given the GenerateProposalOp output bounding boxes and groundtruth, - to sample foregroud boxes and background boxes, and compute loss target. + to sample foreground boxes and background boxes, and compute loss target. RpnRois is the output boxes of RPN and was processed by generate_proposal_op, these boxes were combined with groundtruth boxes and sampled according to batch_size_per_im and fg_fraction, - If an instance with a groundtruth overlap greater than fg_thresh, then it was considered as a foregroud sample. + If an instance with a groundtruth overlap greater than fg_thresh, then it was considered as a foreground sample. If an instance with a groundtruth overlap greater than bg_thresh_lo and lower than bg_thresh_hi, then it was considered as a background sample. - After all foregroud and background boxes are chosen (so called Rois), + After all foreground and background boxes are chosen (so called Rois), then we apply random sampling to make sure - the number of foregroud boxes is no more than batch_size_per_im * fg_fraction. + the number of foreground boxes is no more than batch_size_per_im * fg_fraction. For each box in Rois, we assign the classification (class label) and regression targets (box label) to it. Finally BboxInsideWeights and BboxOutsideWeights are used to specify whether it would contribute to training loss. -- GitLab