-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Implement detection mAP evaluator wrapper and unify label format between SSD loss and mAP evaluator #8736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
python/paddle/fluid/evaluator.py
Outdated
for epoch in PASS_NUM: | ||
map_evaluator.reset(exe) | ||
for data in batches: | ||
loss, cur_map_v, accum_map_v = exe.run(fetch_list=[cost, cur_map, accum_map]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems exceeded 80 columns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -96,6 +95,10 @@ class DetectionMAPOpMaker : public framework::OpProtoAndCheckerMaker { | |||
"instance, the offsets in first dimension are called LoD, " | |||
"the number of offset is N + 1, if LoD[i + 1] - LoD[i] == 0, " | |||
"means there is no ground-truth data."); | |||
AddInput("HasState", | |||
"(Tensor<int>) A tensor with shape [1], 0 mean ignoring input " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mean --> means
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks!
python/paddle/fluid/evaluator.py
Outdated
The general steps are as follows: | ||
1. calculate the true positive and false positive according to the input | ||
of detection and labels. | ||
2. calculate mAP value, support two methods: '11 point' and 'integral'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
methods --> versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks!
python/paddle/fluid/evaluator.py
Outdated
https://arxiv.org/abs/1512.02325 | ||
|
||
Args: | ||
input (Variable): the detection results, which is a LoDTensor with shape |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the --> The ? same as follows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. From http://www.paddlepaddle.org/docs/develop/api/en/fluid/layers.html , upper case is betther.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix #8735