diff --git a/mmdet/models/backbones/darknet.py b/mmdet/models/backbones/darknet.py index 2aa9c37c444..92c02024b1f 100644 --- a/mmdet/models/backbones/darknet.py +++ b/mmdet/models/backbones/darknet.py @@ -47,7 +47,7 @@ def make_conv_and_res_block(in_channels, out_channels, res_repeat): return model -@BACKBONES.register_module +@BACKBONES.register_module() class DarkNet53(nn.Module): def __init__(self, diff --git a/mmdet/models/dense_heads/yolo_head.py b/mmdet/models/dense_heads/yolo_head.py index 42ab39888c4..06f14e71ee0 100644 --- a/mmdet/models/dense_heads/yolo_head.py +++ b/mmdet/models/dense_heads/yolo_head.py @@ -22,7 +22,7 @@ _EPSILON = 1e-6 -@HEADS.register_module +@HEADS.register_module() class YoloHead(BaseDenseHead): # TODO: Move into cfg diff --git a/mmdet/models/detectors/yolo.py b/mmdet/models/detectors/yolo.py index bd769784bae..c7f71cccc37 100644 --- a/mmdet/models/detectors/yolo.py +++ b/mmdet/models/detectors/yolo.py @@ -4,7 +4,7 @@ from ..builder import DETECTORS -@DETECTORS.register_module +@DETECTORS.register_module() class YoloNet(SingleStageDetector): def __init__(self, diff --git a/mmdet/models/necks/yolo_neck.py b/mmdet/models/necks/yolo_neck.py index c9c93290441..21c7257da64 100644 --- a/mmdet/models/necks/yolo_neck.py +++ b/mmdet/models/necks/yolo_neck.py @@ -45,7 +45,7 @@ def forward(self, x): return out -@NECKS.register_module +@NECKS.register_module() class YoloNeck(nn.Module): """The tail side of the YoloNet.