PangzeCheung / Dual-task-Pose-Transformer-Network

[CVPR 2022] Exploring Dual-task Correlation for Pose Guided Person Image Generation
Other
95 stars 11 forks source link

Training and testing on custom dataset #5

Closed sparshgarg23 closed 2 years ago

sparshgarg23 commented 2 years ago

Hello, I am interested in learning about pose translation from one image to another ,and I came across your repository. I would like to know

In readme it's mentioned

Download the DeepFashion dataset [in-shop clothes retrival benchmark](http://mmlab.ie.cuhk.edu.hk/projects/DeepFashion/InShopRetrieval.html), and put them under the ./dataset/fashion directory.

Download train/test pairs and train/test keypoints annotations from [Google Drive] including fasion-resize-pairs-train.csv, fasion-resize-pairs-test.csv, fasion-resize-annotation-train.csv, fasion-resize-annotation-train.csv, train.lst, test.lst, and put them under the ./dataset/fashion directory.

Split the raw image into the training set (./dataset/fashion/train) and test set (./dataset/fashion/test)

As such ,in order to try the repository on custom dataset are these the steps which should be taken.

  1. Split into train test ,crop and Then execute
    python tool/generate_fashion_datasets.py
  2. Use openpose to obtain keypoints.apart from openpose can we use any other keypoint estimation library. Is it mandatory to use openpose to obtain keypoints.Can any other pose estimation framework like mediapipe be used
  3. ,then create pairs.csv using
    python2 tool/create_pairs_dataset.py

Apart from these steps,am I missing anything

PangzeCheung commented 2 years ago

Hello, I am interested in learning about pose translation from one image to another ,and I came across your repository. I would like to know

In readme it's mentioned

Download the DeepFashion dataset [in-shop clothes retrival benchmark](http://mmlab.ie.cuhk.edu.hk/projects/DeepFashion/InShopRetrieval.html), and put them under the ./dataset/fashion directory.

Download train/test pairs and train/test keypoints annotations from [Google Drive] including fasion-resize-pairs-train.csv, fasion-resize-pairs-test.csv, fasion-resize-annotation-train.csv, fasion-resize-annotation-train.csv, train.lst, test.lst, and put them under the ./dataset/fashion directory.

Split the raw image into the training set (./dataset/fashion/train) and test set (./dataset/fashion/test)

As such ,in order to try the repository on custom dataset are these the steps which should be taken.

  1. Split into train test ,crop and Then execute
python tool/generate_fashion_datasets.py
  1. Use openpose to obtain keypoints.apart from openpose can we use any other keypoint estimation library. Is it mandatory to use openpose to obtain keypoints.Can any other pose estimation framework like mediapipe be used
  2. ,then create pairs.csv using
python2 tool/create_pairs_dataset.py

Apart from these steps,am I missing anything

Thanks for your attention. The process you provided is correct, but the code may need to be slightly modified for specific dataset. As for the pose estimator, there are no special requirements, as long as it can provide accurate keypoint coordinates.

sparshgarg23 commented 2 years ago

@PangzeCheung I tried to execute the create_pairs.py it seems that in the below code the permutations part is coming out to be empty

import pandas as pd
annotation_file_train='/content/train_img_list.csv'
df=pd.read_csv(annotation_file_train)
persons = df.apply(lambda x: x['img'], axis=1)
df['person']=persons

   for person in pd.unique(persons):
        pairs = zip(*list(permutations(df[df['person'] == person]['name'], 2)))
        if len(pairs) != 0:
            fr += list(pairs[0])
            to += list(pairs[1])

Could you give me some suggestions as to what is going wrong here? If needed I can send the train_img_list.csv file