jpcurbelo / human-body-reshape-DL-paper

Official Code for "A methodology for realistic human shape reconstruction from 2D images"
MIT License
1 stars 1 forks source link

Running the Code #6

Open ghiu-75 opened 1 month ago

ghiu-75 commented 1 month ago

Q1) If I just want to get anthropometric measurements from 2d images of human (female/male); I will -> Go to src/extractor and run: python extractor_model_training.py And I will get the anthropometric measurements. Is that right? Q2) If I have some anthropometric measurements (height/ weight/Bust (Chest)/ waist/hips) and images of(female/male) and add use these for training purposes and then I want to get anthropometric measurements from 2d images of human (female/male); What should I do?

jpcurbelo commented 1 month ago

Hi @ghiu-75. I'm copy/pasting my email here just for the records:

Thanks for your interest in our code. I'll try to answer your questions here but feel free to reach me back in case I left anything unclear.

Q1) Yes, once you set up the environment and download the needed data files, extractor_model_training.py is the entry point to the application. The call

extracted_measurements = measurements_from_sil(
   model,
   input_info, 
   sil_images,
   df_total,
   stature_glob,
)

extracts 8 body measurements from the images, height, and weight - weight can be not informed though.

Then a set of 21 measurements is completed by imputation and the 3D avatar is generated. In addition to the wavefront.obj file for the avatar, an output table (output_data_avatar_male_fromImg.csv attached) is generated containing the measurements values in the different states: Basic-Input (after extraction from images), Predicted-Input (after imputation), and 3D Avatar-Output (by measuring the 3D avatar).

Q2) The NN to extract body measurements was trained with 2 full-body images, height, and weight as input data, and chest_girth, waist_girth, hips_buttock_girth, shoulder_girth, thigh_girth sleeveoutseam_length, crotchheight_length, and waistback_length as target values. Although, the code could be adapted to use whatever set of measurements you might have depending on the database you want/need to use.

I hope this helps. I recommend starting by running the code step by step as outlined in the Readme file. This can help you get familiar with the code and get a feel for how everything works before making any modifications. image