charliememory / Pose-Guided-Person-Image-Generation

Tensorflow implementation of our NIPS 2017 paper "Pose Guided Person Image Generation"
MIT License
301 stars 82 forks source link

About data preparation #34

Open gyawali9 opened 5 years ago

gyawali9 commented 5 years ago

Would you explain the steps involved in dataset preparation including the data pairing for training dataset. I want to train my own data. So it would be helpful. Looking for yours positive response.

charliememory commented 5 years ago

Hi, please check the datasets/run_convert_RCV.sh and datasets/convert_RCV.py which accept pose RCV data in the format of <Row, Column, Visibility>. You can use openpose to get these the pose information.

In datasets/convert_RCV.py: 1) The function _get_train_all_pn_pairs prepares pair data for each person identity, i.e. select all possible pairs of the same identity of different poses (we assume that different images contain different poses). 2) The function _convert_dataset_one_pair_rec is to transform the data into tf-record format according to the pairs provided by _get_train_all_pn_pairs. And the important function _format_data will use the provided pose RCV data to generate the body mask and body part bbox , and then encode them together will other information like image and attribute into one example by tf.train.Example.

I hope it helps.