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