Skip to content
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] Convert rt_mat to torch.Tensor in Coord transform for compatibility #709

Merged
merged 2 commits into from
Jul 6, 2021

Conversation

gopi-erabati
Copy link
Contributor

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Convert rt_mat in 'coord_3d_mode.py' from np.ndarray to torch.Tensor. Closes #707

Modification

The rt_mat in 'coord_3d_mode.py' takes np.ndarray and torch.tensor types, but the conversion from np.ndarray to torch.Tensor is missing as further code assumes that rt_mat is a torch.Tensor type. So, conversion of rt_mat from np.ndarray to torch.tensor type is added!

BC-breaking (Optional)

Does the modification introduce changes that break the back-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@CLAassistant
Copy link

CLAassistant commented Jul 6, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@Wuziyi616 Wuziyi616 left a comment

Choose a reason for hiding this comment

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

Only need to fix that small comment and wait for CI to pass.

mmdet3d/core/bbox/structures/coord_3d_mode.py Outdated Show resolved Hide resolved
@Wuziyi616 Wuziyi616 requested a review from ZwwWayne July 6, 2021 12:36
@Wuziyi616 Wuziyi616 changed the title converted rt_mat in coord_3d_mode from ndarray to tensor to make it further compatible [Fix] Convert rt_mat to torch.Tensor in Coord transform for compatibility Jul 6, 2021
@codecov
Copy link

codecov bot commented Jul 6, 2021

Codecov Report

Merging #709 (7c68a15) into master (a1e0453) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #709      +/-   ##
==========================================
- Coverage   48.93%   48.92%   -0.01%     
==========================================
  Files         208      208              
  Lines       15861    15863       +2     
  Branches     2543     2544       +1     
==========================================
  Hits         7761     7761              
- Misses       7606     7607       +1     
- Partials      494      495       +1     
Flag Coverage Δ
unittests 48.92% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmdet3d/core/bbox/structures/coord_3d_mode.py 60.99% <0.00%> (-0.88%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1e0453...7c68a15. Read the comment docs.

@ZwwWayne ZwwWayne merged commit fc5d477 into open-mmlab:master Jul 6, 2021
@gopi-erabati gopi-erabati deleted the convert_rtmat_coord3dmode branch July 6, 2021 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible bug with 'rt_mat (np.ndarray)' in coord_3d_mode
4 participants