Add DetectionMAPEvaluator#2467
Merged
pkuyym merged 3 commits intoPaddlePaddle:developfrom Jun 23, 2017
Merged
Conversation
qingqing01
requested changes
Jun 16, 2017
| map<size_t, vector<NormalizedBBox>> bboxes; | ||
| for (int i = labelIndex[n]; i < labelIndex[n + 1]; ++i) { | ||
| vector<NormalizedBBox> bbox; | ||
| getBBoxFromLabelData(cpuLabel_->getData() + i * 6, 1, bbox); |
Contributor
There was a problem hiding this comment.
和layout相关6,7常量后续的PR需要重新设计,避免固定死,这里标记下
| ++n; | ||
| } | ||
| ++imgId; | ||
| if (imgId > batchSize) break; |
|
|
||
| // calcTFPos | ||
| calcTFPos( | ||
| batchSize, allGTBBoxes, allDetectBBoxes, &allTruePos_, &allFalsePos_); |
Contributor
There was a problem hiding this comment.
allTruePos_,allFalsePos_都已经是成员变量了,这里也不用当做参数传吧
|
|
||
| map<size_t, size_t> numPos_; | ||
| map<size_t, vector<pair<real, size_t>>> allTruePos_; | ||
| map<size_t, vector<pair<real, size_t>>> allFalsePos_; |
|
|
||
| std::string getTypeImpl() const { return "detection_map"; } | ||
|
|
||
| real getValueImpl() const { return calcMAP() * 100; } |
Contributor
There was a problem hiding this comment.
100放到calcMAP()里吧,这样130行也不用乘了~
| ap_type="11point", | ||
| name=None): | ||
| """ | ||
| Detection mAP Evaluator. It will print mean Average Precision for detection. |
Contributor
There was a problem hiding this comment.
mean Average Precision -> mean Average Precision(mAP)
| """ | ||
| Detection mAP Evaluator. It will print mean Average Precision for detection. | ||
|
|
||
| The detection mAP Evaluator according to the detection_output's output count |
| Detection mAP Evaluator. It will print mean Average Precision for detection. | ||
|
|
||
| The detection mAP Evaluator according to the detection_output's output count | ||
| the true positive and the false positive bbox and integral them to get the |
| """ | ||
| Detection mAP Evaluator. It will print mean Average Precision for detection. | ||
|
|
||
| The detection mAP Evaluator according to the detection_output's output count |
Contributor
There was a problem hiding this comment.
according to the detection_output's output
based on the output detection_output layer.
| :type overlap_threshold: float | ||
| :param background_id: The background class index. | ||
| :type background_id: int | ||
| :param evaluate_difficult: Wether evaluate a difficult ground truth. |
pkuyym
commented
Jun 19, 2017
|
|
||
| std::string getTypeImpl() const { return "detection_map"; } | ||
|
|
||
| real getValueImpl() const { return calcMAP() * 100; } |
|
|
||
| map<size_t, size_t> numPos_; | ||
| map<size_t, vector<pair<real, size_t>>> allTruePos_; | ||
| map<size_t, vector<pair<real, size_t>>> allFalsePos_; |
|
|
||
| // calcTFPos | ||
| calcTFPos( | ||
| batchSize, allGTBBoxes, allDetectBBoxes, &allTruePos_, &allFalsePos_); |
| ap_type="11point", | ||
| name=None): | ||
| """ | ||
| Detection mAP Evaluator. It will print mean Average Precision for detection. |
| """ | ||
| Detection mAP Evaluator. It will print mean Average Precision for detection. | ||
|
|
||
| The detection mAP Evaluator according to the detection_output's output count |
| """ | ||
| Detection mAP Evaluator. It will print mean Average Precision for detection. | ||
|
|
||
| The detection mAP Evaluator according to the detection_output's output count |
| Detection mAP Evaluator. It will print mean Average Precision for detection. | ||
|
|
||
| The detection mAP Evaluator according to the detection_output's output count | ||
| the true positive and the false positive bbox and integral them to get the |
| :type overlap_threshold: float | ||
| :param background_id: The background class index. | ||
| :type background_id: int | ||
| :param evaluate_difficult: Wether evaluate a difficult ground truth. |
| "maxid_printer_evaluator", "maxframe_printer_evaluator", | ||
| "seqtext_printer_evaluator", "classification_error_printer_evaluator" | ||
| "seqtext_printer_evaluator", "classification_error_printer_evaluator", | ||
| "detection_map_evaluator" |
| ++n; | ||
| } | ||
| ++imgId; | ||
| if (imgId > batchSize) break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #2466