Skip to content

Instantly share code, notes, and snippets.

View zhangyahu1's full-sized avatar

Yahui Zhang zhangyahu1

  • University of Amsterdam
  • Netherlands
View GitHub Profile

How to visualize the body part segmentation?

This script lets you to visualize the body part segmentation labels of SMPL, SMPL-H, and SMPL-X body models. Follow the instructions to be able to run this script.

Instructions

  1. Download the body models you would like to visualize.
  2. Install the requirements
  3. Run python visualize_body_part_segmentation.py <body_model> <body_model_path>
@WangZixuan
WangZixuan / Chamfer_Distance_Pytorch.py
Created May 18, 2018 14:08
Use Pytorch to calculate Chamfer distance
import torch
def chamfer_distance_without_batch(p1, p2, debug=False):
'''
Calculate Chamfer Distance between two point sets
:param p1: size[1, N, D]
:param p2: size[1, M, D]
:param debug: whether need to output debug info
@fanjin-z
fanjin-z / mesh-to-point-cloud.py
Last active August 13, 2021 09:00
Convert mesh to point cloud using furthest point sampling
'''
MIT License
Copyright (c) 2018 Fanjin Zeng
This work is licensed under the terms of the MIT license, see <https://opensource.org/licenses/MIT>.
'''
import numpy as np
import pymesh # pymesh is used to load mesh obj files.
# compute triangle mesh surface area