Ejemplo n.º 1
0
    def __init__(self, cfg, scales=[0.5, 1, 1.5, 2]):
        # super(MultiScaleNetV2, self).__init__()
        nn.Module.__init__(self)

        self.backbone = build_backbone(cfg)
        self.scales = scales
        self.desc_extractor = DescExtractor(cfg, scales, self.backbone)
        self.desc_evaluator = MultiDescEvaluator(cfg)
Ejemplo n.º 2
0
    def __init__(self, cfg):
        super(DescExtractor, self).__init__()

        self.backbone = build_backbone(cfg)
        self.regress = nn.Sequential(
            nn.Conv2d(128, 256, kernel_size=1, stride=1, padding=0),
            nn.ReLU(True),
            nn.Conv2d(256, 128, kernel_size=3, stride=1, padding=1),
            nn.ReLU(True),
            nn.Conv2d(128, 128, kernel_size=1, stride=1, padding=0))
Ejemplo n.º 3
0
 def __init__(self, cfg, scales):
     """
     DescExtractor
     :param scales: a list of scales, like [0.5, 1, 2]
     """
     super(DescExtractor, self).__init__()
     
     self.scales = scales
     self.backbone = build_backbone(cfg)
     self.regress = nn.Sequential(
         nn.Conv2d(128, 256, kernel_size=1, stride=1, padding=0),
         nn.ReLU(True),
         nn.Conv2d(256, 128, kernel_size=3, stride=1, padding=1),
         nn.ReLU(True),
         nn.Conv2d(128, 128, kernel_size=1, stride=1, padding=0)
     )
Ejemplo n.º 4
0
    def __init__(self, cfg):
        super(FeatureExtractor, self).__init__()

        self.backbone = build_backbone(cfg)
        self.conv_out = nn.Conv2d(512, 128, 3, 1, 1)
Ejemplo n.º 5
0
    def __init__(self, cfg):
        super(DescriptorExtractor, self).__init__()

        self.backbone = build_backbone(cfg)