From 18a21d4b07c581a8954b08518115fb035c712b28 Mon Sep 17 00:00:00 2001
From: natanielruiz <nataniel777@hotmail.com>
Date: 星期二, 08 八月 2017 07:34:09 +0800
Subject: [PATCH] Added new correct cropping for training and smoothing for video.

---
 code/utils.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/code/utils.py b/code/utils.py
index 52bfa73..1e37045 100644
--- a/code/utils.py
+++ b/code/utils.py
@@ -70,5 +70,11 @@
     pose_params = pre_pose_params[:3]
     return pose_params
 
+def get_pt2d_from_mat(mat_path):
+    # Get 2D landmarks
+    mat = sio.loadmat(mat_path)
+    pt2d = mat['pt2d']
+    return pt2d
+
 def mse_loss(input, target):
     return torch.sum(torch.abs(input.data - target.data) ** 2)

--
Gitblit v1.8.0