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

human-body-reshape-DL-paper

Official Code for "Curbelo, J.P., Spiteri, R.J. A methodology for realistic human shape reconstruction from 2D images. Multimed Tools Appl (2024). https://doi.org/10.1007/s11042-023-17947-6"

creating by deform-based global mapping

If you want to explore this repo and eventually contribute, please, follow the instructions below.

Getting Started

To get a local copy of the project, follow these steps:

1-Clone the repository:

git clone https://github.com/jpcurbelo/human-body-reshape-DL-paper.git

2-Navigate into the cloned directory:

cd human-body-reshape-DL-paper/

Folder tree

human-body-reshape-DL-paper/
├── data/
│ ├── body_reshaper_files/
│ │ └── [Files for the Body Reshaper]
│ ├── cp_blender_files/
│ │ └── [Files for CP Blender]
│ ├── datasets/
│ │ ├── ds_ansur_original/
│ │ │ └── [Original ANSUR datasets]
│ │ └── [Datasets files]
│ ├── input_files/
│ │ └── [Input files for processing]
│ ├── obj_files/
│ │ ├── obj_database_SPRING/
│ │ │ ├── female/
│ │ │ │ └── [Female OBJ files]
│ │ │ ├── male/
│ │ │ │ └── [Male OBJ files]
│ │ └── [Other OBJ files]
│ ├── output_files/
│ │ └── [Output files]
├── figures/
│ └── [Figures for the paper]
├── src/
│ ├── datasets/
│ │ ├── ansur2bodyfiles.py
│ │ └── ds_processer.py
│ ├── reshaper/
│ │ ├── avatar.py
│ │ ├── cp_handler.py
│ │ ├── tests_temp.py
│ │ ├── trainer.py
│ └── utils.py

3-Create a virtual environment:

virtualenv venv

4-Activate the virtual environment:

source venv/bin/activate

5-Install the project dependencies:

pip install -r requirements.txt

Reshaper

This directory includes scripts to:

Folder Paths:

Extractor

This directory includes the script to build and train an MLP+CNN model to extract body measurements from two (front and side views) full-body images.

Folder Paths:

Input and Output Files

Input files are to be located in data/input_files and consist of:

Output files are to be stored in data/output_files and may consist of silhouette images extracted and the wavefront.obj file for the avatar.

Data files

To train and use the models, you will need the dataset files for avatars, silhouettes, and body measurements. These files can be downloaded from Zenodo. Make sure to organize the downloaded files following the folder tree presented above.

Generating Avatars from Images

To try the code, navigate to src and run:


python photos2avatar.py