diff --git a/easymocap/dataset/__init__.py b/easymocap/dataset/__init__.py index d8f9ad7..6b01d5d 100644 --- a/easymocap/dataset/__init__.py +++ b/easymocap/dataset/__init__.py @@ -2,11 +2,10 @@ @ Date: 2021-01-13 18:50:31 @ Author: Qing Shuai @ LastEditors: Qing Shuai - @ LastEditTime: 2021-03-28 22:11:58 - @ FilePath: /EasyMocap/code/dataset/__init__.py + @ LastEditTime: 2021-04-14 16:24:15 + @ FilePath: /EasyMocapRelease/easymocap/dataset/__init__.py ''' from .config import CONFIG from .base import ImageFolder from .mv1pmf import MV1PMF -from .mv1pmf_mirror import MV1PMF_Mirror -from .mvmpmf import MVMPMF \ No newline at end of file +from .mv1pmf_mirror import MV1PMF_Mirror \ No newline at end of file diff --git a/easymocap/estimator/__init__.py b/easymocap/estimator/__init__.py new file mode 100644 index 0000000..b848565 --- /dev/null +++ b/easymocap/estimator/__init__.py @@ -0,0 +1,8 @@ +''' + @ Date: 2021-04-14 16:25:48 + @ Author: Qing Shuai + @ LastEditors: Qing Shuai + @ LastEditTime: 2021-04-14 16:25:49 + @ FilePath: /EasyMocapRelease/easymocap/estimator/__init__.py +''' +from .SPIN import SPIN, init_with_spin \ No newline at end of file diff --git a/easymocap/mytools/__init__.py b/easymocap/mytools/__init__.py new file mode 100644 index 0000000..367a259 --- /dev/null +++ b/easymocap/mytools/__init__.py @@ -0,0 +1,15 @@ +''' + @ Date: 2021-03-28 21:09:45 + @ Author: Qing Shuai + @ LastEditors: Qing Shuai + @ LastEditTime: 2021-04-02 21:57:11 + @ FilePath: /EasyMocap/easymocap/mytools/__init__.py +''' +from .vis_base import merge, colors_bar_rgb, plot_bbox, plot_keypoints, plot_line, get_rgb, plot_cross, plot_points2d +from .file_utils import getFileList, read_json, save_json, read_annot +from .camera_utils import read_camera, write_camera, write_extri, write_intri, read_intri +from .camera_utils import Undistort +from .utils import Timer +from .reconstruction import batch_triangulate, projectN3, simple_recon_person +from .cmd_loader import load_parser, parse_parser +from .writer import FileWriter \ No newline at end of file diff --git a/easymocap/mytools/utils.py b/easymocap/mytools/utils.py new file mode 100644 index 0000000..e469eb4 --- /dev/null +++ b/easymocap/mytools/utils.py @@ -0,0 +1,33 @@ +''' + @ Date: 2021-01-15 11:12:00 + @ Author: Qing Shuai + @ LastEditors: Qing Shuai + @ LastEditTime: 2021-03-08 21:07:48 + @ FilePath: /EasyMocap/code/mytools/utils.py +''' +import time +import tabulate +class Timer: + records = {} + @classmethod + def report(cls): + header = ['', 'Time(ms)'] + contents = [] + for key, val in cls.records.items(): + contents.append(['{:20s}'.format(key), '{:.2f}'.format(sum(val)/len(val))]) + print(tabulate.tabulate(contents, header, tablefmt='fancy_grid')) + + def __init__(self, name, silent=False): + self.name = name + self.silent = silent + if name not in Timer.records.keys(): + Timer.records[name] = [] + + def __enter__(self): + self.start = time.time() + + def __exit__(self, exc_type, exc_value, exc_tb): + end = time.time() + Timer.records[self.name].append((end-self.start)*1000) + if not self.silent: + print('-> [{:20s}]: {:5.1f}ms'.format(self.name, (end-self.start)*1000)) diff --git a/easymocap/visualize/__init__.py b/easymocap/visualize/__init__.py new file mode 100644 index 0000000..0566748 --- /dev/null +++ b/easymocap/visualize/__init__.py @@ -0,0 +1 @@ +from .renderer import Renderer \ No newline at end of file diff --git a/easymocap/visualize/geometry.py b/easymocap/visualize/geometry.py new file mode 100644 index 0000000..0118716 --- /dev/null +++ b/easymocap/visualize/geometry.py @@ -0,0 +1,109 @@ +''' + @ Date: 2021-01-17 22:44:34 + @ Author: Qing Shuai + @ LastEditors: Qing Shuai + @ LastEditTime: 2021-04-03 20:00:02 + @ FilePath: /EasyMocap/code/visualize/geometry.py +''' +import numpy as np +import cv2 +import numpy as np + +def create_ground( + center=[0, 0, 0], xdir=[1, 0, 0], ydir=[0, 1, 0], # 位置 + step=1, xrange=10, yrange=10, # 尺寸 + white=[1., 1., 1.], black=[0.,0.,0.], # 颜色 + two_sides=True + ): + if isinstance(center, list): + center = np.array(center) + xdir = np.array(xdir) + ydir = np.array(ydir) + print(center, xdir, ydir) + xdir = xdir * step + ydir = ydir * step + vertls, trils, colls = [],[],[] + cnt = 0 + min_x = -xrange if two_sides else 0 + min_y = -yrange if two_sides else 0 + for i in range(min_x, xrange+1): + for j in range(min_y, yrange+1): + point0 = center + i*xdir + j*ydir + point1 = center + (i+1)*xdir + j*ydir + point2 = center + (i+1)*xdir + (j+1)*ydir + point3 = center + (i)*xdir + (j+1)*ydir + if (i%2==0 and j%2==0) or (i%2==1 and j%2==1): + col = white + else: + col = black + vert = np.stack([point0, point1, point2, point3]) + col = np.stack([col for _ in range(vert.shape[0])]) + tri = np.array([[2, 3, 0], [0, 1, 2]]) + vert.shape[0] * cnt + cnt += 1 + vertls.append(vert) + trils.append(tri) + colls.append(col) + vertls = np.vstack(vertls) + trils = np.vstack(trils) + colls = np.vstack(colls) + return {'vertices': vertls, 'faces': trils, 'colors': colls, 'name': 'ground'} + + +def get_rotation_from_two_directions(direc0, direc1): + direc0 = direc0/np.linalg.norm(direc0) + direc1 = direc1/np.linalg.norm(direc1) + rotdir = np.cross(direc0, direc1) + if np.linalg.norm(rotdir) < 1e-2: + return np.eye(3) + rotdir = rotdir/np.linalg.norm(rotdir) + rotdir = rotdir * np.arccos(np.dot(direc0, direc1)) + rotmat, _ = cv2.Rodrigues(rotdir) + return rotmat + +PLANE_VERTICES = np.array([ + [0., 0., 0.], + [1., 0., 0.], + [0., 0., 1.], + [1., 0., 1.], + [0., 1., 0.], + [1., 1., 0.], + [0., 1., 1.], + [1., 1., 1.]]) +PLANE_FACES = np.array([ + [4, 7, 5], + [4, 6, 7], + [0, 2, 4], + [2, 6, 4], + [0, 1, 2], + [1, 3, 2], + [1, 5, 7], + [1, 7, 3], + [2, 3, 7], + [2, 7, 6], + [0, 4, 1], + [1, 4, 5]], dtype=np.int32) + +def create_plane(normal, center, dx=1, dy=1, dz=0.005, color=[0.8, 0.8, 0.8]): + vertices = PLANE_VERTICES.copy() + vertices[:, 0] = vertices[:, 0]*dx - dx/2 + vertices[:, 1] = vertices[:, 1]*dy - dy/2 + vertices[:, 2] = vertices[:, 2]*dz - dz/2 + # 根据normal计算旋转 + rotmat = get_rotation_from_two_directions( + np.array([0, 0, 1]), np.array(normal)) + vertices = vertices @ rotmat.T + vertices += np.array(center).reshape(-1, 3) + return {'vertices': vertices, 'faces': PLANE_FACES.copy(), 'name': 'plane'} + +def create_cameras(cameras): + vertex = np.array([[0.203982,0.061435,0.00717595],[-0.116019,0.061435,0.00717595],[-0.116019,-0.178565,0.00717595],[0.203982,-0.178565,0.00717595],[0.203982,0.061435,-0.092824],[-0.116019,0.061435,-0.092824],[-0.116019,-0.178565,-0.092824],[0.203982,-0.178565,-0.092824],[0.131154,-0.0361827,0.00717595],[0.131154,-0.0361827,0.092176],[0.122849,-0.015207,0.00717595],[0.122849,-0.015207,0.092176],[0.109589,0.00304419,0.00717595],[0.109589,0.00304419,0.092176],[0.092206,0.0174247,0.00717595],[0.092206,0.0174247,0.092176],[0.071793,0.0270302,0.00717595],[0.071793,0.0270302,0.092176],[0.0496327,0.0312577,0.00717595],[0.0496327,0.0312577,0.092176],[0.0271172,0.0298412,0.00717595],[0.0271172,0.0298412,0.092176],[0.00566135,0.0228697,0.00717595],[0.00566135,0.0228697,0.092176],[-0.0133865,0.0107812,0.00717595],[-0.0133865,0.0107812,0.092176],[-0.02883,-0.0056643,0.00717595],[-0.02883,-0.0056643,0.092176],[-0.0396985,-0.0254336,0.00717595],[-0.0396985,-0.0254336,0.092176],[-0.045309,-0.0472848,0.00717595],[-0.045309,-0.0472848,0.092176],[-0.045309,-0.069845,0.00717595],[-0.045309,-0.069845,0.092176],[-0.0396985,-0.091696,0.00717595],[-0.0396985,-0.091696,0.092176],[-0.02883,-0.111466,0.00717595],[-0.02883,-0.111466,0.092176],[-0.0133865,-0.127911,0.00717595],[-0.0133865,-0.127911,0.092176],[0.00566135,-0.14,0.00717595],[0.00566135,-0.14,0.092176],[0.0271172,-0.146971,0.00717595],[0.0271172,-0.146971,0.092176],[0.0496327,-0.148388,0.00717595],[0.0496327,-0.148388,0.092176],[0.071793,-0.14416,0.00717595],[0.071793,-0.14416,0.092176],[0.092206,-0.134554,0.00717595],[0.092206,-0.134554,0.092176],[0.109589,-0.120174,0.00717595],[0.109589,-0.120174,0.092176],[0.122849,-0.101923,0.00717595],[0.122849,-0.101923,0.092176],[0.131154,-0.080947,0.00717595],[0.131154,-0.080947,0.092176],[0.133982,-0.058565,0.00717595],[0.133982,-0.058565,0.092176],[-0.0074325,0.061435,-0.0372285],[-0.0074325,0.074435,-0.0372285],[-0.0115845,0.061435,-0.0319846],[-0.0115845,0.074435,-0.0319846],[-0.018215,0.061435,-0.0274218],[-0.018215,0.074435,-0.0274218],[-0.0269065,0.061435,-0.0238267],[-0.0269065,0.074435,-0.0238267],[-0.0371125,0.061435,-0.0214253],[-0.0371125,0.074435,-0.0214253],[-0.048193,0.061435,-0.0203685],[-0.048193,0.074435,-0.0203685],[-0.0594505,0.061435,-0.0207226],[-0.0594505,0.074435,-0.0207226],[-0.0701785,0.061435,-0.0224655],[-0.0701785,0.074435,-0.0224655],[-0.0797025,0.061435,-0.0254875],[-0.0797025,0.074435,-0.0254875],[-0.0874245,0.061435,-0.0295989],[-0.0874245,0.074435,-0.0295989],[-0.0928585,0.061435,-0.0345412],[-0.0928585,0.074435,-0.0345412],[-0.0956635,0.061435,-0.040004],[-0.0956635,0.074435,-0.040004],[-0.0956635,0.061435,-0.045644],[-0.0956635,0.074435,-0.045644],[-0.0928585,0.061435,-0.051107],[-0.0928585,0.074435,-0.051107],[-0.0874245,0.061435,-0.056049],[-0.0874245,0.074435,-0.056049],[-0.0797025,0.061435,-0.0601605],[-0.0797025,0.074435,-0.0601605],[-0.0701785,0.061435,-0.0631825],[-0.0701785,0.074435,-0.0631825],[-0.0594505,0.061435,-0.0649255],[-0.0594505,0.074435,-0.0649255],[-0.048193,0.061435,-0.0652795],[-0.048193,0.074435,-0.0652795],[-0.0371125,0.061435,-0.064223],[-0.0371125,0.074435,-0.064223],[-0.0269065,0.061435,-0.0618215],[-0.0269065,0.074435,-0.0618215],[-0.018215,0.061435,-0.0582265],[-0.018215,0.074435,-0.0582265],[-0.0115845,0.061435,-0.0536635],[-0.0115845,0.074435,-0.0536635],[-0.0074325,0.061435,-0.0484195],[-0.0074325,0.074435,-0.0484195],[-0.0060185,0.061435,-0.0428241],[-0.0060185,0.074435,-0.0428241]])*0.5 + tri = [[4,3,2],[1,4,2],[6,1,2],[6,5,1],[8,4,1],[5,8,1],[3,7,2],[7,6,2],[4,7,3],[8,7,4],[6,7,5],[7,8,5],[43,42,44],[42,43,41],[43,46,45],[46,43,44],[58,9,57],[9,58,10],[55,58,57],[56,58,55],[53,54,55],[54,56,55],[12,11,9],[12,9,10],[21,20,22],[20,21,19],[34,33,32],[32,33,31],[35,36,37],[37,36,38],[33,36,35],[36,33,34],[29,30,31],[30,32,31],[40,39,37],[40,37,38],[39,40,41],[40,42,41],[47,48,49],[49,48,50],[48,47,45],[46,48,45],[49,52,51],[52,49,50],[52,53,51],[52,54,53],[14,15,13],[15,14,16],[11,14,13],[12,14,11],[18,17,15],[18,15,16],[17,18,19],[18,20,19],[27,35,37],[17,27,15],[27,53,55],[27,49,51],[11,27,9],[27,47,49],[27,33,35],[23,27,21],[27,39,41],[27,55,57],[9,27,57],[15,27,13],[39,27,37],[47,27,45],[53,27,51],[27,11,13],[43,27,41],[27,29,31],[27,43,45],[27,17,19],[21,27,19],[33,27,31],[27,23,25],[23,24,25],[25,24,26],[24,21,22],[24,23,21],[28,36,34],[42,28,44],[28,58,56],[54,28,56],[52,28,54],[28,34,32],[28,46,44],[18,28,20],[20,28,22],[30,28,32],[40,28,42],[58,28,10],[28,48,46],[28,12,10],[28,14,12],[36,28,38],[28,24,22],[28,40,38],[48,28,50],[28,52,50],[14,28,16],[28,18,16],[24,28,26],[28,27,25],[28,25,26],[28,30,29],[27,28,29],[108,59,60],[59,108,107],[62,59,61],[59,62,60],[103,102,101],[102,103,104],[64,61,63],[64,62,61],[70,67,69],[67,70,68],[70,71,72],[71,70,69],[83,84,82],[83,82,81],[86,85,87],[86,87,88],[86,83,85],[83,86,84],[77,78,75],[75,78,76],[105,106,103],[103,106,104],[108,106,107],[106,105,107],[97,96,95],[96,97,98],[96,93,95],[93,96,94],[93,92,91],[92,93,94],[79,105,103],[59,79,61],[79,93,91],[83,79,85],[85,79,87],[61,79,63],[79,103,101],[65,79,67],[79,99,97],[89,79,91],[79,77,75],[79,59,107],[67,79,69],[79,89,87],[79,73,71],[105,79,107],[79,97,95],[79,71,69],[79,83,81],[99,79,101],[93,79,95],[79,65,63],[73,79,75],[99,100,97],[97,100,98],[102,100,101],[100,99,101],[89,90,87],[87,90,88],[90,89,91],[92,90,91],[66,67,68],[66,65,67],[66,64,63],[65,66,63],[74,75,76],[74,73,75],[71,74,72],[73,74,71],[80,106,108],[74,80,72],[86,80,84],[84,80,82],[64,80,62],[80,108,60],[80,100,102],[62,80,60],[66,80,64],[80,70,72],[80,102,104],[96,80,94],[80,90,92],[70,80,68],[80,86,88],[78,80,76],[106,80,104],[80,96,98],[80,92,94],[100,80,98],[90,80,88],[80,66,68],[80,74,76],[82,80,81],[80,79,81],[80,78,77],[79,80,77]] + tri = [a[::-1] for a in tri] + triangles = np.array(tri) - 1 + meshes = [] + for nv, (key, camera) in enumerate(cameras.items()): + vertices = (camera['R'].T @ (vertex.T - camera['T'])).T + meshes.append({ + 'vertices': vertices, 'faces': triangles, 'name': 'camera_{}'.format(nv), 'vid': nv + }) + return meshes diff --git a/easymocap/visualize/renderer.py b/easymocap/visualize/renderer.py new file mode 100644 index 0000000..5a274d0 --- /dev/null +++ b/easymocap/visualize/renderer.py @@ -0,0 +1,341 @@ +import os +import numpy as np +import cv2 +import pyrender +import trimesh +import copy +# 这个顺序是BGR的。虽然render的使用的是RGB的,但是由于和图像拼接了,所以又变成BGR的了 +colors = [ + # (0.5, 0.2, 0.2, 1.), # Defalut BGR + (.5, .5, .7, 1.), # Pink BGR + (.44, .50, .98, 1.), # Red + (.7, .7, .6, 1.), # Neutral + (.5, .5, .7, 1.), # Blue + (.5, .55, .3, 1.), # capsule + (.3, .5, .55, 1.), # Yellow + # (.6, .6, .6, 1.), # gray + (.9, 1., 1., 1.), + (0.95, 0.74, 0.65, 1.), + (.9, .7, .7, 1.) +] + +colors_table = { + # colorblind/print/copy safe: + '_blue': [0.65098039, 0.74117647, 0.85882353], + '_pink': [.9, .7, .7], + '_mint': [ 166/255., 229/255., 204/255.], + '_mint2': [ 202/255., 229/255., 223/255.], + '_green': [ 153/255., 216/255., 201/255.], + '_green2': [ 171/255., 221/255., 164/255.], + '_red': [ 251/255., 128/255., 114/255.], + '_orange': [ 253/255., 174/255., 97/255.], + '_yellow': [ 250/255., 230/255., 154/255.], + 'r':[255/255,0,0], + 'g':[0,255/255,0], + 'b':[0,0,255/255], + 'k':[0,0,0], + 'y':[255/255,255/255,0], + 'purple':[128/255,0,128/255] +} + +def get_colors(pid): + if isinstance(pid, int): + return colors[pid % len(colors)] + elif isinstance(pid, str): + return colors_table[pid] + +from pyrender import RenderFlags +render_flags = { + 'flip_wireframe': False, + 'all_wireframe': False, + 'all_solid': True, + 'shadows': False, # TODO:bug exists in shadow mode + 'vertex_normals': False, + 'face_normals': False, + 'cull_faces': False, # set to False + 'point_size': 1.0, + 'rgba':True +} + +flags = RenderFlags.NONE +if render_flags['flip_wireframe']: + flags |= RenderFlags.FLIP_WIREFRAME +elif render_flags['all_wireframe']: + flags |= RenderFlags.ALL_WIREFRAME +elif render_flags['all_solid']: + flags |= RenderFlags.ALL_SOLID + +if render_flags['shadows']: + flags |= RenderFlags.SHADOWS_DIRECTIONAL | RenderFlags.SHADOWS_SPOT +if render_flags['vertex_normals']: + flags |= RenderFlags.VERTEX_NORMALS +if render_flags['face_normals']: + flags |= RenderFlags.FACE_NORMALS +if not render_flags['cull_faces']: + flags |= RenderFlags.SKIP_CULL_FACES +if render_flags['rgba']: + flags |= RenderFlags.RGBA + + +class Renderer(object): + def __init__(self, focal_length=1000, height=512, width=512, faces=None, + bg_color=[1.0, 1.0, 1.0, 0.0], down_scale=1, # render 配置 + extra_mesh=[] + ): + self.renderer = pyrender.OffscreenRenderer(height, width) + self.faces = faces + self.focal_length = focal_length + self.bg_color = bg_color + self.ambient_light = (0.5, 0.5, 0.5) + self.down_scale = down_scale + self.extra_mesh = extra_mesh + + def add_light(self, scene): + trans = [0, 0, 0] + # Use 3 directional lights + # Create light source + light = pyrender.DirectionalLight(color=[1.0, 1.0, 1.0], intensity=3) + light_forward = np.eye(4) + light_forward[:3, 3] = np.array([0, 1, 1]) + scene.add(light, pose=light_forward) + light_z = np.eye(4) + light_z[:3, :3] = cv2.Rodrigues(np.array([-np.pi/2, 0, 0]))[0] + scene.add(light, pose=light_z) + + def render(self, render_data, cameras, images, + use_white=False, add_back=True, + ret_depth=False, ret_color=False): + # Need to flip x-axis + rot = trimesh.transformations.rotation_matrix( + np.radians(180), [1, 0, 0]) + output_images, output_colors, output_depths = [], [], [] + for nv, img_ in enumerate(images): + if use_white: + img = np.zeros_like(img_, dtype=np.uint8) + 255 + else: + img = img_.copy() + K, R, T = cameras['K'][nv].copy(), cameras['R'][nv], cameras['T'][nv] + # down scale the image to speed up rendering + img = cv2.resize(img, None, fx=1/self.down_scale, fy=1/self.down_scale) + K[:2, :] /= self.down_scale + + self.renderer.viewport_height = img.shape[0] + self.renderer.viewport_width = img.shape[1] + scene = pyrender.Scene(bg_color=self.bg_color, + ambient_light=self.ambient_light) + for iextra, _mesh in enumerate(self.extra_mesh): + if True: + mesh = _mesh.copy() + trans_cam = np.eye(4) + trans_cam[:3, :3] = R + trans_cam[:3, 3:] = T + mesh.apply_transform(trans_cam) + mesh.apply_transform(rot) + # mesh.vertices = np.asarray(mesh.vertices) @ R.T + T.T + mesh_ = pyrender.Mesh.from_trimesh(mesh) + scene.add(mesh_, 'extra{}'.format(iextra)) + else: + vert = np.asarray(_mesh.vertices).copy() + faces = np.asarray(_mesh.faces) + vert = vert @ R.T + T.T + mesh = trimesh.Trimesh(vert, faces, process=False) + mesh.apply_transform(rot) + material = pyrender.MetallicRoughnessMaterial( + metallicFactor=0.0, + alphaMode='OPAQUE', + baseColorFactor=(0., 0., 0., 1.)) + mesh = pyrender.Mesh.from_trimesh( + mesh, + material=material) + scene.add(mesh, 'extra{}'.format(iextra)) + for trackId, data in render_data.items(): + vert = data['vertices'].copy() + faces = data['faces'] + vert = vert @ R.T + T.T + if 'colors' not in data.keys(): + # 如果使用了vid这个键,那么可视化的颜色使用vid的颜色 + col = get_colors(data.get('vid', trackId)) + mesh = trimesh.Trimesh(vert, faces, process=False) + mesh.apply_transform(rot) + material = pyrender.MetallicRoughnessMaterial( + metallicFactor=0.0, + alphaMode='OPAQUE', + baseColorFactor=col) + mesh = pyrender.Mesh.from_trimesh( + mesh, + material=material) + scene.add(mesh, data['name']) + else: + mesh = trimesh.Trimesh(vert, faces, vertex_colors=data['colors'], process=False) + mesh.apply_transform(rot) + material = pyrender.MetallicRoughnessMaterial( + metallicFactor=0.0, + alphaMode='OPAQUE', + baseColorFactor=(1., 1., 1.)) + mesh = pyrender.Mesh.from_trimesh(mesh, material=material) + scene.add(mesh, data['name']) + camera_pose = np.eye(4) + camera = pyrender.camera.IntrinsicsCamera(fx=K[0, 0], fy=K[1, 1], cx=K[0, 2], cy=K[1, 2]) + scene.add(camera, pose=camera_pose) + self.add_light(scene) + # pyrender.Viewer(scene, use_raymond_lighting=True) + # Alpha channel was not working previously need to check again + # Until this is fixed use hack with depth image to get the opacity + rend_rgba, rend_depth = self.renderer.render(scene, flags=flags) + if rend_rgba.shape[2] == 3: # fail to generate transparent channel + valid_mask = (rend_depth > 0)[:, :, None] + rend_rgba = np.dstack((rend_rgba, (valid_mask*255).astype(np.uint8))) + rend_rgba = rend_rgba[..., [2, 1, 0, 3]] + if add_back: + rend_cat = cv2.addWeighted( + cv2.bitwise_and(img, 255 - rend_rgba[:, :, 3:4].repeat(3, 2)), 1, + cv2.bitwise_and(rend_rgba[:, :, :3], rend_rgba[:, :, 3:4].repeat(3, 2)), 1, 0) + else: + rend_cat = rend_rgba + + output_colors.append(rend_rgba) + output_depths.append(rend_depth) + output_images.append(rend_cat) + if ret_depth: + return output_images, output_depths + elif ret_color: + return output_colors + else: + return output_images + + def _render_multiview(self, vertices, K, R, T, imglist, trackId=0, return_depth=False, return_color=False, + bg_color=[0.0, 0.0, 0.0, 0.0], camera=None): + # List to store rendered scenes + output_images, output_colors, output_depths = [], [], [] + # Need to flip x-axis + rot = trimesh.transformations.rotation_matrix( + np.radians(180), [1, 0, 0]) + nViews = len(imglist) + for nv in range(nViews): + img = imglist[nv] + self.renderer.viewport_height = img.shape[0] + self.renderer.viewport_width = img.shape[1] + # Create a scene for each image and render all meshes + scene = pyrender.Scene(bg_color=bg_color, + ambient_light=(0.3, 0.3, 0.3)) + camera_pose = np.eye(4) + + # for every person in the scene + if isinstance(vertices, dict): + for trackId, data in vertices.items(): + vert = data['vertices'].copy() + faces = data['faces'] + col = data.get('col', trackId) + vert = vert @ R[nv].T + T[nv] + mesh = trimesh.Trimesh(vert, faces) + mesh.apply_transform(rot) + trans = [0, 0, 0] + + material = pyrender.MetallicRoughnessMaterial( + metallicFactor=0.0, + alphaMode='OPAQUE', + baseColorFactor=colors[col % len(colors)]) + mesh = pyrender.Mesh.from_trimesh( + mesh, + material=material) + scene.add(mesh, 'mesh') + else: + verts = vertices @ R[nv].T + T[nv] + mesh = trimesh.Trimesh(verts, self.faces) + mesh.apply_transform(rot) + trans = [0, 0, 0] + + material = pyrender.MetallicRoughnessMaterial( + metallicFactor=0.0, + alphaMode='OPAQUE', + baseColorFactor=colors[trackId % len(colors)]) + mesh = pyrender.Mesh.from_trimesh( + mesh, + material=material) + scene.add(mesh, 'mesh') + + if camera is not None: + light = pyrender.PointLight(color=[1.0, 1.0, 1.0], intensity=70) + light_pose = np.eye(4) + light_pose[:3, 3] = [0, 0, 4.5] + scene.add(light, pose=light_pose) + + light_pose[:3, 3] = [0, 1, 4] + scene.add(light, pose=light_pose) + + light_pose[:3, 3] = [0, -1, 4] + scene.add(light, pose=light_pose) + else: + trans = [0, 0, 0] + # Use 3 directional lights + # Create light source + light = pyrender.DirectionalLight(color=[1.0, 1.0, 1.0], intensity=1) + light_pose = np.eye(4) + light_pose[:3, 3] = np.array([0, -1, 1]) + trans + scene.add(light, pose=light_pose) + light_pose[:3, 3] = np.array([0, 1, 1]) + trans + scene.add(light, pose=light_pose) + light_pose[:3, 3] = np.array([1, 1, 2]) + trans + scene.add(light, pose=light_pose) + if camera is None: + if K is None: + camera_center = np.array([img.shape[1] / 2., img.shape[0] / 2.]) + camera = pyrender.camera.IntrinsicsCamera(fx=self.focal_length, fy=self.focal_length, cx=camera_center[0], cy=camera_center[1]) + else: + camera = pyrender.camera.IntrinsicsCamera(fx=K[nv][0, 0], fy=K[nv][1, 1], cx=K[nv][0, 2], cy=K[nv][1, 2]) + scene.add(camera, pose=camera_pose) + # Alpha channel was not working previously need to check again + # Until this is fixed use hack with depth image to get the opacity + color, rend_depth = self.renderer.render(scene, flags=flags) + # color = color[::-1,::-1] + # rend_depth = rend_depth[::-1,::-1] + output_depths.append(rend_depth) + color = color.astype(np.uint8) + valid_mask = (rend_depth > 0)[:, :, None] + if color.shape[2] == 3: # 在服务器上透明通道失败 + color = np.dstack((color, (valid_mask*255).astype(np.uint8))) + output_colors.append(color) + output_img = (color[:, :, :3] * valid_mask + + (1 - valid_mask) * img) + + output_img = output_img.astype(np.uint8) + output_images.append(output_img) + if return_depth: + return output_images, output_depths + elif return_color: + return output_colors + else: + return output_images + +def render_results(img, render_data, cam_params, outname=None, rotate=False, degree=90, axis=[1.,0.,0], + fix_center=None): + render_data = copy.deepcopy(render_data) + render = Renderer(height=1024, width=1024, faces=None) + Ks, Rs, Ts = [cam_params['K']], [cam_params['Rc']], [cam_params['Tc']] + imgsrender = render.render_multiview(render_data, Ks, Rs, Ts, [img], return_color=True)[0] + render0 = cv2.addWeighted(cv2.bitwise_and(img, 255 - imgsrender[:, :, 3:4].repeat(3, 2)), 1, imgsrender[:, :, :3], 1, 0.0) + if rotate: + # simple rotate the vertices + if fix_center is None: + center = np.mean(np.vstack([v['vertices'] for i, v in render_data.items()]), axis=0, keepdims=True) + new_center = center.copy() + new_center[:, 0:2] = 0 + else: + center = fix_center.copy() + new_center = fix_center.copy() + new_center[:, 2] *= 1.5 + direc = np.array(axis) + rot, _ = cv2.Rodrigues(direc*degree/90*np.pi/2) + for key in render_data.keys(): + vertices = render_data[key]['vertices'] + vert = (vertices - center) @ rot.T + new_center + render_data[key]['vertices'] = vert + blank = np.zeros(()) + blank = np.zeros((img.shape[0], img.shape[1], 3), dtype=img.dtype) + 255 + imgsrender = render.render_multiview(render_data, Ks, Rs, Ts, [blank], return_color=True)[0] + render1 = cv2.addWeighted(cv2.bitwise_and(blank, 255- imgsrender[:, :, 3:4].repeat(3, 2)), 1, imgsrender[:, :, :3], 1, 0.0) + render0 = np.vstack([render0, render1]) + if outname is not None: + os.makedirs(os.path.dirname(outname), exist_ok=True) + cv2.imwrite(outname, render0) + return render0 \ No newline at end of file diff --git a/easymocap/visualize/skelmodel.py b/easymocap/visualize/skelmodel.py new file mode 100644 index 0000000..0ad9dc1 --- /dev/null +++ b/easymocap/visualize/skelmodel.py @@ -0,0 +1,77 @@ +''' + @ Date: 2021-01-17 21:38:19 + @ Author: Qing Shuai + @ LastEditors: Qing Shuai + @ LastEditTime: 2021-01-22 23:08:18 + @ FilePath: /EasyMocap/code/visualize/skelmodel.py +''' +import numpy as np +import cv2 +from os.path import join +import os + +def calTransformation(v_i, v_j, r, adaptr=False, ratio=10): + """ from to vertices to T + + Arguments: + v_i {} -- [description] + v_j {[type]} -- [description] + """ + xaxis = np.array([1, 0, 0]) + v = (v_i + v_j)/2 + direc = (v_i - v_j) + length = np.linalg.norm(direc) + direc = direc/length + rotdir = np.cross(xaxis, direc) + rotdir = rotdir/np.linalg.norm(rotdir) + rotdir = rotdir * np.arccos(np.dot(direc, xaxis)) + rotmat, _ = cv2.Rodrigues(rotdir) + # set the minimal radius for the finger and face + shrink = max(length/ratio, 0.005) + eigval = np.array([[length/2/r, 0, 0], [0, shrink, 0], [0, 0, shrink]]) + T = np.eye(4) + T[:3,:3] = rotmat @ eigval @ rotmat.T + T[:3, 3] = v + return T, r, length + +class SkelModel: + def __init__(self, nJoints, kintree) -> None: + self.nJoints = nJoints + self.kintree = kintree + cur_dir = os.path.dirname(__file__) + faces = np.loadtxt(join(cur_dir, 'sphere_faces_20.txt'), dtype=np.int) + self.vertices = np.loadtxt(join(cur_dir, 'sphere_vertices_20.txt')) + # compose faces + faces_all = [] + for nj in range(nJoints): + faces_all.append(faces + nj*self.vertices.shape[0]) + for nk in range(len(kintree)): + faces_all.append(faces + nJoints*self.vertices.shape[0] + nk*self.vertices.shape[0]) + self.faces = np.vstack(faces_all) + + def __call__(self, keypoints3d, id=0, return_verts=True, return_tensor=False): + vertices_all = [] + r = 0.02 + # joints + for nj in range(self.nJoints): + if nj > 25: + r_ = r * 0.4 + else: + r_ = r + if keypoints3d[nj, -1] < 0.01: + vertices_all.append(self.vertices*0.001) + continue + vertices_all.append(self.vertices*r_ + keypoints3d[nj:nj+1, :3]) + # limb + for nk, (i, j) in enumerate(self.kintree): + if keypoints3d[i][-1] < 0.1 or keypoints3d[j][-1] < 0.1: + vertices_all.append(self.vertices*0.001) + continue + T, _, length = calTransformation(keypoints3d[i, :3], keypoints3d[j, :3], r=1) + if length > 2: # 超过两米的 + vertices_all.append(self.vertices*0.001) + continue + vertices = self.vertices @ T[:3, :3].T + T[:3, 3:].T + vertices_all.append(vertices) + vertices = np.vstack(vertices_all) + return vertices[None, :, :] \ No newline at end of file diff --git a/easymocap/visualize/sphere_faces_20.txt b/easymocap/visualize/sphere_faces_20.txt new file mode 100644 index 0000000..8e5c762 --- /dev/null +++ b/easymocap/visualize/sphere_faces_20.txt @@ -0,0 +1,1520 @@ +0 2 3 +1 723 722 +0 3 4 +1 724 723 +0 4 5 +1 725 724 +0 5 6 +1 726 725 +0 6 7 +1 727 726 +0 7 8 +1 728 727 +0 8 9 +1 729 728 +0 9 10 +1 730 729 +0 10 11 +1 731 730 +0 11 12 +1 732 731 +0 12 13 +1 733 732 +0 13 14 +1 734 733 +0 14 15 +1 735 734 +0 15 16 +1 736 735 +0 16 17 +1 737 736 +0 17 18 +1 738 737 +0 18 19 +1 739 738 +0 19 20 +1 740 739 +0 20 21 +1 741 740 +0 21 22 +1 742 741 +0 22 23 +1 743 742 +0 23 24 +1 744 743 +0 24 25 +1 745 744 +0 25 26 +1 746 745 +0 26 27 +1 747 746 +0 27 28 +1 748 747 +0 28 29 +1 749 748 +0 29 30 +1 750 749 +0 30 31 +1 751 750 +0 31 32 +1 752 751 +0 32 33 +1 753 752 +0 33 34 +1 754 753 +0 34 35 +1 755 754 +0 35 36 +1 756 755 +0 36 37 +1 757 756 +0 37 38 +1 758 757 +0 38 39 +1 759 758 +0 39 40 +1 760 759 +0 40 41 +1 761 760 +0 41 2 +1 722 761 +42 3 2 +42 43 3 +43 4 3 +43 44 4 +44 5 4 +44 45 5 +45 6 5 +45 46 6 +46 7 6 +46 47 7 +47 8 7 +47 48 8 +48 9 8 +48 49 9 +49 10 9 +49 50 10 +50 11 10 +50 51 11 +51 12 11 +51 52 12 +52 13 12 +52 53 13 +53 14 13 +53 54 14 +54 15 14 +54 55 15 +55 16 15 +55 56 16 +56 17 16 +56 57 17 +57 18 17 +57 58 18 +58 19 18 +58 59 19 +59 20 19 +59 60 20 +60 21 20 +60 61 21 +61 22 21 +61 62 22 +62 23 22 +62 63 23 +63 24 23 +63 64 24 +64 25 24 +64 65 25 +65 26 25 +65 66 26 +66 27 26 +66 67 27 +67 28 27 +67 68 28 +68 29 28 +68 69 29 +69 30 29 +69 70 30 +70 31 30 +70 71 31 +71 32 31 +71 72 32 +72 33 32 +72 73 33 +73 34 33 +73 74 34 +74 35 34 +74 75 35 +75 36 35 +75 76 36 +76 37 36 +76 77 37 +77 38 37 +77 78 38 +78 39 38 +78 79 39 +79 40 39 +79 80 40 +80 41 40 +80 81 41 +81 2 41 +81 42 2 +82 43 42 +82 83 43 +83 44 43 +83 84 44 +84 45 44 +84 85 45 +85 46 45 +85 86 46 +86 47 46 +86 87 47 +87 48 47 +87 88 48 +88 49 48 +88 89 49 +89 50 49 +89 90 50 +90 51 50 +90 91 51 +91 52 51 +91 92 52 +92 53 52 +92 93 53 +93 54 53 +93 94 54 +94 55 54 +94 95 55 +95 56 55 +95 96 56 +96 57 56 +96 97 57 +97 58 57 +97 98 58 +98 59 58 +98 99 59 +99 60 59 +99 100 60 +100 61 60 +100 101 61 +101 62 61 +101 102 62 +102 63 62 +102 103 63 +103 64 63 +103 104 64 +104 65 64 +104 105 65 +105 66 65 +105 106 66 +106 67 66 +106 107 67 +107 68 67 +107 108 68 +108 69 68 +108 109 69 +109 70 69 +109 110 70 +110 71 70 +110 111 71 +111 72 71 +111 112 72 +112 73 72 +112 113 73 +113 74 73 +113 114 74 +114 75 74 +114 115 75 +115 76 75 +115 116 76 +116 77 76 +116 117 77 +117 78 77 +117 118 78 +118 79 78 +118 119 79 +119 80 79 +119 120 80 +120 81 80 +120 121 81 +121 42 81 +121 82 42 +122 83 82 +122 123 83 +123 84 83 +123 124 84 +124 85 84 +124 125 85 +125 86 85 +125 126 86 +126 87 86 +126 127 87 +127 88 87 +127 128 88 +128 89 88 +128 129 89 +129 90 89 +129 130 90 +130 91 90 +130 131 91 +131 92 91 +131 132 92 +132 93 92 +132 133 93 +133 94 93 +133 134 94 +134 95 94 +134 135 95 +135 96 95 +135 136 96 +136 97 96 +136 137 97 +137 98 97 +137 138 98 +138 99 98 +138 139 99 +139 100 99 +139 140 100 +140 101 100 +140 141 101 +141 102 101 +141 142 102 +142 103 102 +142 143 103 +143 104 103 +143 144 104 +144 105 104 +144 145 105 +145 106 105 +145 146 106 +146 107 106 +146 147 107 +147 108 107 +147 148 108 +148 109 108 +148 149 109 +149 110 109 +149 150 110 +150 111 110 +150 151 111 +151 112 111 +151 152 112 +152 113 112 +152 153 113 +153 114 113 +153 154 114 +154 115 114 +154 155 115 +155 116 115 +155 156 116 +156 117 116 +156 157 117 +157 118 117 +157 158 118 +158 119 118 +158 159 119 +159 120 119 +159 160 120 +160 121 120 +160 161 121 +161 82 121 +161 122 82 +162 123 122 +162 163 123 +163 124 123 +163 164 124 +164 125 124 +164 165 125 +165 126 125 +165 166 126 +166 127 126 +166 167 127 +167 128 127 +167 168 128 +168 129 128 +168 169 129 +169 130 129 +169 170 130 +170 131 130 +170 171 131 +171 132 131 +171 172 132 +172 133 132 +172 173 133 +173 134 133 +173 174 134 +174 135 134 +174 175 135 +175 136 135 +175 176 136 +176 137 136 +176 177 137 +177 138 137 +177 178 138 +178 139 138 +178 179 139 +179 140 139 +179 180 140 +180 141 140 +180 181 141 +181 142 141 +181 182 142 +182 143 142 +182 183 143 +183 144 143 +183 184 144 +184 145 144 +184 185 145 +185 146 145 +185 186 146 +186 147 146 +186 187 147 +187 148 147 +187 188 148 +188 149 148 +188 189 149 +189 150 149 +189 190 150 +190 151 150 +190 191 151 +191 152 151 +191 192 152 +192 153 152 +192 193 153 +193 154 153 +193 194 154 +194 155 154 +194 195 155 +195 156 155 +195 196 156 +196 157 156 +196 197 157 +197 158 157 +197 198 158 +198 159 158 +198 199 159 +199 160 159 +199 200 160 +200 161 160 +200 201 161 +201 122 161 +201 162 122 +202 163 162 +202 203 163 +203 164 163 +203 204 164 +204 165 164 +204 205 165 +205 166 165 +205 206 166 +206 167 166 +206 207 167 +207 168 167 +207 208 168 +208 169 168 +208 209 169 +209 170 169 +209 210 170 +210 171 170 +210 211 171 +211 172 171 +211 212 172 +212 173 172 +212 213 173 +213 174 173 +213 214 174 +214 175 174 +214 215 175 +215 176 175 +215 216 176 +216 177 176 +216 217 177 +217 178 177 +217 218 178 +218 179 178 +218 219 179 +219 180 179 +219 220 180 +220 181 180 +220 221 181 +221 182 181 +221 222 182 +222 183 182 +222 223 183 +223 184 183 +223 224 184 +224 185 184 +224 225 185 +225 186 185 +225 226 186 +226 187 186 +226 227 187 +227 188 187 +227 228 188 +228 189 188 +228 229 189 +229 190 189 +229 230 190 +230 191 190 +230 231 191 +231 192 191 +231 232 192 +232 193 192 +232 233 193 +233 194 193 +233 234 194 +234 195 194 +234 235 195 +235 196 195 +235 236 196 +236 197 196 +236 237 197 +237 198 197 +237 238 198 +238 199 198 +238 239 199 +239 200 199 +239 240 200 +240 201 200 +240 241 201 +241 162 201 +241 202 162 +242 203 202 +242 243 203 +243 204 203 +243 244 204 +244 205 204 +244 245 205 +245 206 205 +245 246 206 +246 207 206 +246 247 207 +247 208 207 +247 248 208 +248 209 208 +248 249 209 +249 210 209 +249 250 210 +250 211 210 +250 251 211 +251 212 211 +251 252 212 +252 213 212 +252 253 213 +253 214 213 +253 254 214 +254 215 214 +254 255 215 +255 216 215 +255 256 216 +256 217 216 +256 257 217 +257 218 217 +257 258 218 +258 219 218 +258 259 219 +259 220 219 +259 260 220 +260 221 220 +260 261 221 +261 222 221 +261 262 222 +262 223 222 +262 263 223 +263 224 223 +263 264 224 +264 225 224 +264 265 225 +265 226 225 +265 266 226 +266 227 226 +266 267 227 +267 228 227 +267 268 228 +268 229 228 +268 269 229 +269 230 229 +269 270 230 +270 231 230 +270 271 231 +271 232 231 +271 272 232 +272 233 232 +272 273 233 +273 234 233 +273 274 234 +274 235 234 +274 275 235 +275 236 235 +275 276 236 +276 237 236 +276 277 237 +277 238 237 +277 278 238 +278 239 238 +278 279 239 +279 240 239 +279 280 240 +280 241 240 +280 281 241 +281 202 241 +281 242 202 +282 243 242 +282 283 243 +283 244 243 +283 284 244 +284 245 244 +284 285 245 +285 246 245 +285 286 246 +286 247 246 +286 287 247 +287 248 247 +287 288 248 +288 249 248 +288 289 249 +289 250 249 +289 290 250 +290 251 250 +290 291 251 +291 252 251 +291 292 252 +292 253 252 +292 293 253 +293 254 253 +293 294 254 +294 255 254 +294 295 255 +295 256 255 +295 296 256 +296 257 256 +296 297 257 +297 258 257 +297 298 258 +298 259 258 +298 299 259 +299 260 259 +299 300 260 +300 261 260 +300 301 261 +301 262 261 +301 302 262 +302 263 262 +302 303 263 +303 264 263 +303 304 264 +304 265 264 +304 305 265 +305 266 265 +305 306 266 +306 267 266 +306 307 267 +307 268 267 +307 308 268 +308 269 268 +308 309 269 +309 270 269 +309 310 270 +310 271 270 +310 311 271 +311 272 271 +311 312 272 +312 273 272 +312 313 273 +313 274 273 +313 314 274 +314 275 274 +314 315 275 +315 276 275 +315 316 276 +316 277 276 +316 317 277 +317 278 277 +317 318 278 +318 279 278 +318 319 279 +319 280 279 +319 320 280 +320 281 280 +320 321 281 +321 242 281 +321 282 242 +322 283 282 +322 323 283 +323 284 283 +323 324 284 +324 285 284 +324 325 285 +325 286 285 +325 326 286 +326 287 286 +326 327 287 +327 288 287 +327 328 288 +328 289 288 +328 329 289 +329 290 289 +329 330 290 +330 291 290 +330 331 291 +331 292 291 +331 332 292 +332 293 292 +332 333 293 +333 294 293 +333 334 294 +334 295 294 +334 335 295 +335 296 295 +335 336 296 +336 297 296 +336 337 297 +337 298 297 +337 338 298 +338 299 298 +338 339 299 +339 300 299 +339 340 300 +340 301 300 +340 341 301 +341 302 301 +341 342 302 +342 303 302 +342 343 303 +343 304 303 +343 344 304 +344 305 304 +344 345 305 +345 306 305 +345 346 306 +346 307 306 +346 347 307 +347 308 307 +347 348 308 +348 309 308 +348 349 309 +349 310 309 +349 350 310 +350 311 310 +350 351 311 +351 312 311 +351 352 312 +352 313 312 +352 353 313 +353 314 313 +353 354 314 +354 315 314 +354 355 315 +355 316 315 +355 356 316 +356 317 316 +356 357 317 +357 318 317 +357 358 318 +358 319 318 +358 359 319 +359 320 319 +359 360 320 +360 321 320 +360 361 321 +361 282 321 +361 322 282 +362 323 322 +362 363 323 +363 324 323 +363 364 324 +364 325 324 +364 365 325 +365 326 325 +365 366 326 +366 327 326 +366 367 327 +367 328 327 +367 368 328 +368 329 328 +368 369 329 +369 330 329 +369 370 330 +370 331 330 +370 371 331 +371 332 331 +371 372 332 +372 333 332 +372 373 333 +373 334 333 +373 374 334 +374 335 334 +374 375 335 +375 336 335 +375 376 336 +376 337 336 +376 377 337 +377 338 337 +377 378 338 +378 339 338 +378 379 339 +379 340 339 +379 380 340 +380 341 340 +380 381 341 +381 342 341 +381 382 342 +382 343 342 +382 383 343 +383 344 343 +383 384 344 +384 345 344 +384 385 345 +385 346 345 +385 386 346 +386 347 346 +386 387 347 +387 348 347 +387 388 348 +388 349 348 +388 389 349 +389 350 349 +389 390 350 +390 351 350 +390 391 351 +391 352 351 +391 392 352 +392 353 352 +392 393 353 +393 354 353 +393 394 354 +394 355 354 +394 395 355 +395 356 355 +395 396 356 +396 357 356 +396 397 357 +397 358 357 +397 398 358 +398 359 358 +398 399 359 +399 360 359 +399 400 360 +400 361 360 +400 401 361 +401 322 361 +401 362 322 +402 363 362 +402 403 363 +403 364 363 +403 404 364 +404 365 364 +404 405 365 +405 366 365 +405 406 366 +406 367 366 +406 407 367 +407 368 367 +407 408 368 +408 369 368 +408 409 369 +409 370 369 +409 410 370 +410 371 370 +410 411 371 +411 372 371 +411 412 372 +412 373 372 +412 413 373 +413 374 373 +413 414 374 +414 375 374 +414 415 375 +415 376 375 +415 416 376 +416 377 376 +416 417 377 +417 378 377 +417 418 378 +418 379 378 +418 419 379 +419 380 379 +419 420 380 +420 381 380 +420 421 381 +421 382 381 +421 422 382 +422 383 382 +422 423 383 +423 384 383 +423 424 384 +424 385 384 +424 425 385 +425 386 385 +425 426 386 +426 387 386 +426 427 387 +427 388 387 +427 428 388 +428 389 388 +428 429 389 +429 390 389 +429 430 390 +430 391 390 +430 431 391 +431 392 391 +431 432 392 +432 393 392 +432 433 393 +433 394 393 +433 434 394 +434 395 394 +434 435 395 +435 396 395 +435 436 396 +436 397 396 +436 437 397 +437 398 397 +437 438 398 +438 399 398 +438 439 399 +439 400 399 +439 440 400 +440 401 400 +440 441 401 +441 362 401 +441 402 362 +442 403 402 +442 443 403 +443 404 403 +443 444 404 +444 405 404 +444 445 405 +445 406 405 +445 446 406 +446 407 406 +446 447 407 +447 408 407 +447 448 408 +448 409 408 +448 449 409 +449 410 409 +449 450 410 +450 411 410 +450 451 411 +451 412 411 +451 452 412 +452 413 412 +452 453 413 +453 414 413 +453 454 414 +454 415 414 +454 455 415 +455 416 415 +455 456 416 +456 417 416 +456 457 417 +457 418 417 +457 458 418 +458 419 418 +458 459 419 +459 420 419 +459 460 420 +460 421 420 +460 461 421 +461 422 421 +461 462 422 +462 423 422 +462 463 423 +463 424 423 +463 464 424 +464 425 424 +464 465 425 +465 426 425 +465 466 426 +466 427 426 +466 467 427 +467 428 427 +467 468 428 +468 429 428 +468 469 429 +469 430 429 +469 470 430 +470 431 430 +470 471 431 +471 432 431 +471 472 432 +472 433 432 +472 473 433 +473 434 433 +473 474 434 +474 435 434 +474 475 435 +475 436 435 +475 476 436 +476 437 436 +476 477 437 +477 438 437 +477 478 438 +478 439 438 +478 479 439 +479 440 439 +479 480 440 +480 441 440 +480 481 441 +481 402 441 +481 442 402 +482 443 442 +482 483 443 +483 444 443 +483 484 444 +484 445 444 +484 485 445 +485 446 445 +485 486 446 +486 447 446 +486 487 447 +487 448 447 +487 488 448 +488 449 448 +488 489 449 +489 450 449 +489 490 450 +490 451 450 +490 491 451 +491 452 451 +491 492 452 +492 453 452 +492 493 453 +493 454 453 +493 494 454 +494 455 454 +494 495 455 +495 456 455 +495 496 456 +496 457 456 +496 497 457 +497 458 457 +497 498 458 +498 459 458 +498 499 459 +499 460 459 +499 500 460 +500 461 460 +500 501 461 +501 462 461 +501 502 462 +502 463 462 +502 503 463 +503 464 463 +503 504 464 +504 465 464 +504 505 465 +505 466 465 +505 506 466 +506 467 466 +506 507 467 +507 468 467 +507 508 468 +508 469 468 +508 509 469 +509 470 469 +509 510 470 +510 471 470 +510 511 471 +511 472 471 +511 512 472 +512 473 472 +512 513 473 +513 474 473 +513 514 474 +514 475 474 +514 515 475 +515 476 475 +515 516 476 +516 477 476 +516 517 477 +517 478 477 +517 518 478 +518 479 478 +518 519 479 +519 480 479 +519 520 480 +520 481 480 +520 521 481 +521 442 481 +521 482 442 +522 483 482 +522 523 483 +523 484 483 +523 524 484 +524 485 484 +524 525 485 +525 486 485 +525 526 486 +526 487 486 +526 527 487 +527 488 487 +527 528 488 +528 489 488 +528 529 489 +529 490 489 +529 530 490 +530 491 490 +530 531 491 +531 492 491 +531 532 492 +532 493 492 +532 533 493 +533 494 493 +533 534 494 +534 495 494 +534 535 495 +535 496 495 +535 536 496 +536 497 496 +536 537 497 +537 498 497 +537 538 498 +538 499 498 +538 539 499 +539 500 499 +539 540 500 +540 501 500 +540 541 501 +541 502 501 +541 542 502 +542 503 502 +542 543 503 +543 504 503 +543 544 504 +544 505 504 +544 545 505 +545 506 505 +545 546 506 +546 507 506 +546 547 507 +547 508 507 +547 548 508 +548 509 508 +548 549 509 +549 510 509 +549 550 510 +550 511 510 +550 551 511 +551 512 511 +551 552 512 +552 513 512 +552 553 513 +553 514 513 +553 554 514 +554 515 514 +554 555 515 +555 516 515 +555 556 516 +556 517 516 +556 557 517 +557 518 517 +557 558 518 +558 519 518 +558 559 519 +559 520 519 +559 560 520 +560 521 520 +560 561 521 +561 482 521 +561 522 482 +562 523 522 +562 563 523 +563 524 523 +563 564 524 +564 525 524 +564 565 525 +565 526 525 +565 566 526 +566 527 526 +566 567 527 +567 528 527 +567 568 528 +568 529 528 +568 569 529 +569 530 529 +569 570 530 +570 531 530 +570 571 531 +571 532 531 +571 572 532 +572 533 532 +572 573 533 +573 534 533 +573 574 534 +574 535 534 +574 575 535 +575 536 535 +575 576 536 +576 537 536 +576 577 537 +577 538 537 +577 578 538 +578 539 538 +578 579 539 +579 540 539 +579 580 540 +580 541 540 +580 581 541 +581 542 541 +581 582 542 +582 543 542 +582 583 543 +583 544 543 +583 584 544 +584 545 544 +584 585 545 +585 546 545 +585 586 546 +586 547 546 +586 587 547 +587 548 547 +587 588 548 +588 549 548 +588 589 549 +589 550 549 +589 590 550 +590 551 550 +590 591 551 +591 552 551 +591 592 552 +592 553 552 +592 593 553 +593 554 553 +593 594 554 +594 555 554 +594 595 555 +595 556 555 +595 596 556 +596 557 556 +596 597 557 +597 558 557 +597 598 558 +598 559 558 +598 599 559 +599 560 559 +599 600 560 +600 561 560 +600 601 561 +601 522 561 +601 562 522 +602 563 562 +602 603 563 +603 564 563 +603 604 564 +604 565 564 +604 605 565 +605 566 565 +605 606 566 +606 567 566 +606 607 567 +607 568 567 +607 608 568 +608 569 568 +608 609 569 +609 570 569 +609 610 570 +610 571 570 +610 611 571 +611 572 571 +611 612 572 +612 573 572 +612 613 573 +613 574 573 +613 614 574 +614 575 574 +614 615 575 +615 576 575 +615 616 576 +616 577 576 +616 617 577 +617 578 577 +617 618 578 +618 579 578 +618 619 579 +619 580 579 +619 620 580 +620 581 580 +620 621 581 +621 582 581 +621 622 582 +622 583 582 +622 623 583 +623 584 583 +623 624 584 +624 585 584 +624 625 585 +625 586 585 +625 626 586 +626 587 586 +626 627 587 +627 588 587 +627 628 588 +628 589 588 +628 629 589 +629 590 589 +629 630 590 +630 591 590 +630 631 591 +631 592 591 +631 632 592 +632 593 592 +632 633 593 +633 594 593 +633 634 594 +634 595 594 +634 635 595 +635 596 595 +635 636 596 +636 597 596 +636 637 597 +637 598 597 +637 638 598 +638 599 598 +638 639 599 +639 600 599 +639 640 600 +640 601 600 +640 641 601 +641 562 601 +641 602 562 +642 603 602 +642 643 603 +643 604 603 +643 644 604 +644 605 604 +644 645 605 +645 606 605 +645 646 606 +646 607 606 +646 647 607 +647 608 607 +647 648 608 +648 609 608 +648 649 609 +649 610 609 +649 650 610 +650 611 610 +650 651 611 +651 612 611 +651 652 612 +652 613 612 +652 653 613 +653 614 613 +653 654 614 +654 615 614 +654 655 615 +655 616 615 +655 656 616 +656 617 616 +656 657 617 +657 618 617 +657 658 618 +658 619 618 +658 659 619 +659 620 619 +659 660 620 +660 621 620 +660 661 621 +661 622 621 +661 662 622 +662 623 622 +662 663 623 +663 624 623 +663 664 624 +664 625 624 +664 665 625 +665 626 625 +665 666 626 +666 627 626 +666 667 627 +667 628 627 +667 668 628 +668 629 628 +668 669 629 +669 630 629 +669 670 630 +670 631 630 +670 671 631 +671 632 631 +671 672 632 +672 633 632 +672 673 633 +673 634 633 +673 674 634 +674 635 634 +674 675 635 +675 636 635 +675 676 636 +676 637 636 +676 677 637 +677 638 637 +677 678 638 +678 639 638 +678 679 639 +679 640 639 +679 680 640 +680 641 640 +680 681 641 +681 602 641 +681 642 602 +682 643 642 +682 683 643 +683 644 643 +683 684 644 +684 645 644 +684 685 645 +685 646 645 +685 686 646 +686 647 646 +686 687 647 +687 648 647 +687 688 648 +688 649 648 +688 689 649 +689 650 649 +689 690 650 +690 651 650 +690 691 651 +691 652 651 +691 692 652 +692 653 652 +692 693 653 +693 654 653 +693 694 654 +694 655 654 +694 695 655 +695 656 655 +695 696 656 +696 657 656 +696 697 657 +697 658 657 +697 698 658 +698 659 658 +698 699 659 +699 660 659 +699 700 660 +700 661 660 +700 701 661 +701 662 661 +701 702 662 +702 663 662 +702 703 663 +703 664 663 +703 704 664 +704 665 664 +704 705 665 +705 666 665 +705 706 666 +706 667 666 +706 707 667 +707 668 667 +707 708 668 +708 669 668 +708 709 669 +709 670 669 +709 710 670 +710 671 670 +710 711 671 +711 672 671 +711 712 672 +712 673 672 +712 713 673 +713 674 673 +713 714 674 +714 675 674 +714 715 675 +715 676 675 +715 716 676 +716 677 676 +716 717 677 +717 678 677 +717 718 678 +718 679 678 +718 719 679 +719 680 679 +719 720 680 +720 681 680 +720 721 681 +721 642 681 +721 682 642 +722 683 682 +722 723 683 +723 684 683 +723 724 684 +724 685 684 +724 725 685 +725 686 685 +725 726 686 +726 687 686 +726 727 687 +727 688 687 +727 728 688 +728 689 688 +728 729 689 +729 690 689 +729 730 690 +730 691 690 +730 731 691 +731 692 691 +731 732 692 +732 693 692 +732 733 693 +733 694 693 +733 734 694 +734 695 694 +734 735 695 +735 696 695 +735 736 696 +736 697 696 +736 737 697 +737 698 697 +737 738 698 +738 699 698 +738 739 699 +739 700 699 +739 740 700 +740 701 700 +740 741 701 +741 702 701 +741 742 702 +742 703 702 +742 743 703 +743 704 703 +743 744 704 +744 705 704 +744 745 705 +745 706 705 +745 746 706 +746 707 706 +746 747 707 +747 708 707 +747 748 708 +748 709 708 +748 749 709 +749 710 709 +749 750 710 +750 711 710 +750 751 711 +751 712 711 +751 752 712 +752 713 712 +752 753 713 +753 714 713 +753 754 714 +754 715 714 +754 755 715 +755 716 715 +755 756 716 +756 717 716 +756 757 717 +757 718 717 +757 758 718 +758 719 718 +758 759 719 +759 720 719 +759 760 720 +760 721 720 +760 761 721 +761 682 721 +761 722 682 diff --git a/easymocap/visualize/sphere_vertices_20.txt b/easymocap/visualize/sphere_vertices_20.txt new file mode 100644 index 0000000..bfa3b4f --- /dev/null +++ b/easymocap/visualize/sphere_vertices_20.txt @@ -0,0 +1,762 @@ +0.000 0.000 1.000 +0.000 0.000 -1.000 +0.156 0.000 0.988 +0.155 0.024 0.988 +0.149 0.048 0.988 +0.139 0.071 0.988 +0.127 0.092 0.988 +0.111 0.111 0.988 +0.092 0.127 0.988 +0.071 0.139 0.988 +0.048 0.149 0.988 +0.024 0.155 0.988 +0.000 0.156 0.988 +-0.024 0.155 0.988 +-0.048 0.149 0.988 +-0.071 0.139 0.988 +-0.092 0.127 0.988 +-0.111 0.111 0.988 +-0.127 0.092 0.988 +-0.139 0.071 0.988 +-0.149 0.048 0.988 +-0.155 0.024 0.988 +-0.156 0.000 0.988 +-0.155 -0.024 0.988 +-0.149 -0.048 0.988 +-0.139 -0.071 0.988 +-0.127 -0.092 0.988 +-0.111 -0.111 0.988 +-0.092 -0.127 0.988 +-0.071 -0.139 0.988 +-0.048 -0.149 0.988 +-0.024 -0.155 0.988 +-0.000 -0.156 0.988 +0.024 -0.155 0.988 +0.048 -0.149 0.988 +0.071 -0.139 0.988 +0.092 -0.127 0.988 +0.111 -0.111 0.988 +0.127 -0.092 0.988 +0.139 -0.071 0.988 +0.149 -0.048 0.988 +0.155 -0.024 0.988 +0.309 0.000 0.951 +0.305 0.048 0.951 +0.294 0.095 0.951 +0.275 0.140 0.951 +0.250 0.182 0.951 +0.219 0.219 0.951 +0.182 0.250 0.951 +0.140 0.275 0.951 +0.095 0.294 0.951 +0.048 0.305 0.951 +0.000 0.309 0.951 +-0.048 0.305 0.951 +-0.095 0.294 0.951 +-0.140 0.275 0.951 +-0.182 0.250 0.951 +-0.219 0.219 0.951 +-0.250 0.182 0.951 +-0.275 0.140 0.951 +-0.294 0.095 0.951 +-0.305 0.048 0.951 +-0.309 0.000 0.951 +-0.305 -0.048 0.951 +-0.294 -0.095 0.951 +-0.275 -0.140 0.951 +-0.250 -0.182 0.951 +-0.219 -0.219 0.951 +-0.182 -0.250 0.951 +-0.140 -0.275 0.951 +-0.095 -0.294 0.951 +-0.048 -0.305 0.951 +-0.000 -0.309 0.951 +0.048 -0.305 0.951 +0.095 -0.294 0.951 +0.140 -0.275 0.951 +0.182 -0.250 0.951 +0.219 -0.219 0.951 +0.250 -0.182 0.951 +0.275 -0.140 0.951 +0.294 -0.095 0.951 +0.305 -0.048 0.951 +0.454 0.000 0.891 +0.448 0.071 0.891 +0.432 0.140 0.891 +0.405 0.206 0.891 +0.367 0.267 0.891 +0.321 0.321 0.891 +0.267 0.367 0.891 +0.206 0.405 0.891 +0.140 0.432 0.891 +0.071 0.448 0.891 +0.000 0.454 0.891 +-0.071 0.448 0.891 +-0.140 0.432 0.891 +-0.206 0.405 0.891 +-0.267 0.367 0.891 +-0.321 0.321 0.891 +-0.367 0.267 0.891 +-0.405 0.206 0.891 +-0.432 0.140 0.891 +-0.448 0.071 0.891 +-0.454 0.000 0.891 +-0.448 -0.071 0.891 +-0.432 -0.140 0.891 +-0.405 -0.206 0.891 +-0.367 -0.267 0.891 +-0.321 -0.321 0.891 +-0.267 -0.367 0.891 +-0.206 -0.405 0.891 +-0.140 -0.432 0.891 +-0.071 -0.448 0.891 +-0.000 -0.454 0.891 +0.071 -0.448 0.891 +0.140 -0.432 0.891 +0.206 -0.405 0.891 +0.267 -0.367 0.891 +0.321 -0.321 0.891 +0.367 -0.267 0.891 +0.405 -0.206 0.891 +0.432 -0.140 0.891 +0.448 -0.071 0.891 +0.588 0.000 0.809 +0.581 0.092 0.809 +0.559 0.182 0.809 +0.524 0.267 0.809 +0.476 0.345 0.809 +0.416 0.416 0.809 +0.345 0.476 0.809 +0.267 0.524 0.809 +0.182 0.559 0.809 +0.092 0.581 0.809 +0.000 0.588 0.809 +-0.092 0.581 0.809 +-0.182 0.559 0.809 +-0.267 0.524 0.809 +-0.345 0.476 0.809 +-0.416 0.416 0.809 +-0.476 0.345 0.809 +-0.524 0.267 0.809 +-0.559 0.182 0.809 +-0.581 0.092 0.809 +-0.588 0.000 0.809 +-0.581 -0.092 0.809 +-0.559 -0.182 0.809 +-0.524 -0.267 0.809 +-0.476 -0.345 0.809 +-0.416 -0.416 0.809 +-0.345 -0.476 0.809 +-0.267 -0.524 0.809 +-0.182 -0.559 0.809 +-0.092 -0.581 0.809 +-0.000 -0.588 0.809 +0.092 -0.581 0.809 +0.182 -0.559 0.809 +0.267 -0.524 0.809 +0.345 -0.476 0.809 +0.416 -0.416 0.809 +0.476 -0.345 0.809 +0.524 -0.267 0.809 +0.559 -0.182 0.809 +0.581 -0.092 0.809 +0.707 0.000 0.707 +0.698 0.111 0.707 +0.672 0.219 0.707 +0.630 0.321 0.707 +0.572 0.416 0.707 +0.500 0.500 0.707 +0.416 0.572 0.707 +0.321 0.630 0.707 +0.219 0.672 0.707 +0.111 0.698 0.707 +0.000 0.707 0.707 +-0.111 0.698 0.707 +-0.219 0.672 0.707 +-0.321 0.630 0.707 +-0.416 0.572 0.707 +-0.500 0.500 0.707 +-0.572 0.416 0.707 +-0.630 0.321 0.707 +-0.672 0.219 0.707 +-0.698 0.111 0.707 +-0.707 0.000 0.707 +-0.698 -0.111 0.707 +-0.672 -0.219 0.707 +-0.630 -0.321 0.707 +-0.572 -0.416 0.707 +-0.500 -0.500 0.707 +-0.416 -0.572 0.707 +-0.321 -0.630 0.707 +-0.219 -0.672 0.707 +-0.111 -0.698 0.707 +-0.000 -0.707 0.707 +0.111 -0.698 0.707 +0.219 -0.672 0.707 +0.321 -0.630 0.707 +0.416 -0.572 0.707 +0.500 -0.500 0.707 +0.572 -0.416 0.707 +0.630 -0.321 0.707 +0.672 -0.219 0.707 +0.698 -0.111 0.707 +0.809 0.000 0.588 +0.799 0.127 0.588 +0.769 0.250 0.588 +0.721 0.367 0.588 +0.655 0.476 0.588 +0.572 0.572 0.588 +0.476 0.655 0.588 +0.367 0.721 0.588 +0.250 0.769 0.588 +0.127 0.799 0.588 +0.000 0.809 0.588 +-0.127 0.799 0.588 +-0.250 0.769 0.588 +-0.367 0.721 0.588 +-0.476 0.655 0.588 +-0.572 0.572 0.588 +-0.655 0.476 0.588 +-0.721 0.367 0.588 +-0.769 0.250 0.588 +-0.799 0.127 0.588 +-0.809 0.000 0.588 +-0.799 -0.127 0.588 +-0.769 -0.250 0.588 +-0.721 -0.367 0.588 +-0.655 -0.476 0.588 +-0.572 -0.572 0.588 +-0.476 -0.655 0.588 +-0.367 -0.721 0.588 +-0.250 -0.769 0.588 +-0.127 -0.799 0.588 +-0.000 -0.809 0.588 +0.127 -0.799 0.588 +0.250 -0.769 0.588 +0.367 -0.721 0.588 +0.476 -0.655 0.588 +0.572 -0.572 0.588 +0.655 -0.476 0.588 +0.721 -0.367 0.588 +0.769 -0.250 0.588 +0.799 -0.127 0.588 +0.891 0.000 0.454 +0.880 0.139 0.454 +0.847 0.275 0.454 +0.794 0.405 0.454 +0.721 0.524 0.454 +0.630 0.630 0.454 +0.524 0.721 0.454 +0.405 0.794 0.454 +0.275 0.847 0.454 +0.139 0.880 0.454 +0.000 0.891 0.454 +-0.139 0.880 0.454 +-0.275 0.847 0.454 +-0.405 0.794 0.454 +-0.524 0.721 0.454 +-0.630 0.630 0.454 +-0.721 0.524 0.454 +-0.794 0.405 0.454 +-0.847 0.275 0.454 +-0.880 0.139 0.454 +-0.891 0.000 0.454 +-0.880 -0.139 0.454 +-0.847 -0.275 0.454 +-0.794 -0.405 0.454 +-0.721 -0.524 0.454 +-0.630 -0.630 0.454 +-0.524 -0.721 0.454 +-0.405 -0.794 0.454 +-0.275 -0.847 0.454 +-0.139 -0.880 0.454 +-0.000 -0.891 0.454 +0.139 -0.880 0.454 +0.275 -0.847 0.454 +0.405 -0.794 0.454 +0.524 -0.721 0.454 +0.630 -0.630 0.454 +0.721 -0.524 0.454 +0.794 -0.405 0.454 +0.847 -0.275 0.454 +0.880 -0.139 0.454 +0.951 0.000 0.309 +0.939 0.149 0.309 +0.905 0.294 0.309 +0.847 0.432 0.309 +0.769 0.559 0.309 +0.672 0.672 0.309 +0.559 0.769 0.309 +0.432 0.847 0.309 +0.294 0.905 0.309 +0.149 0.939 0.309 +0.000 0.951 0.309 +-0.149 0.939 0.309 +-0.294 0.905 0.309 +-0.432 0.847 0.309 +-0.559 0.769 0.309 +-0.672 0.672 0.309 +-0.769 0.559 0.309 +-0.847 0.432 0.309 +-0.905 0.294 0.309 +-0.939 0.149 0.309 +-0.951 0.000 0.309 +-0.939 -0.149 0.309 +-0.905 -0.294 0.309 +-0.847 -0.432 0.309 +-0.769 -0.559 0.309 +-0.672 -0.672 0.309 +-0.559 -0.769 0.309 +-0.432 -0.847 0.309 +-0.294 -0.905 0.309 +-0.149 -0.939 0.309 +-0.000 -0.951 0.309 +0.149 -0.939 0.309 +0.294 -0.905 0.309 +0.432 -0.847 0.309 +0.559 -0.769 0.309 +0.672 -0.672 0.309 +0.769 -0.559 0.309 +0.847 -0.432 0.309 +0.905 -0.294 0.309 +0.939 -0.149 0.309 +0.988 0.000 0.156 +0.976 0.155 0.156 +0.939 0.305 0.156 +0.880 0.448 0.156 +0.799 0.581 0.156 +0.698 0.698 0.156 +0.581 0.799 0.156 +0.448 0.880 0.156 +0.305 0.939 0.156 +0.155 0.976 0.156 +0.000 0.988 0.156 +-0.155 0.976 0.156 +-0.305 0.939 0.156 +-0.448 0.880 0.156 +-0.581 0.799 0.156 +-0.698 0.698 0.156 +-0.799 0.581 0.156 +-0.880 0.448 0.156 +-0.939 0.305 0.156 +-0.976 0.155 0.156 +-0.988 0.000 0.156 +-0.976 -0.155 0.156 +-0.939 -0.305 0.156 +-0.880 -0.448 0.156 +-0.799 -0.581 0.156 +-0.698 -0.698 0.156 +-0.581 -0.799 0.156 +-0.448 -0.880 0.156 +-0.305 -0.939 0.156 +-0.155 -0.976 0.156 +-0.000 -0.988 0.156 +0.155 -0.976 0.156 +0.305 -0.939 0.156 +0.448 -0.880 0.156 +0.581 -0.799 0.156 +0.698 -0.698 0.156 +0.799 -0.581 0.156 +0.880 -0.448 0.156 +0.939 -0.305 0.156 +0.976 -0.155 0.156 +1.000 0.000 0.000 +0.988 0.156 0.000 +0.951 0.309 0.000 +0.891 0.454 0.000 +0.809 0.588 0.000 +0.707 0.707 0.000 +0.588 0.809 0.000 +0.454 0.891 0.000 +0.309 0.951 0.000 +0.156 0.988 0.000 +0.000 1.000 0.000 +-0.156 0.988 0.000 +-0.309 0.951 0.000 +-0.454 0.891 0.000 +-0.588 0.809 0.000 +-0.707 0.707 0.000 +-0.809 0.588 0.000 +-0.891 0.454 0.000 +-0.951 0.309 0.000 +-0.988 0.156 0.000 +-1.000 0.000 0.000 +-0.988 -0.156 0.000 +-0.951 -0.309 0.000 +-0.891 -0.454 0.000 +-0.809 -0.588 0.000 +-0.707 -0.707 0.000 +-0.588 -0.809 0.000 +-0.454 -0.891 0.000 +-0.309 -0.951 0.000 +-0.156 -0.988 0.000 +-0.000 -1.000 0.000 +0.156 -0.988 0.000 +0.309 -0.951 0.000 +0.454 -0.891 0.000 +0.588 -0.809 0.000 +0.707 -0.707 0.000 +0.809 -0.588 0.000 +0.891 -0.454 0.000 +0.951 -0.309 0.000 +0.988 -0.156 0.000 +0.988 0.000 -0.156 +0.976 0.155 -0.156 +0.939 0.305 -0.156 +0.880 0.448 -0.156 +0.799 0.581 -0.156 +0.698 0.698 -0.156 +0.581 0.799 -0.156 +0.448 0.880 -0.156 +0.305 0.939 -0.156 +0.155 0.976 -0.156 +0.000 0.988 -0.156 +-0.155 0.976 -0.156 +-0.305 0.939 -0.156 +-0.448 0.880 -0.156 +-0.581 0.799 -0.156 +-0.698 0.698 -0.156 +-0.799 0.581 -0.156 +-0.880 0.448 -0.156 +-0.939 0.305 -0.156 +-0.976 0.155 -0.156 +-0.988 0.000 -0.156 +-0.976 -0.155 -0.156 +-0.939 -0.305 -0.156 +-0.880 -0.448 -0.156 +-0.799 -0.581 -0.156 +-0.698 -0.698 -0.156 +-0.581 -0.799 -0.156 +-0.448 -0.880 -0.156 +-0.305 -0.939 -0.156 +-0.155 -0.976 -0.156 +-0.000 -0.988 -0.156 +0.155 -0.976 -0.156 +0.305 -0.939 -0.156 +0.448 -0.880 -0.156 +0.581 -0.799 -0.156 +0.698 -0.698 -0.156 +0.799 -0.581 -0.156 +0.880 -0.448 -0.156 +0.939 -0.305 -0.156 +0.976 -0.155 -0.156 +0.951 0.000 -0.309 +0.939 0.149 -0.309 +0.905 0.294 -0.309 +0.847 0.432 -0.309 +0.769 0.559 -0.309 +0.672 0.672 -0.309 +0.559 0.769 -0.309 +0.432 0.847 -0.309 +0.294 0.905 -0.309 +0.149 0.939 -0.309 +0.000 0.951 -0.309 +-0.149 0.939 -0.309 +-0.294 0.905 -0.309 +-0.432 0.847 -0.309 +-0.559 0.769 -0.309 +-0.672 0.672 -0.309 +-0.769 0.559 -0.309 +-0.847 0.432 -0.309 +-0.905 0.294 -0.309 +-0.939 0.149 -0.309 +-0.951 0.000 -0.309 +-0.939 -0.149 -0.309 +-0.905 -0.294 -0.309 +-0.847 -0.432 -0.309 +-0.769 -0.559 -0.309 +-0.672 -0.672 -0.309 +-0.559 -0.769 -0.309 +-0.432 -0.847 -0.309 +-0.294 -0.905 -0.309 +-0.149 -0.939 -0.309 +-0.000 -0.951 -0.309 +0.149 -0.939 -0.309 +0.294 -0.905 -0.309 +0.432 -0.847 -0.309 +0.559 -0.769 -0.309 +0.672 -0.672 -0.309 +0.769 -0.559 -0.309 +0.847 -0.432 -0.309 +0.905 -0.294 -0.309 +0.939 -0.149 -0.309 +0.891 0.000 -0.454 +0.880 0.139 -0.454 +0.847 0.275 -0.454 +0.794 0.405 -0.454 +0.721 0.524 -0.454 +0.630 0.630 -0.454 +0.524 0.721 -0.454 +0.405 0.794 -0.454 +0.275 0.847 -0.454 +0.139 0.880 -0.454 +0.000 0.891 -0.454 +-0.139 0.880 -0.454 +-0.275 0.847 -0.454 +-0.405 0.794 -0.454 +-0.524 0.721 -0.454 +-0.630 0.630 -0.454 +-0.721 0.524 -0.454 +-0.794 0.405 -0.454 +-0.847 0.275 -0.454 +-0.880 0.139 -0.454 +-0.891 0.000 -0.454 +-0.880 -0.139 -0.454 +-0.847 -0.275 -0.454 +-0.794 -0.405 -0.454 +-0.721 -0.524 -0.454 +-0.630 -0.630 -0.454 +-0.524 -0.721 -0.454 +-0.405 -0.794 -0.454 +-0.275 -0.847 -0.454 +-0.139 -0.880 -0.454 +-0.000 -0.891 -0.454 +0.139 -0.880 -0.454 +0.275 -0.847 -0.454 +0.405 -0.794 -0.454 +0.524 -0.721 -0.454 +0.630 -0.630 -0.454 +0.721 -0.524 -0.454 +0.794 -0.405 -0.454 +0.847 -0.275 -0.454 +0.880 -0.139 -0.454 +0.809 0.000 -0.588 +0.799 0.127 -0.588 +0.769 0.250 -0.588 +0.721 0.367 -0.588 +0.655 0.476 -0.588 +0.572 0.572 -0.588 +0.476 0.655 -0.588 +0.367 0.721 -0.588 +0.250 0.769 -0.588 +0.127 0.799 -0.588 +0.000 0.809 -0.588 +-0.127 0.799 -0.588 +-0.250 0.769 -0.588 +-0.367 0.721 -0.588 +-0.476 0.655 -0.588 +-0.572 0.572 -0.588 +-0.655 0.476 -0.588 +-0.721 0.367 -0.588 +-0.769 0.250 -0.588 +-0.799 0.127 -0.588 +-0.809 0.000 -0.588 +-0.799 -0.127 -0.588 +-0.769 -0.250 -0.588 +-0.721 -0.367 -0.588 +-0.655 -0.476 -0.588 +-0.572 -0.572 -0.588 +-0.476 -0.655 -0.588 +-0.367 -0.721 -0.588 +-0.250 -0.769 -0.588 +-0.127 -0.799 -0.588 +-0.000 -0.809 -0.588 +0.127 -0.799 -0.588 +0.250 -0.769 -0.588 +0.367 -0.721 -0.588 +0.476 -0.655 -0.588 +0.572 -0.572 -0.588 +0.655 -0.476 -0.588 +0.721 -0.367 -0.588 +0.769 -0.250 -0.588 +0.799 -0.127 -0.588 +0.707 0.000 -0.707 +0.698 0.111 -0.707 +0.672 0.219 -0.707 +0.630 0.321 -0.707 +0.572 0.416 -0.707 +0.500 0.500 -0.707 +0.416 0.572 -0.707 +0.321 0.630 -0.707 +0.219 0.672 -0.707 +0.111 0.698 -0.707 +0.000 0.707 -0.707 +-0.111 0.698 -0.707 +-0.219 0.672 -0.707 +-0.321 0.630 -0.707 +-0.416 0.572 -0.707 +-0.500 0.500 -0.707 +-0.572 0.416 -0.707 +-0.630 0.321 -0.707 +-0.672 0.219 -0.707 +-0.698 0.111 -0.707 +-0.707 0.000 -0.707 +-0.698 -0.111 -0.707 +-0.672 -0.219 -0.707 +-0.630 -0.321 -0.707 +-0.572 -0.416 -0.707 +-0.500 -0.500 -0.707 +-0.416 -0.572 -0.707 +-0.321 -0.630 -0.707 +-0.219 -0.672 -0.707 +-0.111 -0.698 -0.707 +-0.000 -0.707 -0.707 +0.111 -0.698 -0.707 +0.219 -0.672 -0.707 +0.321 -0.630 -0.707 +0.416 -0.572 -0.707 +0.500 -0.500 -0.707 +0.572 -0.416 -0.707 +0.630 -0.321 -0.707 +0.672 -0.219 -0.707 +0.698 -0.111 -0.707 +0.588 0.000 -0.809 +0.581 0.092 -0.809 +0.559 0.182 -0.809 +0.524 0.267 -0.809 +0.476 0.345 -0.809 +0.416 0.416 -0.809 +0.345 0.476 -0.809 +0.267 0.524 -0.809 +0.182 0.559 -0.809 +0.092 0.581 -0.809 +0.000 0.588 -0.809 +-0.092 0.581 -0.809 +-0.182 0.559 -0.809 +-0.267 0.524 -0.809 +-0.345 0.476 -0.809 +-0.416 0.416 -0.809 +-0.476 0.345 -0.809 +-0.524 0.267 -0.809 +-0.559 0.182 -0.809 +-0.581 0.092 -0.809 +-0.588 0.000 -0.809 +-0.581 -0.092 -0.809 +-0.559 -0.182 -0.809 +-0.524 -0.267 -0.809 +-0.476 -0.345 -0.809 +-0.416 -0.416 -0.809 +-0.345 -0.476 -0.809 +-0.267 -0.524 -0.809 +-0.182 -0.559 -0.809 +-0.092 -0.581 -0.809 +-0.000 -0.588 -0.809 +0.092 -0.581 -0.809 +0.182 -0.559 -0.809 +0.267 -0.524 -0.809 +0.345 -0.476 -0.809 +0.416 -0.416 -0.809 +0.476 -0.345 -0.809 +0.524 -0.267 -0.809 +0.559 -0.182 -0.809 +0.581 -0.092 -0.809 +0.454 0.000 -0.891 +0.448 0.071 -0.891 +0.432 0.140 -0.891 +0.405 0.206 -0.891 +0.367 0.267 -0.891 +0.321 0.321 -0.891 +0.267 0.367 -0.891 +0.206 0.405 -0.891 +0.140 0.432 -0.891 +0.071 0.448 -0.891 +0.000 0.454 -0.891 +-0.071 0.448 -0.891 +-0.140 0.432 -0.891 +-0.206 0.405 -0.891 +-0.267 0.367 -0.891 +-0.321 0.321 -0.891 +-0.367 0.267 -0.891 +-0.405 0.206 -0.891 +-0.432 0.140 -0.891 +-0.448 0.071 -0.891 +-0.454 0.000 -0.891 +-0.448 -0.071 -0.891 +-0.432 -0.140 -0.891 +-0.405 -0.206 -0.891 +-0.367 -0.267 -0.891 +-0.321 -0.321 -0.891 +-0.267 -0.367 -0.891 +-0.206 -0.405 -0.891 +-0.140 -0.432 -0.891 +-0.071 -0.448 -0.891 +-0.000 -0.454 -0.891 +0.071 -0.448 -0.891 +0.140 -0.432 -0.891 +0.206 -0.405 -0.891 +0.267 -0.367 -0.891 +0.321 -0.321 -0.891 +0.367 -0.267 -0.891 +0.405 -0.206 -0.891 +0.432 -0.140 -0.891 +0.448 -0.071 -0.891 +0.309 0.000 -0.951 +0.305 0.048 -0.951 +0.294 0.095 -0.951 +0.275 0.140 -0.951 +0.250 0.182 -0.951 +0.219 0.219 -0.951 +0.182 0.250 -0.951 +0.140 0.275 -0.951 +0.095 0.294 -0.951 +0.048 0.305 -0.951 +0.000 0.309 -0.951 +-0.048 0.305 -0.951 +-0.095 0.294 -0.951 +-0.140 0.275 -0.951 +-0.182 0.250 -0.951 +-0.219 0.219 -0.951 +-0.250 0.182 -0.951 +-0.275 0.140 -0.951 +-0.294 0.095 -0.951 +-0.305 0.048 -0.951 +-0.309 0.000 -0.951 +-0.305 -0.048 -0.951 +-0.294 -0.095 -0.951 +-0.275 -0.140 -0.951 +-0.250 -0.182 -0.951 +-0.219 -0.219 -0.951 +-0.182 -0.250 -0.951 +-0.140 -0.275 -0.951 +-0.095 -0.294 -0.951 +-0.048 -0.305 -0.951 +-0.000 -0.309 -0.951 +0.048 -0.305 -0.951 +0.095 -0.294 -0.951 +0.140 -0.275 -0.951 +0.182 -0.250 -0.951 +0.219 -0.219 -0.951 +0.250 -0.182 -0.951 +0.275 -0.140 -0.951 +0.294 -0.095 -0.951 +0.305 -0.048 -0.951 +0.156 0.000 -0.988 +0.155 0.024 -0.988 +0.149 0.048 -0.988 +0.139 0.071 -0.988 +0.127 0.092 -0.988 +0.111 0.111 -0.988 +0.092 0.127 -0.988 +0.071 0.139 -0.988 +0.048 0.149 -0.988 +0.024 0.155 -0.988 +0.000 0.156 -0.988 +-0.024 0.155 -0.988 +-0.048 0.149 -0.988 +-0.071 0.139 -0.988 +-0.092 0.127 -0.988 +-0.111 0.111 -0.988 +-0.127 0.092 -0.988 +-0.139 0.071 -0.988 +-0.149 0.048 -0.988 +-0.155 0.024 -0.988 +-0.156 0.000 -0.988 +-0.155 -0.024 -0.988 +-0.149 -0.048 -0.988 +-0.139 -0.071 -0.988 +-0.127 -0.092 -0.988 +-0.111 -0.111 -0.988 +-0.092 -0.127 -0.988 +-0.071 -0.139 -0.988 +-0.048 -0.149 -0.988 +-0.024 -0.155 -0.988 +-0.000 -0.156 -0.988 +0.024 -0.155 -0.988 +0.048 -0.149 -0.988 +0.071 -0.139 -0.988 +0.092 -0.127 -0.988 +0.111 -0.111 -0.988 +0.127 -0.092 -0.988 +0.139 -0.071 -0.988 +0.149 -0.048 -0.988 +0.155 -0.024 -0.988 diff --git a/setup.py b/setup.py index 8da3080..eebb1f7 100644 --- a/setup.py +++ b/setup.py @@ -2,8 +2,8 @@ @ Date: 2021-03-02 16:53:55 @ Author: Qing Shuai @ LastEditors: Qing Shuai - @ LastEditTime: 2021-04-14 15:17:28 - @ FilePath: /EasyMocapRelease/setup.py + @ LastEditTime: 2021-04-14 16:20:10 + @ FilePath: /EasyMocap/setup.py ''' from setuptools import setup @@ -20,7 +20,7 @@ setup( 'easymocap.smplmodel', 'easymocap.pyfitting', 'easymocap.mytools', - 'easymocap.annotator' + 'easymocap.annotator', 'easymocap.estimator' ], install_requires=[],