diff --git a/paddle/fluid/operators/detection/generate_proposal_labels_op.cc b/paddle/fluid/operators/detection/generate_proposal_labels_op.cc index c5b2f97b139ed701d86451d13b46af7bccb8b5cf..4a45dfa231bbae9559cefe041902ebcaf34cf8aa 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 cc107fc749c20ac37f199321c297b7e429666a1a..73de5d5904c35ba15b92e08b6daca81a4e699e97 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.