Comments (5)
The skel_betas.py
and skel_poses.py
scripts just aim to show visually the effect of changing the betas (shape) and q (pose) parameters of SKEL. If you want to visualize I suggest you set up a ubuntu virtual machine.
Otherwise, I suggest you play arround with the script quickstart.py as this does not rely on any visualization tool. You can change the values of 'betas' and 'poses' and observe the changes in the output mesh.
betas
is a vector of size 10. The values should remain between -2 and 2. The first value of the vector controls the height, the second value the weight.
pose
is a vector of size 46, most values are in radiant angles. See here to see which of the 46 parameters controls which body articulation.
from skel.
@MarilynKeller Thanks for your replied.
If I have a SMPL and I know the betas and poses of the SMPL, how to create its corresponding SKEL? betas can be passed directly to SKEL. The pose in SMPL is 72, but I haven't found the code to pass them....
Is the way to do it running the fitting with skel_fitter.fit
to calculate 46 from the input SMPL ?
from skel.
Yes you are correct, what you need is skel_fitter.py
.
You can see an example of how to run it in examples/align_to_SMPL.py.
SKEL takes the same betas as SMPL but skel_fitter lets you find the pose parameter q of SKEL that matches the SMPL pose theta.
from skel.
I just added some more documentation to clarify examples/align_to_SMPL.py. I suggest you pull the last commit.
from skel.
Yes you are correct, what you need is
skel_fitter.py
. You can see an example of how to run it in examples/align_to_SMPL.py.SKEL takes the same betas as SMPL but skel_fitter lets you find the pose parameter q of SKEL that matches the SMPL pose theta.
align_to_SMPL.py doesn't work with 1 frame, but fitting 2 frames is fine....
Fitting 1 frames
Batch size is larger than the number of frames. Setting batch size to 1
Running batch optimization: 0%| | 0/1 [00:00<?, ?it/s]E:\innovisionllc2024\skel\SKEL\skel\skel_model.py:424: UserWarning: Use of index_put_ on expanded tensors is deprecated. Please clone() the tensor before performing this operation. This also applies to advanced indexing e.g. tensor[indices] = tensor (Triggered internally at ..\aten\src\ATen\native\TensorAdvancedIndexing.cpp:342.)
Rsmpl[:, smpl_joint_corresp] = Rskin.clone()[:] # BxNjx3x3 pose params to rotation
Running batch optimization: 0%| | 0/1 [00:02<?, ?it/s]
Traceback (most recent call last):
File "examples/align_to_SMPL.py", line 39, in <module>
skel_seq = skel_fitter.fit(smpl_seq['trans'],
File "E:\skel\SKEL\skel\alignment\aligner.py", line 244, in fit
optim([trans,poses], poses, betas, trans, verts, self.skel, self.device, rot_only=True, watch_frame=watch_frame)
File "E:\skel\SKEL\skel\alignment\aligner.py", line 146, in optim
loss = optimizer.step(closure).item()
File "C:\Users\hwy19\Miniconda3\envs\skel\lib\site-packages\torch\optim\optimizer.py", line 89, in wrapper
return func(*args, **kwargs)
File "C:\Users\hwy19\Miniconda3\envs\skel\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Users\hwy19\Miniconda3\envs\skel\lib\site-packages\torch\optim\lbfgs.py", line 311, in step
orig_loss = closure()
File "C:\Users\hwy19\Miniconda3\envs\skel\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "E:\skel\SKEL\skel\alignment\aligner.py", line 127, in closure
time_loss = 1e-2 * compute_time_loss(poses)
File "E:\skel\SKEL\skel\alignment\aligner.py", line 48, in compute_time_loss
time_loss = torch.linalg.norm(pose_delta, ord=2)
RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity
from skel.
Related Issues (8)
- 46 params vs SMPL 72 params HOT 3
- Export .osim and .mot files after align to SMPL HOT 6
- It seems that there is no "skel_models_v1.1.zip"? HOT 1
- Issue with numpy.AxisError in align_to_SMPL.py HOT 4
- Strange deformation when aligning SKEL to CMU kicking motion. HOT 1
- Error in fit2joints HOT 5
- Does the skeleton have clavicles...? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skel.