Deep3DPose icon indicating copy to clipboard operation
Deep3DPose copied to clipboard

Data Generation

Open priyapaul opened this issue 8 years ago • 6 comments

Tried to run demo_skel2RR.m file after copying the .mat generated in the first step and I got the following error

>> demo_skel2RR
 1

Error using svd
Input to SVD must not contain NaN or Inf.

Error in myscript_5_calculate_RR_W (line 32)
[U, S, V] = svd(S0);

Error in skel2RR (line 20)
[ R, ~, ~ ] =  myscript_5_calculate_RR_W( hip_points_wangchuyu2, hip_points_scape, weights );

Error in demo_skel2RR (line 40)
  [ RR,  R ] = skel2RR( skel, skel_scape );

I printed the values, and found it has a nan, what could be the reason, how to fix it?

skel =

   1.0e+06 *

    0.0000         0         0
    0.0000    0.0000    0.0000
         0    0.0000    0.0000
    0.0000    0.0000    0.0000
    0.0000    0.0000       NaN
    0.0000    0.0000    0.0000
    0.0000    0.0000    0.0000
    0.0000    0.0000    0.0000
   -0.2052    0.2239   -0.1732
    0.9907    0.1787   -0.1732
    1.0224    0.0280   -0.1732
    1.6550   -0.1944    0.3118
    0.9785    0.1787   -0.1732
    1.4086   -0.5319   -0.6151
    1.5216   -0.1191   -0.6151

priyapaul avatar Feb 28 '17 11:02 priyapaul

Are your input be some, weird skeletons?

Or there are two same points in one skeleton?

If so, SVD will output error.

You may choose skeletons from CMU mocap dataset

chen1474147 avatar Feb 28 '17 12:02 chen1474147

I followed the exact steps in your description . This means the same data you have used when runnign run demo_generateskel.m, an I got cmu_skeletons.mat which has a nan, I do not know why there is a nan in your dataset(which you said is taken from mocap dataset)

Human Poses

To generate human models, you should define their poses first. We use CMU Mocap Database as pose sources. This database contains about 4 million poses. To better cover the pose space, we also learn a Bayesian network from these poses.

To generate poses, You can enter 1-skel directory and run demo_generateskel.m directory. It will generate cmu_skeletons.mat, which contains part of poses from CMU Mocap Database.

To acquire more poses, you can download the asf & amc format zipfile from CMU Mocap Database and unzip them in data/asfamc directory.

Note that the code doesn't include the Bayesian network code. You can download it from the original website and use the generated poses as input to learn the model.

We adjust pose format from CMU format to our own format. See images in sources directory. Then we use poses to generate human models.

Human models

To generate human models, we adopt SCAPE. This model decomposes a human mesh into a set of pose parameters and shape parameters. You can generate infinite meshes by adjusting different poses and shapes.

To generate models, first you need to copy the cmu_skeletons.mat into 2-model directory. Then you can run demo_skel2RR.m and demo_RR2obj.m. The first m file will generate cmu_RR.mat file, which is used to transfer poses to rotation matrices. The scond m file will call scape to generate human models. The models are generated in data/models directory.

priyapaul avatar Feb 28 '17 13:02 priyapaul

So you mean that you find a nan in cmu_skeletons.mat?

It must be something wrong because a skeleton should be real number rather than nan.

Which step lead to nan? demo_generateskel.m?

chen1474147 avatar Feb 28 '17 15:02 chen1474147

yes! demo_generateskel.m

priyapaul avatar Feb 28 '17 15:02 priyapaul

I am sorry I directly downoad the code and test the demo but it seems everything goes well...

for i = 1:14 a = skeletons(i).data; b = find(isnan(a(:))); disp(b) end

are you using data from my data folder or your own data?

chen1474147 avatar Mar 04 '17 02:03 chen1474147

data from your folder

priyapaul avatar Apr 18 '17 14:04 priyapaul