Git Product home page Git Product logo

3d-body-measurements's People

Contributors

vcarlosrb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

3d-body-measurements's Issues

upload image

From where can i get Person.obj file
File is produced from blender or by coding

the shoulder circumference is missing

Hello Carlos, thank you very much for the work you have done! Would it be possible to implement the shoulder circumference? Is it in your skills?

Thank you very much!

shoulders

Vertices and Faces ?

Hello, thank you for your amazing implementation
Can you guide me how can i get vertices and faces for my custom images to use with this implementation ?
It would be great if you can provide a Google Colab Notebook Demo for this repo, it'll help everyone and it'll be much appreciated,

Thank you

weight estimation

Hi,

any news about the weight validation. Is it still pending ?

I am very interested in this feature.

issue with smplx body model

Hi
Thanks for the nice repo and library .
We tried generating a 3d model with expose https://github.com/vchoutas/expose which tries to fit a smplx body model .
After that we used your library to derive the measurements and here is the error .
Thanks
Unimplemented OBJ format statement 'g' on line 'g model' Unimplemented OBJ format statement 's' on line 's 1' Traceback (most recent call last): File "/home/ujjawal/my_work/Fashion/3d-body-measurements/example/example.py", line 29, in <module> main() File "/home/ujjawal/my_work/Fashion/3d-body-measurements/example/example.py", line 19, in main body = Body3D(vertices, faces) File "/home/ujjawal/miniconda2/envs/py3.9/lib/python3.9/site-packages/body_measurements/measurement.py", line 192, in __init__ _, self.hip_location, _ = getHip(self.sections, self.crotch_location) File "/home/ujjawal/miniconda2/envs/py3.9/lib/python3.9/site-packages/body_measurements/measurement.py", line 87, in getHip polygon = getLargerAreaPolygon(sections[cont]) TypeError: list indices must be integers or slices, not NoneType

How do i run this project?

I ran pip install. Could you please let me know how to set up my environment to try testing this repo. I'd greatly appreciate it.
Screen Shot 2021-05-27 at 5 20 08 PM

How do I run and see the program's output

Hi cameronking4. If you want to test the library on your machine without installing the dependency via pip install, I recommend you follow the following steps:

  1. Create a python environment: python -m venv ENV
  2. Activate created environment: source ENV/bin/activate
  3. Install the following dependencies: trimesh> = 3.8.8, numpy> = 1.19.1, scipy> = 1.5.2, shapely> = 1.7.1 and networkx> = 2.5
  4. Run the example inside the example folder: python example.py

I followed these steps but when I execute example.py, the terminal waits for a second and then nothing.
How do I see the output? What am I missing? Where am I supposed to be looking?

Originally posted by @jtorres122 in #5 (comment)

file not found

I am getting this error:

FileNotFoundError: Could not find module 'C:\Users...\miniconda3\Library\bin\geos_c.dll' (or one of its dependencies). Try using the full path with constructor syntax.

Shoulder length very inaccurate

The shoulder length from the project is very inaccurate.

image

This is a SMPL model of a user. The real shoulder measurement is close to 40cm but the program outputs 102cm. Is there something wrong I'm doing?

anthropometry

I'm glad to see this project. I wonder if this project supports anthropometry? I need to measure the human parts of the generated manikin. I hope I can get your reply and information.

Incorrect measurement values

Hi @vcarlosrb ,
I'm getting incorrect measuremnts from the mesh.
Steps to generate my Apose model is:-

  1. I have used your suggested repo to generate smpl model (https://github.com/gulvarol/smplpytorch)
  2. I generated shape parameters from smplify-x repo results ('betas') (https://github.com/vchoutas/smplify-x)
  3. Pose parameters is same as you suggested
    I can see the mesh is generated well in Apose.

Here is the code to generate my Apose body model:
`def create_Apose(parameters_filepath,gender,outfile):
cuda = True
batch_size = 1

# Create the SMPL layer
smpl_layer = SMPL_Layer(
    center_idx=0,
    gender=gender,
    model_root='/home/ujjawal/my_work/Fashion/3d-body-measurements/smplpytorch/smplpytorch/native/models')

# Generate random pose and shape parameters
#pose_params = torch.rand(batch_size, 72) * 0.2
#shape_params = torch.rand(batch_size, 10) * 0.03
pose_params=np.zeros(72,dtype='float32')
pose_params[50],pose_params[53]=5.6,-5.6
f=open(parameters_filepath,'rb')
mydict=pickle.load(f)
shape_params=mydict['betas'][0]
#b=np.load(parameters_filepath)
#shape_params=b['betas.npy']
print('shape params:',shape_params)
print(pose_params.shape)
print(shape_params.shape)


# GPU mode
if cuda:
    pose_params = torch.from_numpy(pose_params.reshape(1,pose_params.shape[0])).cuda()
    shape_params = torch.from_numpy(shape_params.reshape(1,shape_params.shape[0])).cuda()
    smpl_layer.cuda()
print(pose_params.shape)
print(shape_params.shape)

# Forward from the SMPL layer
verts, Jtr = smpl_layer(pose_params.float(), th_betas=shape_params.float())
mesh=trimesh.Trimesh(verts.cpu()[0],smpl_layer.th_faces.cpu())
#trimesh.exchange.obj.export_obj(mesh)
trimesh.exchange.export.export_mesh(mesh,outfile,file_type='obj')
#mesh.show()`

Can you please suggest me any proper way to generate mesh for these measurements?

Error while running example.py

Traceback (most recent call last):
File "D:\3d-body-measurements-main\3d-body-measurements-main\example\example.py", line 37, in
main()
File "D:\3d-body-measurements-main\3d-body-measurements-main\example\example.py", line 19, in main
body = Body3D(vertices, faces)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\body_measurements\measurement.py", line 212, in init
self.sections = getSections(self.mesh, self.levels)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\body_measurements\measurement.py", line 172, in getSections
sections = mesh.section_multiplane(plane_origin=mesh.centroid,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\trimesh\base.py", line 2264, in section_multiplane
lines, transforms, faces = intersections.mesh_multiplane(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\trimesh\intersections.py", line 237, in mesh_multiplane
vertex_dots = np.dot(plane_normal, (mesh.vertices - plane_origin).T)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<array_function internals>", line 200, in dot
ValueError: shapes (3,) and (6,45966) not aligned: 3 (dim 0) != 6 (dim 0)

Pose params for SMPL model

With 50 and 53 pose params set to 5.6 and -5.6, the SMPL model gives pose as shown:
Screenshot from 2021-11-30 17-13-23

I am using smplx package with model_type='smpl'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.