File tree Expand file tree Collapse file tree
tools/mhr_smpl_conversion Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -459,10 +459,12 @@ def _compute_target_vertices(
459459
460460 # Handle coordinate system conversion for input
461461 if direction == "mhr2smpl" :
462- # MHR uses centimeters but SMPL uses meters
463- source_vertices = (
464- source_vertices * ConversionConstants .CENTIMETERS_TO_METERS
465- )
462+ # NOTE: Our MHR data is already in meters, so no conversion needed
463+ # Original code assumed MHR uses centimeters:
464+ # source_vertices = (
465+ # source_vertices * ConversionConstants.CENTIMETERS_TO_METERS
466+ # )
467+ pass
466468
467469 # Process in batches to avoid GPU memory issues
468470 num_frames = source_vertices .shape [0 ]
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ from pathlib import Path
16+
17+ _BASE = Path (__file__ ).resolve ().parent
18+
1519# Part mask files
16- HEAD_HAND_MASK_FILE = "./ assets/head_hand_mask.npz"
17- MHR_FACE_MASK_FILE = "./ assets/mhr_face_mask.ply"
20+ HEAD_HAND_MASK_FILE = str ( _BASE / " assets/head_hand_mask.npz")
21+ MHR_FACE_MASK_FILE = str ( _BASE / " assets/mhr_face_mask.ply")
1822
1923# Subsampled mhr vertices
20- SUBSAMPLED_VERTEX_INDICES_FILE = "./ assets/subsampled_vertex_indices.npy"
24+ SUBSAMPLED_VERTEX_INDICES_FILE = str ( _BASE / " assets/subsampled_vertex_indices.npy")
2125
2226# Model template mesh mapping files
23- SMPL2MHR_MAPPING_FILE = "./ assets/smpl2mhr_mapping.npz"
24- SMPLX2MHR_MAPPING_FILE = "./ assets/smplx2mhr_mapping.npz"
25- MHR2SMPL_MAPPING_FILE = "./ assets/mhr2smpl_mapping.npz"
26- MHR2SMPLX_MAPPING_FILE = "./ assets/mhr2smplx_mapping.npz"
27+ SMPL2MHR_MAPPING_FILE = str ( _BASE / " assets/smpl2mhr_mapping.npz")
28+ SMPLX2MHR_MAPPING_FILE = str ( _BASE / " assets/smplx2mhr_mapping.npz")
29+ MHR2SMPL_MAPPING_FILE = str ( _BASE / " assets/mhr2smpl_mapping.npz")
30+ MHR2SMPLX_MAPPING_FILE = str ( _BASE / " assets/mhr2smplx_mapping.npz")
You can’t perform that action at this time.
0 commit comments