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

[Feature] Group-Free-3D head #539

Merged
merged 34 commits into from
Jul 1, 2021
Merged

Conversation

hjin2902
Copy link
Contributor

Group-Free-3D head
* Transformer decoder/GroupFree3DMultiheadAttention
* GroupFree3DBBoxCoder
* loss
* get boxes
* test case/config

Arguments:
seed_features: (batch_size, feature_dim, num_seed) Pytorch tensor
Returns:
logits: (batch_size, 1, num_seed)
Copy link
Member

Choose a reason for hiding this comment

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

descriptions


def forward(self, xyz, features, sample_inds):
"""
Args:
Copy link
Member

Choose a reason for hiding this comment

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

modify the docstrings and also others

Copy link
Member

@Tai-Wang Tai-Wang left a comment

Choose a reason for hiding this comment

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

Some functions seem to be borrowed from somewhere else? Please refine their docstrings

return new_xyz, new_features, sample_inds


class PositionEmbeddingLearned(nn.Module):
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we put positional embedding into the registry like those in mmdet/mmcv?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm afraid the specific positional embedding module is not so general that other algorithm would use it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Put it into the registry as it is general enough and may be used in other transformer-based 3d detector.

Tensor: (B, C, M) the sampled features.
Tensor: (B, M) the given index.
"""
xyz_flipped = xyz.transpose(1, 2).contiguous()
Copy link
Collaborator

@ZwwWayne ZwwWayne May 20, 2021

Choose a reason for hiding this comment

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

use permute(0, 2, 1) to replace transpose().contiguous()

mmdet3d/core/bbox/coders/groupfree3d_bbox_coder.py Outdated Show resolved Hide resolved
mmdet3d/models/dense_heads/groupfree3d_head.py Outdated Show resolved Hide resolved
mmdet3d/models/dense_heads/groupfree3d_head.py Outdated Show resolved Hide resolved
mmdet3d/models/dense_heads/groupfree3d_head.py Outdated Show resolved Hide resolved
mmdet3d/models/dense_heads/groupfree3d_head.py Outdated Show resolved Hide resolved
# (num_candidate, ) with values in 0,1,...,gt_num-1
assignment = query_points_instance_label
# set background points to the last gt bbox as original code
assignment[assignment < 0] = gt_num - 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a little bit weird and might cause a bug

mmdet3d/models/dense_heads/groupfree3d_head.py Outdated Show resolved Hide resolved
mmdet3d/models/dense_heads/groupfree3d_head.py Outdated Show resolved Hide resolved
mmdet3d/models/detectors/groupfree3dnet.py Show resolved Hide resolved
mmdet3d/models/detectors/groupfree3dnet.py Show resolved Hide resolved
@CLAassistant
Copy link

CLAassistant commented Jun 9, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ hjin2902
❌ jinhui


jinhui seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link

codecov bot commented Jun 15, 2021

Codecov Report

Merging #539 (d475176) into master (d61476a) will decrease coverage by 0.83%.
The diff coverage is 28.62%.

❗ Current head d475176 differs from pull request most recent head f8c46d0. Consider uploading reports for the commit f8c46d0 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #539      +/-   ##
==========================================
- Coverage   51.02%   50.19%   -0.84%     
==========================================
  Files         204      208       +4     
  Lines       15395    15909     +514     
  Branches     2492     2555      +63     
==========================================
+ Hits         7856     7986     +130     
- Misses       7021     7402     +381     
- Partials      518      521       +3     
Flag Coverage Δ
unittests 50.19% <28.62%> (-0.84%) ⬇️

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

Impacted Files Coverage Δ
mmdet3d/apis/inference.py 54.95% <0.00%> (+1.32%) ⬆️
mmdet3d/core/bbox/box_np_ops.py 26.81% <ø> (ø)
mmdet3d/core/bbox/structures/coord_3d_mode.py 61.87% <ø> (-1.26%) ⬇️
mmdet3d/datasets/pipelines/formating.py 56.00% <ø> (ø)
mmdet3d/models/detectors/imvotenet.py 28.65% <0.00%> (ø)
mmdet3d/core/bbox/coders/groupfree3d_bbox_coder.py 16.66% <16.66%> (ø)
mmdet3d/models/dense_heads/groupfree3d_head.py 24.74% <24.74%> (ø)
mmdet3d/models/detectors/groupfree3dnet.py 33.33% <33.33%> (ø)
mmdet3d/models/model_utils/transformer.py 56.00% <56.00%> (ø)
mmdet3d/core/bbox/coders/__init__.py 100.00% <100.00%> (ø)
... and 12 more

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 d61476a...f8c46d0. Read the comment docs.

@ZwwWayne
Copy link
Collaborator

Need to resolve conflicts @hjin2902

@ZwwWayne ZwwWayne merged commit 318499a into open-mmlab:master Jul 1, 2021
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.

5 participants