bodynet
bodynet copied to clipboard
How to use this for my own images not anything from test set
Hi, Gul. I have done the following things: Pre-processing and fitting python scripts
Python 2 environment with the following installed:
OpenDr
Chumpy
OpenCV
SMPL related
Download SMPL for python and set SMPL_PATH
Fix the naming: mv basicmodel_m_lbs_10_207_0_v1.0.0 basicModel_m_lbs_10_207_0_v1.0.0
Do the following changes in the code smpl_webuser/verts.py:
- v_template, J, weights, kintree_table, bs_style, f,
+ v_template, J_regressor, weights, kintree_table, bs_style, f,
- if sp.issparse(J):
- regressor = J
- J_tmpx = MatVecMult(regressor, v_shaped[:,0])
- J_tmpy = MatVecMult(regressor, v_shaped[:,1])
- J_tmpz = MatVecMult(regressor, v_shaped[:,2])
+ if sp.issparse(J_regressor):
+ J_tmpx = MatVecMult(J_regressor, v_shaped[:,0])
+ J_tmpy = MatVecMult(J_regressor, v_shaped[:,1])
+ J_tmpz = MatVecMult(J_regressor, v_shaped[:,2])
+ assert(ischumpy(J_regressor))
- assert(ischumpy(J))
+ result.J_regressor = J_regressor
Download neutral SMPL model and place under models folder of SMPL
Download SMPLify and set SMPLIFY_PATH
Voxelization related
Download binvox executable and set BINVOX_PATH
Download binvox python package and set BINVOX_PYTHON_PATH
Question: When i have executed the file fitting/fit_surreal.py it is creating an obj and some mat files .but if i want to use my own image to get the prediction . what standards should i follow or what all should i pass in order to get an obj with prediction?
Hi, please use the demo scripts to run the test on your own images: https://github.com/gulvarol/bodynet/tree/master/demo
Thanks Gul for quick response. i have built the torch with cuda 10 and installed luarocks and when i ran demo.lua i have got this error: th> demo.lua [string "_RESULT={ demo.lua}"]:1: attempt to index global 'demo' (a nil value) stack traceback: /home/bigthinx/torch/install/share/lua/5.2/trepl/init.lua:506: in function '__index' [string "_RESULT={ demo.lua}"]:1: in main chunk [C]: in function 'xpcall' /home/bigthinx/torch/install/share/lua/5.2/trepl/init.lua:661: in function 'repl' ...hinx/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:204: in main chunk [C]: in ? [0.0004s] th>
in order to resolve that what i need to install? i'm new with lua and never used it before.