Esempio n. 1
0
    def __init__(self):
        super(Idnet, self).__init__()

        self.resnet = resnet50_features(pretrained=True)

        self.conv_layer1 = nn.Conv2d(2048,
                                     1024,
                                     kernel_size=3,
                                     stride=2,
                                     padding=1)
        self.conv_layer2 = nn.Conv2d(1024,
                                     1024,
                                     kernel_size=3,
                                     stride=2,
                                     padding=1)
        self.conv_layer3 = nn.Conv2d(1024,
                                     512,
                                     kernel_size=3,
                                     stride=2,
                                     padding=1)
        self.conv_layer4 = nn.Conv2d(512,
                                     512,
                                     kernel_size=3,
                                     stride=1,
                                     padding=1)
        self.fc = nn.Linear(512, 3000)
Esempio n. 2
0
 def __init__(self, num_classes=1):
     super(RetinaNet, self).__init__()
     _resnet = resnet50_features(pretrained=True)
     self.fpn = FeaturePyramid(_resnet)#FPN50()
     self.num_classes = num_classes
     self.loc_head = self._make_head(self.num_anchors*4)
     self.cls_head = self._make_head(self.num_anchors*self.num_classes)
Esempio n. 3
0
    def __init__(self, classes):
        super(RetinaNet, self).__init__()
        self.classes = classes

        _resnet = resnet50_features(pretrained=True)
        self.feature_pyramid = FeaturePyramid(_resnet)

        self.subnet_boxes = SubNet(mode='boxes')
        self.subnet_classes = SubNet(mode='classes')
Esempio n. 4
0
    def __init__(self):
        super(Idnet, self).__init__()

        self.resnet = resnet50_features(pretrained=True)

        self.conv_layer1 = conv3x3(2048, 1024, stride=2, padding=1)
        self.conv_layer2 = conv3x3(1024, 1024, stride=2, padding=1)
        self.conv_layer3 = conv3x3(1024, 512, stride=2, padding=1)
        self.conv_layer4 = conv3x3(512, 512, stride=1, padding=1)
        self.fc = nn.Linear(512, 3000)