experimenting.agents package¶
Agents module¶
Agents package provides a toolbox agents for a multitude of tasks
Tasks provided¶
Autoencoder
Classification
Heatmap
2D joint estimation
3D joint estimation
Submodules¶
experimenting.agents.base module¶
Base class for agents classes. Each agent provides a dataset factory class to get train, val, and test datasets. Each agent must implement training, validation, and test steps methods as well as epoch_end methods
-
class
experimenting.agents.base.
BaseModule
(optimizer, lr_scheduler, loss, dataset_constructor, use_lr_scheduler)¶
experimenting.agents.margipose_estimator module¶
-
class
experimenting.agents.margipose_estimator.
MargiposeEstimator
(optimizer: dict, lr_scheduler: dict, loss: dict, core: experimenting.dataset.core.base.BaseCore, model_zoo: str, backbone: str, model: str, stages: int = 3, pretrained: bool = False, use_lr_scheduler=False, estimate_depth=False, test_metrics=None, *args, **kwargs)¶ Agents for training and testing multi-stage 3d joints estimator using marginal heatmaps (denoted as Margipose)
-
denormalize_predictions
(normalized_predictions, b_y)¶ Denormalize skeleton prediction and reproject onto original coord system
- Parameters
normalized_predictions (torch.Tensor) – normalized predictions
b_y – batch y object (as returned by 3d joints dataset)
- Returns
Returns torch tensor of shape (BATCH_SIZE, NUM_JOINTS, 3)
Note
Prediction skeletons are normalized according to batch depth value z_ref or torso length
-
forward
(x)¶ For inference. Return normalized skeletons
-
-
experimenting.agents.margipose_estimator.
predict3d
(xy_hm, zy_hm, xz_hm)¶ Predict normalized 3d skeleton joints
- Parameters
outs (list, list, list) – output of the model
- Returns
torch tensor of normalized skeleton joints with shape (BATCH_SIZE, NUM_JOINTS, 3)
Note
prediction used dsnnt toolbox