Navigation
API > API/Plugins > API/Plugins/NearestNeighborModel
Inheritance Hierarchy
- UMLDeformerModel
- UMLDeformerGeomCacheModel
- UMLDeformerMorphModel
- UNearestNeighborModel
References
| Module | NearestNeighborModel |
| Header | /Engine/Plugins/Animation/MLDeformer/NearestNeighborModel/Source/NearestNeighborModel/Public/NearestNeighborModel.h |
| Include | #include "NearestNeighborModel.h" |
Syntax
UCLASS ()
class UNearestNeighborModel : public UMLDeformerMorphModel
Remarks
The nearest neighbor model. This model contains the linear basis of the vertex deltas and a small set of meshes for nearest neighbor search. Given a new pose, the pre-trained neural network first predicts the coefficients of the vertex deltas. Then this model uses the predicted coeffcients to find a nearest neighbor in the small dataset. The total vertex delta is computed by vertex_delta = mean_delta + basis * coeff + nearest_neighbor_delta To prevent popping, a time filtering is applied on predicted vertex deltas. The vertex delta at time t is computed by vertex_delta(t) = decay_factor * vertex_delta(t-1) + (1 - decay_factor) * vertex_delta The mesh can be separated into several sections (e.g. shirt, pants...). The nearest neighbor search is carried out separately for each section. The basis and the nearest neighbor data are compressed into morph targets.
Variables
| Type | Name | Description | |
|---|---|---|---|
| int32 | BatchSize | Number of data samples processed together as a group in a single pass. | |
| bool | bUseDualQuaternionDeltas | Whether to use dual quaternion deltas. If false, LBS deltas will be used. | |
| bool | bUseFileCache | Whether to cache intermediate results on disk. | |
| bool | bUseInputMultipliers | Whether to use input multipliers. This can be used to debug bad network input. | |
| bool | bUsePCA | Whether to use pre-computed PCA basis. If false, basis will be learned at training time. | |
| bool | bUseRBF | Whether to use radial basis function to blend multiple nearest neighbors to produce smoother result. | |
| TOptional< FDateTime > | CachedDeltasTimestamp | ||
| TOptional< FDateTime > | CachedNetworkTimestamp | ||
| TOptional< FDateTime > | CachedPCATimestamp | ||
| float | DecayFactor | The ratio of previous frame deltas added into the current frame deltas. | |
| int32 | EarlyStopEpochs | The number of epochs to stop training if there is no improvement in accuracy. | |
| FString | FileCacheDirectory | Directory to save the intermediate results. | |
| TArray< int32 > | HiddenLayerDims | Dimension of hidden layers in the network. This cannot be empty. | |
| int32 | InputDim | Network input dimensions. | |
| TArray< FVector3f > | InputMultipliers | Values to be multiplied to the input. This can be used to debug bad network input. | |
| TArray< float > | InputsMax | The max input values observed throughout the entire training set. | |
| TArray< float > | InputsMin | The min input values observed throughout the entire training set. | |
| float | LearningRate | The size of the step when optimizing the network. | |
| float | NearestNeighborOffsetWeight | The weight multiplied to nearest neighbor deltas. | |
| int32 | NumBasisPerSection | The number of basis used in each section. | |
| int32 | NumIterations | The number of iterations to train the model for. | |
| int32 | OutputDim | Network output dimensions. | |
| float | RBFSigma | Range to blend nearest neighbors. | |
| float | RegularizationFactor | The regularization factor. | |
| float | SmoothLossBeta | The beta parameter in the smooth L1 loss function, which describes below which absolute error to use a squared term. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UNearestNeighborModel
(
const FObjectInitializer& ObjectInitializer |
Functions
Overridden from UMLDeformerMorphModel
| Type | Name | Description | |
|---|---|---|---|
| UMLDeformerModelInstance * | CreateModelInstance
(
UMLDeformerComponent* Component |
||
| bool | |||
| void | |||
| void |
Overridden from UMLDeformerGeomCacheModel
| Type | Name | Description | |
|---|---|---|---|
| void | GetAssetRegistryTags
(
TArray< FAssetRegistryTag >& OutTags |
||
| void | GetAssetRegistryTags
(
FAssetRegistryTagsContext Context |
||
| void | PostLoad () |
Typedefs
Constants
| Name | Description |
|---|---|
| NearestNeighborNumFloatsPerBone | |
| NearestNeighborNumFloatsPerCurve |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| PRAGMA_DISABLE_DEPRECATION_WARNINGSTArray< FClothPartData > | ClothPartData_DEPRECATED | ||
| int32 | NumEpochs_DEPRECATED | Max number of cycles iterated through the training set. |