Closed shahdloo closed 1 year ago
Hi @shahdloo , thanks for your interest in our work! We plan to release these scripts at some point, but unfortunately we will not be able to do so before a few months as we are busy with other deadlines. If really need these human parsing labels asap, you can still create your own using any existing pose estimation or human parsing model (or with some heuristics based on keypoints/skeletons information), you just need rough segmentation masks of each (body) part of the target for the model to learn something.
No worries, I can try to extract the masks myself then. Just, it would be great if you could briefly explain what structure the mask .npy files contain? In order for me not to need to reverse engineer that, but if that's also not possible that's all fine. Thanks
A single .npy contains a 36xHxW array (H and W vary from one image to another, but are usually small (e.g. 30x15), the masks are resized after being loaded anyway). The 36 here correspond to 17 keypoints (pif) + 19 joints (paf) confidences maps provided by OpenPifPaf. I suggest you have a look at 'torchreid/data/datasets/dataset.py' in the 'getitem()' function to see how masks are loaded and preprocessed. At the bottom of 'torchreid/data/transforms.py' you can see how the various masks related transformations are specified. In 'torchreid/data/masks_transforms/init.py' you have a list of Transformations that can be used to group these 36 heatmaps into smaller semantic groups of K parts (8 or 5 in our paper). If you use your own masks, you might need to create your own transform as well. Let me know if you have any other question! If you come up with a nice mask generation script, feel free to open a pull request ;)
fantastic. will have a look. Thanks.
Thanks for sharing this, fantastic. Just saw in the readme that you are planning to share the scripts to preprocess other re-id datasets, i.e. to create the masks. Any news on this front? Is there a chance you can share them already?