sdf_pose_network
Parametrized networks for pose and shape estimation.
SDFPoseHead
Bases: Module
Parametrized head to estimate pose and shape from feature vector.
Source code in sdfest/initialization/sdf_pose_network.py
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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
__init__(in_size, mlp_out_sizes, shape_dimension, batchnorm, orientation_repr='quaternion', orientation_grid_resolution=None)
Initialize the SDFPoseHead.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
in_size |
int
|
number of input features |
required |
mlp_out_sizes |
List
|
output sizes of each linear layer |
required |
shape_dimension |
int
|
dimension of shape description |
required |
batchnorm |
bool
|
whether to use batchnorm or not |
required |
orientation_repr |
Optional[str]
|
The orientation represention. One of "quaternion"|"discretized". |
'quaternion'
|
orientation_grid_resolution |
Optional[int]
|
The resolution of the SO3 grid. Only used when orientation_repr == "discretized". |
None
|
Source code in sdfest/initialization/sdf_pose_network.py
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 |
|
forward(x)
Forward pass of the module.
Input represents set of input features used to compute pose.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
batch of input vectors |
required |
Returns: Tuple with the following entries: The predicted shape vector. The predicted pose. The predicted scale. The predicted orientation in the specified orientation representation. For "quaternion" this will be of shape (N,4) with each quaternion having the order (x, y, z, w), i.e., scalar-last, and normalized. For "discretized" this will be of shape (N,M) based on the grid resolution. No activation function is applied. I.e., softmax has to be used to get probabilities, and cross_entropy_loss should be used during training.
Source code in sdfest/initialization/sdf_pose_network.py
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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
SDFPoseNet
Bases: Module
Pose and shape estimation from sensor data.
Composed of feature extraction backbone and shape/pose head.
Source code in sdfest/initialization/sdf_pose_network.py
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 |
|
__init__(backbone, head)
Construct SDF pose and shape network.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
backbone |
Module
|
function or class representing the backbone |
required |
backbone_dict |
parameters passed to backbone on construction |
required | |
head |
Module
|
function or class representing the head |
required |
head_dict |
parameters passed to head on construction |
required |
Source code in sdfest/initialization/sdf_pose_network.py
124 125 126 127 128 129 130 131 132 133 134 135 |
|
forward(x)
Forward pass.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
input compatible with backbone. |
required |
Returns: output from head
Source code in sdfest/initialization/sdf_pose_network.py
137 138 139 140 141 142 143 144 145 146 147 |
|