Skip to content

Question about center-ness branch in FCOS #6034

@WZMIAOMIAO

Description

@WZMIAOMIAO

Hi, thank you for your great work. I'm learning FCOS these days. I find some differences about position of center-ness between code and paper. In paper(https://arxiv.org/abs/1904.01355), the center-ness branch is put together with the classification branch.
image

But in the code, the center-ness and regression branches are put together.

class FCOSRegressionHead(nn.Module):
"""
A regression head for use in FCOS.
Args:
in_channels (int): number of channels of the input feature
num_anchors (int): number of anchors to be predicted
num_convs (Optional[int]): number of conv layer. Default: 4.
norm_layer: Module specifying the normalization layer to use.
"""
def __init__(
self,
in_channels: int,
num_anchors: int,
num_convs: int = 4,
norm_layer: Optional[Callable[..., nn.Module]] = None,
):
super().__init__()
if norm_layer is None:
norm_layer = partial(nn.GroupNorm, 32)
conv = []
for _ in range(num_convs):
conv.append(nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=1, padding=1))
conv.append(norm_layer(in_channels))
conv.append(nn.ReLU())
self.conv = nn.Sequential(*conv)
self.bbox_reg = nn.Conv2d(in_channels, num_anchors * 4, kernel_size=3, stride=1, padding=1)
self.bbox_ctrness = nn.Conv2d(in_channels, num_anchors * 1, kernel_size=3, stride=1, padding=1)

Could you tell me why? thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions