Skip to content

Commit

Permalink
remove RetinaSSH
Browse files Browse the repository at this point in the history
  • Loading branch information
MambaWong committed Oct 21, 2022
1 parent 24a920b commit db52012
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 46 deletions.
5 changes: 2 additions & 3 deletions mmdet/models/necks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
from .pafpn import PAFPN
from .rfp import RFP
from .ssd_neck import SSDNeck
from .ssh import SSH, RetinaSSH
from .ssh import SSH
from .yolo_neck import YOLOV3Neck
from .yolox_pafpn import YOLOXPAFPN

__all__ = [
'FPN', 'BFP', 'ChannelMapper', 'HRFPN', 'NASFPN', 'FPN_CARAFE', 'PAFPN',
'NASFCOS_FPN', 'RFP', 'YOLOV3Neck', 'FPG', 'DilatedEncoder',
'CTResNetNeck', 'SSDNeck', 'YOLOXPAFPN', 'DyHead', 'CSPNeXtPAFPN', 'SSH',
'RetinaSSH'
'CTResNetNeck', 'SSDNeck', 'YOLOXPAFPN', 'DyHead', 'CSPNeXtPAFPN', 'SSH'
]
43 changes: 0 additions & 43 deletions mmdet/models/necks/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,46 +193,3 @@ def forward(self, inputs: Tuple[torch.Tensor]) -> tuple:
outs.append(out)

return tuple(outs)


@MODELS.register_module()
class RetinaSSH(BaseModule):
"""`SSH Neck` used in `RetinaFace: Single-stage Dense Face Localisation in
the Wild <https://arxiv.org/pdf/1905.00641.pdf>`_.
Args:
in_channels (int): Number of input channels used at each scale.
out_channels (int): Number of output channels used at each scale.
conv_cfg (:obj:`ConfigDict` or dict, optional): Config dict for
convolution layer. Defaults to None.
norm_cfg (:obj:`ConfigDict` or dict): Config dict for normalization
layer. Defaults to dict(type='BN').
init_cfg (:obj:`ConfigDict` or list[:obj:`ConfigDict`] or dict or
list[dict], optional): Initialization config dict.
"""

def __init__(self,
in_channels: int,
out_channels: int,
conv_cfg: OptConfigType = None,
norm_cfg: ConfigType = dict(type='BN'),
init_cfg: OptMultiConfig = dict(
type='Xavier', layer='Conv2d', distribution='uniform')):
super().__init__(init_cfg=init_cfg)

self.in_channels = in_channels
self.out_channels = out_channels

self.ssh_module = SSHDetModule(
in_channels=in_channels,
out_channels=out_channels,
conv_cfg=conv_cfg,
norm_cfg=norm_cfg)

def forward(self, inputs: Tuple[torch.Tensor]) -> tuple:
outs = []
for x in inputs:
out = self.ssh_module(x)
outs.append(out)

return tuple(outs)

0 comments on commit db52012

Please sign in to comment.