liruilong940607 / Pose2Seg

Code for the paper "Pose2Seg: Detection Free Human Instance Segmentation" @ CVPR2019.
http://www.liruilong.cn/projects/pose2seg/index.html
MIT License
532 stars 136 forks source link

Training on smaller dataset #33

Open sonaalPradeep opened 4 years ago

sonaalPradeep commented 4 years ago

Hello @liruilong940607, thank you very much for this repo. I wanted to know if it is possible to train on a smaller COCO dataset than what is originally provided in the readme.

I tried looking into the keypoints JSON file and train2017 folder of images. But I'm not sure which data to modify.

During training, the process line (snippet below) indicates there are 14150 images in dataloader. https://github.com/liruilong940607/Pose2Seg/blob/64fcc5e0ee7b85c32f4be2771ce810a41b9fcb38/train.py#L75-L85

The train2017 directory contains 118288 images. (I found out by using ls -1 | wc -l in the train2017 directory) The person_keypoints_train2017_pose2seg.json has the 149813 items in the "images" field. (Using pythons json module) The person_keypoints_train2017_pose2seg.json has the 56599 items in the "images" field. (Using pythons json module)

I suppose that if I am trying to reduce the number of images the training process uses, I need to reduce the 14150 indicated by the dataloader, but I'm not sure how.

Thank you

liruilong940607 commented 4 years ago

Hi @sonaalPradeep , The 14150 from that line of code is not the number of images, instead it's the number of batches. So you need to multiply 14150 with batch_size to get the number of images in the dataset.