Skip to content

support yolov4x-mish new_coords = 1 in both CPU and CUDA mode#19221

Closed
erikguo wants to merge 2 commits intoopencv:masterfrom
erikguo:issue/18975/yolov4x-mish
Closed

support yolov4x-mish new_coords = 1 in both CPU and CUDA mode#19221
erikguo wants to merge 2 commits intoopencv:masterfrom
erikguo:issue/18975/yolov4x-mish

Conversation

@erikguo
Copy link
Copy Markdown

@erikguo erikguo commented Dec 26, 2020

To fix for #18975

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake
force_builders_only=linux,docs,Custom
buildworker:Custom=linux-4
build_image:Custom=ubuntu-cuda:18.04

const auto y = (box_index % batch_inner_size) / row_inner_size;
const auto x = (box_index % row_inner_size) / col_inner_size;

const auto tmp_x = ((input[box_offset + 0]) - static_cast<T>(0.5)) * scale_x_y + static_cast<T>(0.5);
Copy link
Copy Markdown
Contributor

@YashasSamaga YashasSamaga Dec 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the CPU code would have to go to 3.4. I am not sure what the maintainers will suggest you to do but here is a comment for the CUDA part.

Duplicating the whole kernel code for changing just two lines is overkill. Can you please add a function parameter instead?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified code to use a parameter in the function.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YashasSamaga is right. Could you, please split the patch on 2 parts:

  • CPU version for 3.4. We merge 3.4 to master weekly or biweekly and the solution appears in master too.
  • CUDA version for master only. When the first patch is ready.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose to not close the PR, but create new one for 3.4 first.

@asmorkalov asmorkalov added the backport is needed Label for maintainers. Authors of PR can ignore this label Jan 26, 2021
@asmorkalov
Copy link
Copy Markdown
Contributor

@erikguo Friendly reminder.

@arnaud-nt2i
Copy link
Copy Markdown

@erikguo up

@erikguo
Copy link
Copy Markdown
Author

erikguo commented Apr 8, 2021

already create another pull request for version 3.4 @asmorkalov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport is needed Label for maintainers. Authors of PR can ignore this category: dnn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants