-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix experimental detectron do ref impl #10621
Fix experimental detectron do ref impl #10621
Conversation
3fb614f
to
a0d9d16
Compare
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.
Overall I think the changes are ok but I'd like to know if there's any particular ticket related to this PR.
Also it seems that some more tests have failed because the behavior of this op has been changed.
AFAIK there are some translation models that contain this op - those should be validated on this branch before the PR is merged.
docs/template_plugin/tests/functional/op_reference/experimental_detectron_detection_output.cpp
Outdated
Show resolved
Hide resolved
@tomdol at the very least CPU implementation and src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_detection_output.cpp test data should be adapted accordingly. Please let me know if you would like me to go forward with those changes. |
I think me (and other folks) need some context where this PR comes from and how it's motivated. Do you have a ticket number where I could read some more about it? |
The PR comes from my study of reference implementation of the operation (as GPU implementation of EDDO is assigned to me). While comparing the code with the spec, and trying to make sense of test data (input and output), I noticed a few surprising things, and subsequently notified Intel team via email (Pavel Durandin was the contact point at that time), and later in the meeting it was decided that I will produce this PR. I'm not aware of any ticket related to this PR. |
a0d9d16
to
26cdee3
Compare
26cdee3
to
2c90fdc
Compare
a22437d
to
73ea06d
Compare
39879c6
to
9d450f4
Compare
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.
Looks good from my perspective but I've asked some more folks to review.
9d450f4
to
bec1dfb
Compare
…on test for readability
…lasses Due to bug in indexing classes, 0-th class was not considered.
…lip to image The resulting boxes must be clipped to the image according the op spec. Test case modified to cover the change in the implementation.
… implementation To check the output scores really belong to the corresponding classes.
…OIs count It is not the same as max_detections_from_image as was incorrectly assumed in the code. Test case modified to cover the change in the implementation.
... to match reference implementation
So that the previous fixes in the operation implementations are actually tested.
... accordingly to the changes in the reference implementation.
…mat checcker happy
bec1dfb
to
e2bdb5b
Compare
@@ -310,7 +327,7 @@ void ExperimentalDetectronDetectionOutput::execute(dnnl::stream strm) { | |||
std::vector<int> detections_per_class(classes_num_, 0); | |||
int total_detections_num = 0; | |||
|
|||
for (int class_idx = 1; class_idx < classes_num_; ++class_idx) { | |||
for (int class_idx = 0; class_idx < classes_num_; ++class_idx) { |
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.
Hi @tomdol @t-jankowski @opoluektov-lohika This change introduced a regression in e2e test (ticket: 87044), I guess because this change adds background classes to the outputs, is there any solid reason for this change ?
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.
Hi @usstq, this change is to harmonize the ref implementation with the op specification
Unfortunately in the spec I hanen't found any tip
- that the 0th class is always a background class
- that the background class should always be removed
I guess this should be handled together with class_agnostic_box_regression
attribute.
(But since this attr has been unhandled in the reference implementation, and since I hadn't understood the meaning of this attr at the time of the fix, after some discussion we decided to leave it as it is, unhandled.)
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.
@usstq please drop me a line to my email (in the github profile), I'll provide you with some more context
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 documentation of Detectron2 also confirms that in Detectron(not Detectron2) class 0 is assumed to be background and should be filtered :
https://detectron2.readthedocs.io/en/latest/notes/compatibility.html?highlight=background#compatibility-with-detectron-and-maskrcnn-benchmark
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.
PR #12663 is submitted to fix this behavior
Spec is a word explanation of the reference implementation. As this PR introduced a regression -- I revert the change. Let's review it further including the question if we need to introduce new version of this operation due to changed output calculation logic. @opoluektov-lohika what inspired you to perform these changes? |
This reverts commit d872338.
@jane-intel I just sent you an email conversation that explains the rationale. |
This reverts commit d872338.
…" (openvinotoolkit#12683) * Revert "Fix experimental detectron do ref impl (openvinotoolkit#10621)" This reverts commit d872338. * Disabled Experimental Detectron per agreement with GPU team. Ticket to fix it: 90209
Fix ExperimentalDetectronDetectionOutput ngraph implementation according to documentation