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] align the default anchor_generator config of Anchor3DHead with the Anchor3DRangeGenerator specification #2856

Open
wants to merge 1 commit into
base: dev-1.x
Choose a base branch
from

Conversation

wyhallenwu
Copy link

Motivation

I'm new to mmdetection3d. When I try to leverage mmdetection3d's anchor head module in my own project, I found there is a mismatch in the default config value of Anchor3DRangeGenerator( in mmdet3d/models/dense_heads/anchor3d_head.py) and the Anchor3DRangeGenerator ( in mmdet3d/models/task_modules/anchor/anchor_3d_generator.py).

Modification

Before modification, the default init value of Anchor3DRangeGenerator is as follows (line 55-62 in mmdet3d/models/dense_heads/anchor3d_head.py ):

             anchor_generator: ConfigType = dict(
                 type='Anchor3DRangeGenerator',
                 range=[0, -39.68, -1.78, 69.12, 39.68, -1.78],
                 strides=[2],
                 sizes=[[3.9, 1.6, 1.56]],
                 rotations=[0, 1.57],
                 custom_values=[],
                 reshape_out=False),

The __init__value of Anchor3DRangeGenerator is as follows: ( line 43 -49 in mmdet3d/models/task_modules/anchor/anchor_3d_generator.py)
ranges: List[List[float]],
sizes: List[List[float]] = [[3.9, 1.6, 1.56]],
scales: List[int] = [1],
rotations: List[float] = [0, 1.5707963],
custom_values: Tuple[float] = (),
reshape_out: bool = True,
size_per_range: bool = True) -> None:

Specifically, I correct the default init anchor_generator value of anchor_generator (the fomer one) to match with the definition of the Anchor3DRangeGenerator.

After modified,

             anchor_generator: ConfigType = dict(
                 type='Anchor3DRangeGenerator',
                 ranges=[[0, -39.68, -1.78, 69.12, 39.68, -1.78]],
                 sizes=[[3.9, 1.6, 1.56]],
                 scales=[1],
                 rotations=[0, 1.57],
                 custom_values=(),
                 reshape_out=True,
                 size_per_range=True),

Thank you for all developers for creating such a wonderful work! This work really helps my research.
I'm willing to join this community and contribute more in the future!

@CLAassistant
Copy link

CLAassistant commented Jan 3, 2024

CLA assistant check
All committers have signed the CLA.

@wyhallenwu wyhallenwu marked this pull request as draft January 3, 2024 08:30
@wyhallenwu wyhallenwu marked this pull request as ready for review January 3, 2024 08:30
@wyhallenwu wyhallenwu closed this Jan 3, 2024
@wyhallenwu wyhallenwu reopened this Jan 3, 2024
@wyhallenwu wyhallenwu marked this pull request as draft January 3, 2024 08:43
@wyhallenwu wyhallenwu changed the title align the default anchor_generator config of Anchor3DHead with the Anchor3DRangeGenerator specification [fix] align the default anchor_generator config of Anchor3DHead with the Anchor3DRangeGenerator specification Jan 3, 2024
@wyhallenwu wyhallenwu marked this pull request as ready for review January 3, 2024 08:44
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.

2 participants