ilovepose/fast-human-pose-estimation.pytorch

Testing the code on real world images

umarasif opened this issue · 5 comments

Hi,

I want to run the code on my own dataset images. I am able to get the keypoint predictions but they are not aligned correctly on the input image. I think the issue is with the center and scale values used in the get_final_preds function. My input image size is 854x480x3. I resize the images to 256x192x3 before feeding to the model. I am using w32_256x192_adam_lr1e-3.yaml as the config file and pose_hrnet_w32_student_FPD.pth as the pretrained model. What should be the values for the variables c and s to be used in get_final_preds in function.py? Any suggestions?

Thanks

(1) c, s means every person center and scale.
(2) s is equal to person height divide 200.
(3) c is original center.
(4) just notice [width, height] or [height, width].

Good lucky!

Hi,
Correct me if I'm wrong, I just looked at the code, and i see that in get_final_preds used predefined information about person scale and centre from the datasets.
Is there exist a way to get correct keypoints from heatmaps without scale and centre on the real world images?

If you want to use this code in the real-world scenario
The pipeline is as follows:
(1) Detect persons in a given image using a detector ( YOLO, SSD, Detectron )
Here you can have the bounding boxes of person, the center and scale can be calculated using the box.
(2) Put the image cropped using bounding box through the network and you will get the heatmap
(3) Convert the coordinates obtained from the heatmaps to the original image space.

If you want to use this code in the real-world scenario
The pipeline is as follows:
(1) Detect persons in a given image using a detector ( YOLO, SSD, Detectron )
Here you can have the bounding boxes of person, the center and scale can be calculated using the box.
(2) Put the image cropped using bounding box through the network and you will get the heatmap
(3) Convert the coordinates obtained from the heatmaps to the original image space.

Thanks for the information. Does the existing code include a person detector? Just to confirm, the input to the model is a cropped image representing a human proposal in the scene and not the whole scene image containing multiple people?

@umarasif
No, we do not include a person detector in our code, you can use the latest detector such as detectron2