Pose2Seg icon indicating copy to clipboard operation
Pose2Seg copied to clipboard

Training on smaller dataset

Open sonaalPradeep opened this issue 3 years ago • 1 comments

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

sonaalPradeep avatar Jul 22 '20 13:07 sonaalPradeep

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.

liruilong940607 avatar Jul 29 '20 05:07 liruilong940607