Пример #1
0
 def __init__(self, cfg):
     super().__init__()
     self.cfg = cfg
     self.backbone = build_backbone(cfg)
     self.box_head = build_box_head(cfg)
     print(
         "Detector initialized. Total Number of params: ",
         f"{torch_utils.format_params(self)}")
     print(
         f"Backbone number of parameters: {torch_utils.format_params(self.backbone)}")
     print(
         f"SSD Head number of parameters: {torch_utils.format_params(self.box_head)}")
Пример #2
0
 def __init__(self, cfg):
     super().__init__()
     self.cfg = cfg
     self.backbone = build_backbone(cfg)
     self.box_head = build_box_head(cfg)
Пример #3
0
 def __init__(self, cfg):
     super().__init__()
     self.cfg = cfg
     self.grid = GridMask(True, True, 1, 0, 0.5, 1, 0.7)
     self.backbone = build_backbone(cfg)
     self.box_head = build_box_head(cfg)