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

generate train data for MPII #333

Open
w8501 opened this issue Nov 6, 2020 · 3 comments
Open

generate train data for MPII #333

w8501 opened this issue Nov 6, 2020 · 3 comments

Comments

@w8501
Copy link

w8501 commented Nov 6, 2020

Someone can answer that for me in the hyperpose/dataset/mpii_dataset/Dataset/mpii_dataset/generate.py

    target_list=[]
    for kpts,head_bbx in zip(kpts_list,bbx_list):
        bbx=np.array(head_bbx).copy()
        bbx[:,2]=bbx[:,2]*4
        bbx[:,3]=bbx[:,3]*4
        target_list.append({
            "kpt":kpts,
            "mask":None,
            "bbx":bbx,
            "head_bbx":head_bbx,
            "labeled":1
        })

What does bbx[:,2]=bbx[:,2]*4 and bbx[:,3]=bbx[:,3]*4 mean?
bbox[:,0] is head center x, bbox[:,1] is head center y.
So what does BBX mean?

@Gyx-One
Copy link
Contributor

Gyx-One commented Nov 8, 2020

Hello! @w8501
bbx stands for bounding box, bbx[0] is the x for the box, bbx[1] is y, while bbx[2] is weight and bbx[3] is height.
For MSCOCO dataset, the labeled bounding box is a rectanguler that contains the whole object( for pose estimation, each object is a person), however, for MPII dataset, the labeled bounding box stands for the rectangular that contains the person's head, so here we multiplt the MPII labeled bounding box by 4 to approximate the whole bounding box that contains a person. :)

@w8501
Copy link
Author

w8501 commented Nov 9, 2020

Hello! @w8501
bbx stands for bounding box, bbx[0] is the x for the box, bbx[1] is y, while bbx[2] is weight and bbx[3] is height.
For MSCOCO dataset, the labeled bounding box is a rectanguler that contains the whole object( for pose estimation, each object is a person), however, for MPII dataset, the labeled bounding box stands for the rectangular that contains the person's head, so here we multiplt the MPII labeled bounding box by 4 to approximate the whole bounding box that contains a person. :)

Hi! @Gyx-One
Thanks for your reply. I take your point.But the bbx[0] is head center x , bbx[1] is head center y.
So the top left point is(head center x,head center y), and bottom right point is(head center x+w,head center y+h),which does not contain the whole object.

@Gyx-One
Copy link
Contributor

Gyx-One commented Nov 13, 2021

Hello! @w8501
Sorry to response so late!
Thanks for pointing this out! I think you are correct and I'll check the issues that it may cause and fix them. :)

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