mirror of
https://github.com/gosticks/body-pose-animation.git
synced 2025-10-16 11:45:42 +00:00
15 lines
334 B
Python
15 lines
334 B
Python
import torch
|
|
import torch.nn as nn
|
|
|
|
|
|
class CameraLoss(nn.Module):
|
|
def __init__(self):
|
|
print("CameraLoss init")
|
|
|
|
def forward(self, keypoints, joints, transform):
|
|
|
|
# simple stupid implementation
|
|
# compute 2d distance between model and openpose joints
|
|
# ignoring Z axis
|
|
joints * transform
|