varora commited on
Commit
1ede165
1 Parent(s): d6660ca
Files changed (2) hide show
  1. README.md +4 -1
  2. vis_hit_sample.py +6 -4
README.md CHANGED
@@ -56,7 +56,7 @@ HIT fosters a new direction and therefore there aren't any exisiting Benchmarks.
56
  ## Usage
57
  ### Quick use
58
  ```angular2html
59
- pip install -r requirements.txt
60
  ```
61
  ```angular2html
62
  from datasets import load_dataset
@@ -71,6 +71,9 @@ print(next(iter(male_train)))
71
 
72
  ### Visualize data
73
  ```angular2html
 
 
 
74
  git clone https://huggingface.co/datasets/varora/HIT
75
  ```
76
  ```angular2html
 
56
  ## Usage
57
  ### Quick use
58
  ```angular2html
59
+ pip install datasets
60
  ```
61
  ```angular2html
62
  from datasets import load_dataset
 
71
 
72
  ### Visualize data
73
  ```angular2html
74
+ pip install -r requirements.txt
75
+ ```
76
+ ```angular2html
77
  git clone https://huggingface.co/datasets/varora/HIT
78
  ```
79
  ```angular2html
vis_hit_sample.py CHANGED
@@ -14,21 +14,23 @@ def vis_hit_sample(sample):
14
  """
15
  # get point-cloud from sample
16
  pc = np.asarray(sample['body_cont_pc'])
 
 
 
 
 
17
  # create point-cloud
18
  pcd = o3d.geometry.PointCloud()
19
  pcd.points = o3d.utility.Vector3dVector(pc)
20
  pcd.paint_uniform_color([0.6509803922, 0.2901960784, 0.2823529412])
21
  pcd_front = pcd.__copy__()
22
 
23
- # get mesh and mesh-free-verts from sample
24
- mesh_verts = np.asarray(sample['smpl_dict']['verts'])
25
- mesh_verts_free = np.asarray(sample['smpl_dict']['verts_free'])
26
- mesh_faces = np.asarray(sample['smpl_dict']['faces'])
27
  # create mesh
28
  mesh = o3d.geometry.TriangleMesh()
29
  mesh.vertices = o3d.utility.Vector3dVector(mesh_verts)
30
  mesh.triangles = o3d.utility.Vector3iVector(mesh_faces)
31
  mesh.paint_uniform_color([0.737254902, 0.7960784314, 0.8196078431])
 
32
  # create mesh-free-verts
33
  mesh_free = o3d.geometry.TriangleMesh()
34
  mesh_free.vertices = o3d.utility.Vector3dVector(mesh_verts_free)
 
14
  """
15
  # get point-cloud from sample
16
  pc = np.asarray(sample['body_cont_pc'])
17
+ # get mesh and mesh-free-verts from sample
18
+ mesh_verts = np.asarray(sample['smpl_dict']['verts'])
19
+ mesh_verts_free = np.asarray(sample['smpl_dict']['verts_free'])
20
+ mesh_faces = np.asarray(sample['smpl_dict']['faces'])
21
+
22
  # create point-cloud
23
  pcd = o3d.geometry.PointCloud()
24
  pcd.points = o3d.utility.Vector3dVector(pc)
25
  pcd.paint_uniform_color([0.6509803922, 0.2901960784, 0.2823529412])
26
  pcd_front = pcd.__copy__()
27
 
 
 
 
 
28
  # create mesh
29
  mesh = o3d.geometry.TriangleMesh()
30
  mesh.vertices = o3d.utility.Vector3dVector(mesh_verts)
31
  mesh.triangles = o3d.utility.Vector3iVector(mesh_faces)
32
  mesh.paint_uniform_color([0.737254902, 0.7960784314, 0.8196078431])
33
+
34
  # create mesh-free-verts
35
  mesh_free = o3d.geometry.TriangleMesh()
36
  mesh_free.vertices = o3d.utility.Vector3dVector(mesh_verts_free)