diff --git a/Readme.md b/Readme.md index e2dbaa9..e78881f 100644 --- a/Readme.md +++ b/Readme.md @@ -2,7 +2,7 @@ * @Date: 2021-01-13 20:32:12 * @Author: Qing Shuai * @LastEditors: Qing Shuai - * @LastEditTime: 2021-01-24 22:11:37 + * @LastEditTime: 2021-01-25 19:35:14 * @FilePath: /EasyMocapRelease/Readme.md --> # EasyMocap @@ -74,10 +74,14 @@ out=path/to/output python3 scripts/preprocess/extract_video.py ${data} # 1. example for skeleton reconstruction python3 code/demo_mv1pmf_skel.py ${data} --out ${out} --vis_det --vis_repro --undis --sub_vis 1 7 13 19 -# 2. example for SMPL reconstruction +# 2.1 example for SMPL reconstruction python3 code/demo_mv1pmf_smpl.py ${data} --out ${out} --end 300 --vis_smpl --undis --sub_vis 1 7 13 19 --gender male -# 2. example for SMPL-X reconstruction +# 2.2 example for SMPL-X reconstruction python3 code/demo_mv1pmf_smpl.py ${data} --out ${out} --undis --body bodyhandface --sub_vis 1 7 13 19 --start 400 --model smplx --vis_smpl --gender male +# 3.1 example for rendering SMPLX to ${out}/smpl +python3 code/vis_render.py ${data} --out ${out} --skel ${out}/smpl --model smplx --gender male --undis --start 400 --sub_vis 1 +# 3.2 example for rendering skeleton of SMPL to ${out}/smplskel +python3 code/vis_render.py ${data} --out ${out} --skel ${out}/smpl --model smplx --gender male --undis --start 400 --sub_vis 1 --type smplskel --body bodyhandface ``` ## Not Quick Start diff --git a/code/dataset/base.py b/code/dataset/base.py index 880d877..6a019b8 100644 --- a/code/dataset/base.py +++ b/code/dataset/base.py @@ -2,8 +2,8 @@ @ Date: 2021-01-13 16:53:55 @ Author: Qing Shuai @ LastEditors: Qing Shuai - @ LastEditTime: 2021-01-24 22:27:01 - @ FilePath: /EasyMocapRelease/code/dataset/base.py + @ LastEditTime: 2021-01-25 19:12:34 + @ FilePath: /EasyMocap/code/dataset/base.py ''' import os import json @@ -351,6 +351,8 @@ class MVBase(Dataset): self.mode = mode self.undis = undis self.no_img = no_img + # use when debug + self.ret_crop = False self.config = config # results path # the results store keypoints3d @@ -425,6 +427,18 @@ class MVBase(Dataset): images.append(img) # TODO:这里直接取了0 annot = read_annot(annname, self.mode) + if self.ret_crop: + for det in annot: + bbox = det['bbox'] + l, t, r, b = det['bbox'][:4] + l = max(0, int(l+0.5)) + t = max(0, int(t+0.5)) + r = min(img.shape[1], int(r+0.5)) + b = min(img.shape[0], int(b+0.5)) + det['bbox'][:4] = [l, t, r, b] + crop_img = img[t:b, l:r, :] + crop_img = cv2.resize(crop_img, (128, 256)) + det['crop'] = crop_img annots.append(annot) if self.undis: images = self.undistort(images) @@ -465,6 +479,29 @@ class MVBase(Dataset): results.append(result) self.writer.write_smpl(results, nf) + def vis_smpl(self, peopleDict, faces, images, nf, sub_vis=[], + mode='smpl', extra_data=[], add_back=True): + # render the smpl to each view + render_data = {} + for pid, data in peopleDict.items(): + render_data[pid] = { + 'vertices': data.vertices, 'faces': faces, + 'vid': pid, 'name': 'human_{}_{}'.format(nf, pid)} + for iid, extra in enumerate(extra_data): + render_data[10000+iid] = { + 'vertices': extra['vertices'], + 'faces': extra['faces'], + 'colors': extra['colors'], + 'name': extra['name'] + } + cameras = {'K': [], 'R':[], 'T':[]} + if len(sub_vis) == 0: + sub_vis = self.cams + for key in cameras.keys(): + cameras[key] = [self.cameras[cam][key] for cam in sub_vis] + images = [images[self.cams.index(cam)] for cam in sub_vis] + self.writer.vis_smpl(render_data, nf, images, cameras, mode, add_back=add_back) + def read_skel(self, nf, mode='none'): if mode == 'a4d': outname = join(self.skel_path, '{}.txt'.format(nf)) diff --git a/code/demo_mv1pmf_smpl.py b/code/demo_mv1pmf_smpl.py index 55d8aeb..f4ce352 100644 --- a/code/demo_mv1pmf_smpl.py +++ b/code/demo_mv1pmf_smpl.py @@ -2,7 +2,7 @@ @ Date: 2021-01-12 17:08:25 @ Author: Qing Shuai @ LastEditors: Qing Shuai - @ LastEditTime: 2021-01-24 22:26:09 + @ LastEditTime: 2021-01-25 19:32:44 @ FilePath: /EasyMocapRelease/code/demo_mv1pmf_smpl.py ''' # show skeleton and reprojection @@ -23,10 +23,7 @@ def load_weight_shape(): def load_weight_pose(model): if model == 'smpl': weight = { - 'k3d': 1., 'reg_poses_zero': 1e-2, - 'reg_expression': 1e-1, - 'smooth_joints': 1e-5 - # 'smooth_Rh': 1e-1, 'smooth_Th': 1e-1, 'smooth_poses': 1e-1, 'smooth_hands': 1e-2 + 'k3d': 1., 'reg_poses_zero': 1e-2, 'smooth_body': 1e-2 } elif model == 'smplh': weight = { @@ -38,7 +35,6 @@ def load_weight_pose(model): 'k3d': 1., 'reg_poses_zero': 1e-3, 'reg_expression': 1e-2, 'smooth_body': 1e-2, 'smooth_hand': 1e-2 - # 'smooth_Rh': 1e-1, 'smooth_Th': 1e-1, 'smooth_poses': 1e-1, 'smooth_hands': 1e-2 } else: raise NotImplementedError diff --git a/code/mytools/reconstruction.py b/code/mytools/reconstruction.py index 3657a82..5a11d15 100644 --- a/code/mytools/reconstruction.py +++ b/code/mytools/reconstruction.py @@ -2,8 +2,8 @@ * @ Date: 2020-09-14 11:01:52 * @ Author: Qing Shuai @ LastEditors: Qing Shuai - @ LastEditTime: 2021-01-24 22:28:09 - @ FilePath: /EasyMocapRelease/code/mytools/reconstruction.py + @ LastEditTime: 2021-01-25 16:06:41 + @ FilePath: /EasyMocap/code/mytools/reconstruction.py ''' import numpy as np @@ -72,14 +72,14 @@ def simple_recon_person(keypoints_use, Puse, config=None, ret_repro=False): # 计算重投影误差 kpts_repro = projectN3(out, Puse) square_diff = (keypoints_use[:, :, :2] - kpts_repro[:, :, :2])**2 - # conf = (out[None, :, -1] > 0.01) * (keypoints_use[:, :, 2] > 0.01) conf = np.repeat(out[None, :, -1:], len(Puse), 0) kpts_repro = np.concatenate((kpts_repro, conf), axis=2) if conf.sum() < 3: # 至少得有3个有效的关节 repro_error = 1e3 else: + conf2d = conf *(keypoints_use[:, :, -1:] > 0.01) # (nViews, nJoints): reprojection error for each joint in each view - repro_error_joint = np.sqrt(square_diff.sum(axis=2, keepdims=True))*conf + repro_error_joint = np.sqrt(square_diff.sum(axis=2, keepdims=True))*conf2d # remove the not valid joints # remove the bad views repro_error = repro_error_joint.sum()/conf.sum() diff --git a/code/vis_render.py b/code/vis_render.py new file mode 100644 index 0000000..cbf6029 --- /dev/null +++ b/code/vis_render.py @@ -0,0 +1,97 @@ +''' + @ Date: 2021-01-17 21:14:50 + @ Author: Qing Shuai + @ LastEditors: Qing Shuai + @ LastEditTime: 2021-01-25 19:34:46 + @ FilePath: /EasyMocapRelease/code/vis_render.py +''' +# visualize the results by pyrender +import pyrender # first import the pyrender +from collections import namedtuple +from dataset.base import MVBase +from dataset.config import CONFIG +import numpy as np +from tqdm import tqdm +from visualize.geometry import create_ground + +Person = namedtuple('Person', ['vertices', 'keypoints3d']) + +def inBound(keypoints3d, bound): + if bound is None: + return True + valid = np.where(keypoints3d[:, -1] > 0.01)[0] + kpts = keypoints3d[valid] + crit = (kpts[:, 0] > bound[0][0]) & (kpts[:, 0] < bound[1][0]) &\ + (kpts[:, 1] > bound[0][1]) & (kpts[:, 1] < bound[1][1]) &\ + (kpts[:, 2] > bound[0][2]) & (kpts[:, 2] < bound[1][2]) + if crit.sum()/crit.shape[0] < 0.8: + return False + else: + return True + +def visualize(path, sub, out, mode, rend_type, args): + config = CONFIG[mode] + no_img = False + dataset = MVBase(path, cams=sub, config=config, + undis=args.undis, no_img=no_img, out=out) + dataset.skel_path = args.skel + if rend_type in ['skel']: + from visualize.skelmodel import SkelModel + body_model = SkelModel(config['nJoints'], config['kintree']) + elif rend_type in ['mesh']: + from smplmodel import load_model + body_model = load_model(args.gender, model_type=args.model) + smpl_model = body_model + elif rend_type == 'smplskel': + from smplmodel import load_model + smpl_model = load_model(args.gender, model_type=args.model) + from visualize.skelmodel import SkelModel + body_model = SkelModel(config['nJoints'], config['kintree']) + + dataset.writer.save_origin = args.save_origin + start, end = args.start, min(args.end, len(dataset)) + bound = None + if args.scene == 'none': + ground = create_ground(step=0.5) + elif args.scene == 'hw': + ground = create_ground(step=1, xrange=14, yrange=10, two_sides=False) + bound = [[0, 0, 0], [14, 10, 2.5]] + else: + ground = create_ground(step=1, xrange=28, yrange=15, two_sides=False) + for nf in tqdm(range(start, end), desc='rendering'): + images, annots = dataset[nf] + if rend_type == 'skel': + infos = dataset.read_skel(nf) + else: + infos = dataset.read_smpl(nf) + # body_model: input: keypoints3d/smpl params, output: vertices, (colors) + # The element of peopleDict must have `id`, `vertices` + peopleDict = {} + for info in infos: + if rend_type == 'skel': + joints = info['keypoints3d'] + else: + joints = smpl_model(return_verts=False, return_tensor=False, **info)[0] + if not inBound(joints, bound): + continue + if rend_type == 'smplskel': + joints = smpl_model(return_verts=False, return_tensor=False, **info)[0] + joints = np.hstack([joints, np.ones((joints.shape[0], 1))]) + info_new = {'id': info['id'], 'keypoints3d': joints} + vertices = body_model(return_verts=True, return_tensor=False, **info_new)[0] + else: + vertices = body_model(return_verts=True, return_tensor=False, **info)[0] + peopleDict[info['id']] = Person(vertices=vertices, keypoints3d=None) + dataset.vis_smpl(peopleDict, faces=body_model.faces, images=images, nf=nf, + sub_vis=args.sub_vis, mode=rend_type, extra_data=[ground], add_back=args.add_back) + +if __name__ == "__main__": + from mytools.cmd_loader import load_parser + parser = load_parser() + parser.add_argument('--type', type=str, default='mesh', choices=['skel', 'mesh', 'smplskel']) + parser.add_argument('--scene', type=str, default='none', choices=['none', 'zjub', 'hw']) + parser.add_argument('--skel', type=str, default=None) + parser.add_argument('--add_back', action='store_true') + parser.add_argument('--save_origin', action='store_true') + args = parser.parse_args() + visualize(args.path, args.sub, args.out, args.body, args.type, args) \ No newline at end of file diff --git a/code/visualize/geometry.py b/code/visualize/geometry.py new file mode 100644 index 0000000..8fd36ee --- /dev/null +++ b/code/visualize/geometry.py @@ -0,0 +1,82 @@ +''' + @ Date: 2021-01-17 22:44:34 + @ Author: Qing Shuai + @ LastEditors: Qing Shuai + @ LastEditTime: 2021-01-25 19:14:20 + @ FilePath: /EasyMocapRelease/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) + 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 + +def create_plane(normal, point, width=1, height=1, depth=0.005): + mesh_box = TriangleMesh.create_box(width=2*width, height=2*height, depth=2*depth) + mesh_box.paint_uniform_color([0.8, 0.8, 0.8]) + # 根据normal计算旋转 + rotmat = get_rotation_from_two_directions(np.array([0, 0, 1]), normal[0]) + transform0 = np.eye(4) + transform0[0, 3] = -width + transform0[1, 3] = -height + transform0[2, 3] = -depth + transform = np.eye(4) + transform[:3, :3] = rotmat + transform[0, 3] = point[0, 0] + transform[1, 3] = point[0, 1] + transform[2, 3] = point[0, 2] + mesh_box.transform(transform @ transform0) + return {'vertices': np.asarray(mesh_box.vertices), 'faces': np.asarray(mesh_box.triangles), 'colors': np.asarray(mesh_box.vertex_colors), 'name': 'ground'} + faces = np.loadtxt('./code/visualize/sphere_faces_20.txt', dtype=np.int) + vertices = np.loadtxt('./code/visualize/sphere_vertices_20.txt') + colors = np.ones((vertices.shape[0], 3)) + + return {'vertices': vertices, 'faces': faces, 'colors': colors, 'name': 'ground'} diff --git a/code/visualize/skelmodel.py b/code/visualize/skelmodel.py new file mode 100644 index 0000000..58577c6 --- /dev/null +++ b/code/visualize/skelmodel.py @@ -0,0 +1,74 @@ +''' + @ 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 + +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 + faces = np.loadtxt('./code/visualize/sphere_faces_20.txt', dtype=np.int) + self.vertices = np.loadtxt('./code/visualize/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/code/visualize/sphere_faces_20.txt b/code/visualize/sphere_faces_20.txt new file mode 100644 index 0000000..8e5c762 --- /dev/null +++ b/code/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/code/visualize/sphere_vertices_20.txt b/code/visualize/sphere_vertices_20.txt new file mode 100644 index 0000000..bfa3b4f --- /dev/null +++ b/code/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/scripts/preprocess/extract_video.py b/scripts/preprocess/extract_video.py index 0e340a1..df80da1 100644 --- a/scripts/preprocess/extract_video.py +++ b/scripts/preprocess/extract_video.py @@ -2,7 +2,7 @@ @ Date: 2021-01-13 20:38:33 @ Author: Qing Shuai @ LastEditors: Qing Shuai - @ LastEditTime: 2021-01-22 20:45:37 + @ LastEditTime: 2021-01-25 14:41:56 @ FilePath: /EasyMocap/scripts/preprocess/extract_video.py ''' import os, sys @@ -16,7 +16,7 @@ sys.path.append(code_path) mkdir = lambda x: os.makedirs(x, exist_ok=True) -def extract_video(videoname, path, start=0, end=10000, step=1): +def extract_video(videoname, path, start, end, step): base = os.path.basename(videoname).replace('.mp4', '') if not os.path.exists(videoname): return base @@ -193,6 +193,12 @@ if __name__ == "__main__": default='/media/qing/Project/openpose') parser.add_argument('--render', action='store_true', help='use to render the openpose 2d') parser.add_argument('--no2d', action='store_true') + parser.add_argument('--start', type=int, default=0, + help='frame start') + parser.add_argument('--end', type=int, default=10000, + help='frame end') + parser.add_argument('--step', type=int, default=1, + help='frame step') parser.add_argument('--debug', action='store_true') args = parser.parse_args() mode = args.mode @@ -201,7 +207,7 @@ if __name__ == "__main__": videos = sorted(glob(join(args.path, 'videos', '*.mp4'))) subs = [] for video in videos: - basename = extract_video(video, args.path) + basename = extract_video(video, args.path, start=args.start, end=args.end, step=args.step) subs.append(basename) print('cameras: ', ' '.join(subs)) if not args.no2d: