Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training on smaller dataset #33

Open
sonaalPradeep opened this issue Jul 22, 2020 · 1 comment
Open

Training on smaller dataset #33

sonaalPradeep opened this issue Jul 22, 2020 · 1 comment

Comments

@sonaalPradeep
Copy link

sonaalPradeep commented Jul 22, 2020

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.

Pose2Seg/train.py

Lines 75 to 85 in 64fcc5e

if i % 10 == 0:
logger.info('Epoch: [{0}][{1}/{2}]\t'
'Lr: [{3}]\t'
'Time {batch_time.val:.3f} ({batch_time.avg:.3f})\t'
'Data {data_time.val:.3f} ({data_time.avg:.3f})\t'
'loss {loss.val:.5f} ({loss.avg:.5f})\t'
.format(
epoch, i, len(dataloader), lr,
batch_time=averMeters['batch_time'], data_time=averMeters['data_time'],
loss=averMeters['loss'])
)

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants