Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions smplx/body_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#
# Contact: ps-license@tuebingen.mpg.de

import warnings
from typing import Optional, Dict, Union
import os
import os.path as osp
Expand Down Expand Up @@ -146,7 +147,7 @@ def __init__(
self.batch_size = batch_size
shapedirs = data_struct.shapedirs
if (shapedirs.shape[-1] < self.SHAPE_SPACE_DIM):
print(f'WARNING: You are using a {self.name()} model, with only'
warnings.warn(f'WARNING: You are using a {self.name()} model, with only'
f' {shapedirs.shape[-1]} shape coefficients.\n'
f'num_betas={num_betas}, shapedirs.shape={shapedirs.shape}, '
f'self.SHAPE_SPACE_DIM={self.SHAPE_SPACE_DIM}')
Expand Down Expand Up @@ -1059,7 +1060,7 @@ def __init__(
shapedirs = shapedirs[:, :, None]
if (shapedirs.shape[-1] < self.SHAPE_SPACE_DIM +
self.EXPRESSION_SPACE_DIM):
print(f'WARNING: You are using a {self.name()} model, with only'
warnings.warn(f'WARNING: You are using a {self.name()} model, with only'
' 10 shape and 10 expression coefficients.')
expr_start_idx = 10
expr_end_idx = 20
Expand Down Expand Up @@ -1924,7 +1925,7 @@ def __init__(
shapedirs = shapedirs[:, :, None]
if (shapedirs.shape[-1] < self.SHAPE_SPACE_DIM +
self.EXPRESSION_SPACE_DIM):
print(f'WARNING: You are using a {self.name()} model, with only'
warnings.warn(f'WARNING: You are using a {self.name()} model, with only'
' 10 shape and 10 expression coefficients.')
expr_start_idx = 10
expr_end_idx = 20
Expand Down