From f7a77595f7e832f5aec4fbf5e865f153fdb203be Mon Sep 17 00:00:00 2001 From: YadiraF Date: Fri, 20 Jul 2018 18:36:41 +0800 Subject: [PATCH] fix uv process --- examples/7_generate_uv_map.py | 2 +- examples/8_generate_posmap_300WLP.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/7_generate_uv_map.py b/examples/7_generate_uv_map.py index 930cff8..f8aff04 100644 --- a/examples/7_generate_uv_map.py +++ b/examples/7_generate_uv_map.py @@ -17,7 +17,7 @@ from face3d.morphable_model import MorphabelModel def process_uv(uv_coords, uv_h = 256, uv_w = 256): - uv_coords[:,0] = uv_coords[:,0]*(uv_h - 1) + uv_coords[:,0] = uv_coords[:,0]*(uv_w - 1) uv_coords[:,1] = uv_coords[:,1]*(uv_h - 1) uv_coords[:,1] = uv_h - uv_coords[:,1] - 1 uv_coords = np.hstack((uv_coords, np.zeros((uv_coords.shape[0], 1)))) # add z diff --git a/examples/8_generate_posmap_300WLP.py b/examples/8_generate_posmap_300WLP.py index 3c1025f..0bc4055 100644 --- a/examples/8_generate_posmap_300WLP.py +++ b/examples/8_generate_posmap_300WLP.py @@ -16,7 +16,7 @@ from face3d.morphable_model import MorphabelModel def process_uv(uv_coords, uv_h = 256, uv_w = 256): - uv_coords[:,0] = uv_coords[:,0]*(uv_h - 1) + uv_coords[:,0] = uv_coords[:,0]*(uv_w - 1) uv_coords[:,1] = uv_coords[:,1]*(uv_h - 1) uv_coords[:,1] = uv_h - uv_coords[:,1] - 1 uv_coords = np.hstack((uv_coords, np.zeros((uv_coords.shape[0], 1)))) # add z