After training a model using the ML Deformer, you can find a metadata.json file in the same folder as the trained model. This file contains useful information about the training process, which you can find outlined below.
Field | Type | Description |
---|---|---|
version | Object (int, int) | Has "major" and "minor" components. Indicates which version of the metadata (and implicitly the ml deformer) this applies to. |
startFrame | Integer | The start of training data frame range. |
endFrame | Integer | The frame range of training data. |
sampleCount | Integer | The number of training frames. |
controlDefinitions | Array of Objects | List of controls used as inputs to the model. Each index represents a single float value. Includes the input plug (only the index is relevant) and the min and max values seen in the training set for this control. |
deltaCount | Integer | Number of vertex deltas per frame in the export file. Recorded during export. Should match affectCount exactly. |
exportDate | String | When the training data was exported. (Format: yyy-mm-dd hh:mm:ss (timezone)) |
exportTime | Float | Time taken to export the data, in seconds. |
exportFormat | String | File format the training data was saved as.
|
affectCount | Integer | Number of vertices affected by this model. Should equal fullCount if operating on the full geometry. |
fullCount | Integer | Total vertices on the deforming mesh. |
affectMap | Array of integers | Array of vertex indices representing the vertices affected by the model. This uses Maya's vertex indices, and will be empty if working on the full mesh. |
deltaUnits | String | The scene units in use when the training data was exported. Useful for conversions. |
deltaMode | Integer | Integer value representing which delta mode was exported. Redundant with deltaExportType. |
deltaExportType | String | String abbreviation of deltaMode. Values are "dos" for surface mode or "dbp" for offset.
Note: There are other potential values for the mlDeformer -vertexDeltas command, but only dos or dbp are used during export.
|
smoothingIterations | Integer | Number of iterations of smoothing the base mesh undergoes before calculating or applying deltas. Also applies to exported vertex frames. |
subsetState | String | Indicates whether the complete or partial geometry is deformed. |
componentTagExpression | String | The component tag expression defining which vertices will be affected by the deformer. |
geometry | String | Name of the geometry node in Maya. |
lossMetric | String | Loss function used while training. Will always be "MSE" (Mean Squared Error). |
trainingTime | Float | Time spent training the model, in seconds. |
trainingDate | String | When the model was trained. (Format: yyy-mm-dd hh:mm:ss (timezone)) |
finalTrainLoss | Float | Final training loss as measured by the loss metric. |
bestTrainEpoch | Integer | The epoch with the lowest training loss. |
minTrainLoss | Float | The lowest training loss (as it was in the bestTrainEpoch). |
minTrainMAE | Float | Lowest training loss using Mean Absolute Error (MAE) loss calculation (measured in scene units). |
finalValidationLoss | Float | Final validation loss as measured by the loss metric. |
bestValidationEpoch | Integer | The epoch with the lowest validation loss. |
minValidationLoss | Float | The lowest validation loss (as it was in the bestValidationEpoch). |
minValidationMAE | Float | Lowest validation loss using Mean Absolute Error (MAE) loss calculation (measured in scene units). |
learningRate | Float | Learning rate during training. |
batchSize | Integer | Number of samples per training batch. |
epochs | Integer | Total number of epochs to finish training. |
userPrincipalShapes | Boolean | Indicates if training used principal shapes. The trained model's outputs will be shape weights, not deltas. |
principaleShapeCount | Integer | Number of principal shapes trained on. |
shapeConstructionOption | Integer | Indicates the option used for constructing the principal shapes.
|
modelDefinition | Object | The model's hidden layers as defined by training parameters. This definition will have been parsed during training to define the actual pytorch model structure. |
exportSurfaceInformation | Boolean | Whether the data includes extra surface information (i.e. vertex frames). |
surfaceFrameMap | Array of integers | List of vertex indices with vertex frames included in the export data. This uses Maya's vertex indices, and is 10% of the mesh by default. |
surfaceRepresentation | String | How the surface information has been exported. Indicates the format of vertex frames.
|
surfaceFrameSize | Integer | How many values are associated with each vertex frame, depending on its representation. The value will be 9 or 6 depending on the surfaceRepresentation. |
Example of metadata.json structure
{ "version": { "major": 1, "minor": 0 }, "startFrame": 0, "endFrame": 2000, "sampleCount": 2001, "controlDefinitions": [ { "src_plug": "mlDeformer1.controlValues[0]", "minimum": -99.99280023258999, "maximum": 99.89342451625558 }, ... { "src_plug": "mlDeformer1.controlValues[11]", "minimum": -99.89837234610832, "maximum": 99.97574443880183 } ], "deltaCount": 342, "exportDate": "2025-01-08 14:18:39 (UTC)", "exportTime": 43.439516599988565, "exportFormat": "shelf", "affectCount": 342, "fullCount": 342, "affectMap": [], "deltaUnits": "cm", "deltaMode": 1, "deltaExportType": "dos", "smoothingIterations": 0, "exportSurfaceInformation": true, "surfaceFrameMap": [ 0, 5, 11, 12, 23, 30, 55, 59, 84, 91, 96, 131, 158, 161, 177, 183, 185, 195, 197, 205, 207, 222, 236, 246, 257, 258, 262, 269, 286, 292, 295, 306, 313, 338 ], "surfaceRepresentation": "3x3", "surfaceFrameCount": 34, "surfaceFrameSize": 9, "subsetState": "complete", "componentTagExpression": "*", "geometry": "pCylinderShape1", "lossMetric": "MSE", "trainingTime": 4.866239299997687, "trainingDate": "2025-01-08 14:19:39 (UTC)", "finalTrainLoss": 0.015372385734485256, "bestTrainEpoch": 99, "minTrainLoss": 0.015372385734485256, "minTrainMAE": 0.058620557851261565, "finalValidationLoss": 0.0242560015833793, "bestValidationEpoch": 99, "minValidationLoss": 0.0242560015833793, "minValidationMAE": 0.07153895289743718, "learningRate": 0.0005, "batchSize": 128, "epochs": 100, "usesPrincipalShapes": false, "principalShapeCount": 0, "shapeConstructionOption": 0, "modelDefinition": { "version": 1.0, "hidden_layers": [ { "neurons": 512, "activation": "LeakyReLU", "dropout_ratio": 0.0 }, { "neurons": 512, "activation": "LeakyReLU", "dropout_ratio": 0.0 } ] } }