Open moondabaojian opened 4 years ago
How different are the 2 results?
File size is different
There are also some differences in the content of the file,I output the contents of the file with the following code
import sys
import numpy as np
from psbody.mesh import Mesh
data = np.load('mesh_downsampling_test.npz',encoding='latin1')
print(type(data['A_test']))
np.savetxt('out_A_test.txt',data['A_test'],fmt='%s')
np.savetxt('out_D_test.txt',data['D_test'],fmt='%s')
np.savetxt('out_U_test.txt',data['U_test'],fmt='%s')
#np.savetxt('out_F.txt',data['F'],fmt='%s')
#np.savetxt('out_M.txt',data['M'],fmt='%s')
I'm sorry to disturb you. I hope you can give me a reply. Thank you very much
Hi @moondabaojian, can you try ds_factors = [4, 4]
instead of [4, 1] and get back to me? FYI, I used pytorch_coma to reproduce the work.
First of all, I checked the original mesh_downsampling.npz
in GraphCMR/data and that is like following:
# default['A']
array([<6890x6890 sparse matrix of type '<class 'numpy.float64'>'
with 41328 stored elements in Compressed Sparse Column format>,
<1723x1723 sparse matrix of type '<class 'numpy.float64'>'
with 10326 stored elements in Compressed Sparse Column format>,
<431x431 sparse matrix of type '<class 'numpy.float64'>'
with 2574 stored elements in Compressed Sparse Column format>],
dtype=object)
# default['D']
array([<1723x6890 sparse matrix of type '<class 'numpy.float64'>'
with 1723 stored elements in Compressed Sparse Column format>,
<431x1723 sparse matrix of type '<class 'numpy.float64'>'
with 431 stored elements in Compressed Sparse Column format>],
dtype=object)
# default['U']
array([<6890x1723 sparse matrix of type '<class 'numpy.float64'>'
with 20670 stored elements in Compressed Sparse Column format>,
<1723x431 sparse matrix of type '<class 'numpy.float64'>'
with 5169 stored elements in Compressed Sparse Column format>],
dtype=object)
However, the new npz
result after applying ds_factors = [4, 1]
to basicModel_neutral_lbs_10_207_0_v1.0.0.pkl
that we can download via ./fetch_data.sh
is different. I suppose this lead to the different size that you mentioned.
# template['A']
array([<6890x6890 sparse matrix of type '<class 'numpy.float64'>'
with 41328 stored elements in COOrdinate format>,
<1723x1723 sparse matrix of type '<class 'numpy.float64'>'
with 10326 stored elements in COOrdinate format>,
<1723x1723 sparse matrix of type '<class 'numpy.float64'>'
with 10326 stored elements in COOrdinate format>], dtype=object)
# template['D']
array([<1723x6890 sparse matrix of type '<class 'numpy.float64'>'
with 1723 stored elements in COOrdinate format>,
<1723x1723 sparse matrix of type '<class 'numpy.float64'>'
with 1723 stored elements in COOrdinate format>], dtype=object)
# template['U']
array([<6890x1723 sparse matrix of type '<class 'numpy.float64'>'
with 20670 stored elements in COOrdinate format>,
<1723x1723 sparse matrix of type '<class 'numpy.float64'>'
with 5169 stored elements in COOrdinate format>], dtype=object)
Each A
, D
, and U
matrix size is different from the original .npz
, so that I try making it the same by using ds_factors = [4, 4]
. This produces the same matrix size like the below result.
# test['A']
array([<6890x6890 sparse matrix of type '<class 'numpy.float64'>'
with 41328 stored elements in COOrdinate format>,
<1723x1723 sparse matrix of type '<class 'numpy.float64'>'
with 10326 stored elements in COOrdinate format>,
<431x431 sparse matrix of type '<class 'numpy.float64'>'
with 2574 stored elements in COOrdinate format>], dtype=object)
# test['D']
array([<1723x6890 sparse matrix of type '<class 'numpy.float64'>'
with 1723 stored elements in COOrdinate format>,
<431x1723 sparse matrix of type '<class 'numpy.float64'>'
with 431 stored elements in COOrdinate format>], dtype=object)
# test['U']
rray([<6890x1723 sparse matrix of type '<class 'numpy.float64'>'
with 20670 stored elements in COOrdinate format>,
<1723x431 sparse matrix of type '<class 'numpy.float64'>'
with 5169 stored elements in COOrdinate format>], dtype=object)
However, the inside of matrix result is slightly different. This makes me not certain I did in a correct way and curious the sentence in the paper;
subsample by 4 factor and upsample it again the original scale.
The above sentence seems to mean [4, 1] but [4, 4] gives me similar result. If @nkolot can help us, it will be very nice.
Hello @syenpark , Thank you for your reply to this question. According to your suggestion, I tried using ds_factors = [4, 4]
, Here are my results
and
output.tar.gz
I still haven't got the same result as the original one mesh_downsampling.npz
. But as you suggest, we have at least the same matrix structure
@moondabaojian, I suppose some format or header information of .npz
leads to the slight different size that you point out. For instance, the discrepancy in the format such as Compressed Sparse Column format
in the original and COOrdinate format
in mine. This difference doesn't cause any issues when I run the pretrained model of this GitHub on my own mesh.
Hello! I want to try use other human template(SMPLX) in your work, I need precompuute 'A', 'D', 'U' matrices according this , so I test using the smpl template first, but I can't get the same result as you. Please point out my mistake, Thank you ! I changed part of the code of ‘coma’