예제 #1
0
    def __init__(self, in_channels, border_channels):
        """
        :param in_channels:
        """
        super(BorderBranch, self).__init__()
        self.cur_point_conv = nn.Sequential(
            nn.Conv2d(
                in_channels,
                border_channels,
                kernel_size=1),
            nn.InstanceNorm2d(border_channels),
            nn.ReLU())

        self.ltrb_conv = nn.Sequential(
            nn.Conv2d(
                in_channels,
                border_channels * 4,
                kernel_size=1),
            nn.InstanceNorm2d(border_channels * 4),
            nn.ReLU())

        self.border_align = BorderAlign(pool_size=10)

        self.border_conv = nn.Sequential(
            nn.Conv2d(
                5 * border_channels,
                in_channels,
                kernel_size=1),
            nn.ReLU())
예제 #2
0
    def __init__(self, in_channels, border_channels):
        """
        :param in_channels:
        """
        super(BorderBranch, self).__init__()
        self.border_channels = border_channels

        self.bam_conv0 = nn.Sequential(
            nn.Conv2d(in_channels, border_channels * 5, kernel_size=1),
            nn.InstanceNorm2d(border_channels * 5), nn.ReLU())

        self.border_align = BorderAlign(pool_size=10)

        self.bam_conv1 = nn.Sequential(
            nn.Conv2d(5 * border_channels, in_channels, kernel_size=1),
            nn.ReLU())