pointnet
Parametrized PointNet.
GeneralizedIterativePointNet
Bases: Module
Generalized Iterative PointNet composed of multiple IterativePointNet instances.
This is a sequence of iterative pointnets, where the initial input will be concatenated to each input, e.g., out = IterativePointNet1(in) out = IterativePointNet2(concat(out, in)) out = IterativePointNet3(concat(out, in)) ...
Source code in sdfest/initialization/pointnet.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
|
__init__(list_concat, in_size, list_mlp_out_sizes, batchnorm)
Initialize GeneralizedIterativePointnet module.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
list_concat |
list
|
List of concatenations for each MLP. |
required |
in_size |
int
|
Dimension of the input points. |
required |
list_mlp_out_sizes |
list
|
List of Output sizes of each linear layer. It is a List of Lists. |
required |
batchnorm |
bool
|
Whether to use batchnorm or not. |
required |
Source code in sdfest/initialization/pointnet.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
|
forward(x)
Forward pass.
Input has dimension NxMxC, where N is the batch size, M the number of points per set, and C the number of channels per point.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Tensor
|
batch of point sets |
required |
Source code in sdfest/initialization/pointnet.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
|
IterativePointNet
Bases: Module
Iterative PointNet which concatenates input.
This is composed of 2 PointNets, where the first PointNet is applied once, the second PointNet a number of times, i.e., out = PointNet1(in) for i in range(num_concat): out = PointNet2( concat( out, in ) )
Source code in sdfest/initialization/pointnet.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
__init__(num_concat, in_size, mlp_out_sizes, batchnorm)
Initialize the IterativePointNet module.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_concat |
int
|
Number of concatenations of input and previous iteration. If 0 this module is the same as VanillaPointNet. |
required |
in_size |
int
|
Dimension of the input points. |
required |
mlp_out_sizes |
List
|
Output sizes of each linear layer. |
required |
batchnorm |
bool
|
Whether to use batchnorm or not. |
required |
Source code in sdfest/initialization/pointnet.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|
forward(x)
Forward pass.
Input has dimension NxMxC, where N is the batch size, M the number of points per set, and C the number of channels per point.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Tensor
|
batch of point sets |
required |
Source code in sdfest/initialization/pointnet.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
VanillaPointNet
Bases: Module
Parametrized PointNet without transformation layers (no T-nets).
Generally following
PointNet Deep Learning on Point Sets for 3D Classification and Segmentation Qi, 2017
Source code in sdfest/initialization/pointnet.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
__init__(in_size, mlp_out_sizes, batchnorm, residual=False, dense=False)
Initialize the VanillaPointNet module.
This module will only implements the MLP + MaxPooling part of the pointnet.
It still requires a task specific head.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
in_size |
int
|
dimension of the input points |
required |
mlp_out_sizes |
List
|
output sizes of each linear layer |
required |
batchnorm |
bool
|
whether to use batchnorm or not |
required |
Source code in sdfest/initialization/pointnet.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
forward(x)
Forward pass of the module.
Input has dimension NxMxC, where N is the batch size, M the number of points per set, and C the number of channels per point.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Tensor
|
batch of point sets |
required |
Source code in sdfest/initialization/pointnet.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|