zju3dv / SMAP

[ECCV 2020] SMAP: Single-Shot Multi-Person Absolute 3D Pose Estimation
Apache License 2.0
243 stars 37 forks source link

how to convert coco json #11

Closed leonzgtee closed 4 years ago

leonzgtee commented 4 years ago

could you tell me how to convert coco to the format you mentioned in lib/preprocess/data_format.md. no 3d keypoints is available.

raypine commented 4 years ago

Just set zeros if no 3d supervision is available. For coco, [x, y, Z, v, X, Y, Z, fx, fy, cx, cy] --> [x, y, 0, v, 0, 0, 0, fx, fy, cx, cy].

leonzgtee commented 4 years ago

thanks, but some keypoints cannot find in coco annotation,for example, neck/head/pelvis in MPII cannot find in coco. can you share your convert script.

raypine commented 4 years ago

refer to lib/preprocess/create_annot.py

leonzgtee commented 4 years ago

@raypine thank you for providing the create_annot.py, but i find that code about head is annotated , """ body_new[1][0] = (body[0][0] - body_new[0][0]) + body[0][0] body_new[1][1] = (body[0][1] - body_new[0][1]) + body[0][1] body_new[1][3] = min(body[0][2], body_new[0][3]) """ is this keypints set to zeros when converted to MPI 15 format,

raypine commented 4 years ago

In dataset/base_dataset.py, you will find that head in coco dataset is not supervised (here), which means whether setting zeros or not will not matter in data conversion.

leonzgtee commented 4 years ago

thanks you!