vcarlosrb / 3d-body-measurements Goto Github PK
View Code? Open in Web Editor NEWBody measurements
License: MIT License
Body measurements
License: MIT License
From where can i get Person.obj file
File is produced from blender or by coding
Hi
Can anyone tell me how to convert obj file from image ?
I come again.When I execute the getHeight method, I find that the return value is direct (maxY - minY) without conversion. This should calculate the height of the model, not the height of the person. How to determine the conversion ratio
Hello, first of all, thank you for your code to help me with anthropometry. In addition, I would like to know whether the measurement method at each location is documented or whether you have published a paper. I would like to refer to the specific implementation process
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
Hi,
any news about the weight validation. Is it still pending ?
I am very interested in this feature.
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
Hello,Sorry to bother you! When I execute the getSections method, what does len (entities) in the return value mean?
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:
- Create a python environment: python -m venv ENV
- Activate created environment: source ENV/bin/activate
- Install the following dependencies: trimesh> = 3.8.8, numpy> = 1.19.1, scipy> = 1.5.2, shapely> = 1.7.1 and networkx> = 2.5
- 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)
How to generate that vertices in .obj file from images ?
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.
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.
Hi @vcarlosrb ,
I'm getting incorrect measuremnts from the mesh.
Steps to generate my Apose model is:-
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?
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)
With 50 and 53 pose params set to 5.6 and -5.6, the SMPL model gives pose as shown:
I am using smplx package with model_type='smpl'.
Hi Carlos, I hope you are doing well.
Question: is it possible to generate a STAR or SMPL body model based on the following input parameters?
Preseize.ai appears to be doing this, but I don't know how.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.