(self,
                 num_input_features=4,
                 use_norm=True,
                 num_filters=(64,),
                 with_distance=False,
                 voxel_size=(0.2, 0.2, 4),
                 pc_range=(0, -40, -3, 70.4, 40, 1))
Pillar Feature Net.
        The network prepares the pillar features and performs forward pass through PFNLayers. This net performs a
        similar role to SECOND's second.pytorch.voxelnet.VoxelFeatureExtractor.
        :param num_input_features: <int>. Number of input features, either x, y, z or x, y, z, r.
        :param use_norm: <bool>. Whether to include BatchNorm.
        :param num_filters: (<int>: N). Number of features in each of the N PFNLayers.
        :param with_distance: <bool>. Whether to include Euclidean distance to points.
        :param voxel_size: (<float>: 3). Size of voxels, only utilize x and y size.
        :param pc_range: (<float>: 6). Point cloud range, only utilize x and y min.
Pillar Feature Net.
        The network prepares the pillar features and performs forward pass through PFNLayers. This net performs a
        similar role to SECOND's second.pytorch.voxelnet.VoxelFeatureExtractor.
        :param num_input_features: <int>. Number of input features, either x, y, z or x, y, z, r.
        :param use_norm: <bool>. Whether to include BatchNorm.
        :param num_filters: (<int>: N). Number of features in each of the N PFNLayers.
        :param with_distance: <bool>. Whether to include Euclidean distance to points.
        :param voxel_size: (<float>: 3). Size of voxels, only utilize x and y size.
        :param pc_range: (<float>: 6). Point cloud range, only utilize x and y min.
Pillar Feature Net . The network prepares the pillar features and performs forward pass through PFNLayers . This net performs a similar role to SECOND s second . pytorch . voxelnet . VoxelFeatureExtractor . : param num_input_features : <int > . Number of input features either x y z or x y z r . : param use_norm : <bool > . Whether to include BatchNorm . : param num_filters : ( <int > : N ) . Number of features in each of the N PFNLayers . : param with_distance : <bool > . Whether to include Euclidean distance to points . : param voxel_size : ( <float > : 3 ) . Size of voxels only utilize x and y size . : param pc_range : ( <float > : 6 ) . Point cloud range only utilize x and y min .
def __init__(self,
                 num_input_features=4,
                 use_norm=True,
                 num_filters=(64,),
                 with_distance=False,
                 voxel_size=(0.2, 0.2, 4),
                 pc_range=(0, -40, -3, 70.4, 40, 1)):
        """
        Pillar Feature Net.
        The network prepares the pillar features and performs forward pass through PFNLayers. This net performs a
        similar role to SECOND's second.pytorch.voxelnet.VoxelFeatureExtractor.
        :param num_input_features: <int>. Number of input features, either x, y, z or x, y, z, r.
        :param use_norm: <bool>. Whether to include BatchNorm.
        :param num_filters: (<int>: N). Number of features in each of the N PFNLayers.
        :param with_distance: <bool>. Whether to include Euclidean distance to points.
        :param voxel_size: (<float>: 3). Size of voxels, only utilize x and y size.
        :param pc_range: (<float>: 6). Point cloud range, only utilize x and y min.
        """

        super().__init__()
        self.name = 'PillarFeatureNet'
        assert len(num_filters) > 0
        num_input_features += 5
        if with_distance:
            num_input_features += 1
        self._with_distance = with_distance

        # Create PillarFeatureNet layers
        num_filters = [num_input_features] + list(num_filters)
        pfn_layers = []
        for i in range(len(num_filters) - 1):
            in_filters = num_filters[i]
            out_filters = num_filters[i + 1]
            if i < len(num_filters) - 2:
                last_layer = False
            else:
                last_layer = True
            pfn_layers.append(PFNLayer(in_filters, out_filters, use_norm, last_layer=last_layer))
        self.pfn_layers = nn.ModuleList(pfn_layers)

        # Need pillar (voxel) size and x/y offset in order to calculate pillar offset
        self.vx = voxel_size[0]
        self.vy = voxel_size[1]
        self.x_offset = self.vx / 2 + pc_range[0]
        self.y_offset = self.vy / 2 + pc_range[1]
def __init__ ( self , num_input_features = 4 , use_norm = True , num_filters = ( 64 , ) , with_distance = False , voxel_size = ( 0.2 , 0.2 , 4 ) , pc_range = ( 0 , - 40 , - 3 , 70.4 , 40 , 1 ) ) : super ( ) . __init__ ( ) self . name = 'PillarFeatureNet' assert len ( num_filters ) > 0 num_input_features += 5 if with_distance : num_input_features += 1 self . _with_distance = with_distance # Create PillarFeatureNet layers num_filters = [ num_input_features ] + list ( num_filters ) pfn_layers = [ ] for i in range ( len ( num_filters ) - 1 ) : in_filters = num_filters [ i ] out_filters = num_filters [ i + 1 ] if i < len ( num_filters ) - 2 : last_layer = False else : last_layer = True pfn_layers . append ( PFNLayer ( in_filters , out_filters , use_norm , last_layer = last_layer ) ) self . pfn_layers = nn . ModuleList ( pfn_layers ) # Need pillar (voxel) size and x/y offset in order to calculate pillar offset self . vx = voxel_size [ 0 ] self . vy = voxel_size [ 1 ] self . x_offset = self . vx / 2 + pc_range [ 0 ] self . y_offset = self . vy / 2 + pc_range [ 1 ]