ilovepose / DarkPose

Distribution-Aware Coordinate Representation for Human Pose Estimation
https://ilovepose.github.io/coco
Apache License 2.0
550 stars 80 forks source link

I have a quesetion for the code #14

Closed aidarikako closed 3 years ago

aidarikako commented 3 years ago

DarkPose/lib/dataset/JointsDataset.py /line 284-286 feat_stride = self.image_size / self.heatmap_size mu_x = joint[0] mu_y = joint[1] I have a question that why the code is not as follow: feat_stride = self.image_size / self.heatmap_size mu_x = joint[0]/feat_stride[0] mu_y = joint[1]/feat_stride[1]

And I search the JointsDataset.py, I find that you don't use the 'feat_stride' in anywhere, but if your heatmap is 1/4 downsampling of the ori-image, I think it's a neccecery step to use the 'feat_stride'.

I want to know if my understanding is wrong or the code is wrong, thanks.

xizero00 commented 3 years ago

we already commented the following line. feat_stride = self.image_size / self.heatmap_size

EEWenbinWu commented 3 years ago

DarkPose/lib/dataset/JointsDataset.py /line 284-286 feat_stride = self.image_size / self.heatmap_size mu_x = joint[0] mu_y = joint[1] I have a question that why the code is not as follow: feat_stride = self.image_size / self.heatmap_size mu_x = joint[0]/feat_stride[0] mu_y = joint[1]/feat_stride[1]

And I search the JointsDataset.py, I find that you don't use the 'feat_stride' in anywhere, but if your heatmap is 1/4 downsampling of the ori-image, I think it's a neccecery step to use the 'feat_stride'.

I want to know if my understanding is wrong or the code is wrong, thanks.

I think that your understanding is right

HeathHose commented 3 years ago

Please refer to Coordinate Encoding in Paper, and check this code block:

https://github.com/ilovepose/DarkPose/blob/612fad594eddd022b8a162a2c7274f9ee8d06d2c/lib/dataset/JointsDataset.py#L181-L184

EEWenbinWu commented 3 years ago

Please refer to Coordinate Encoding in Paper, and check this code block:

https://github.com/ilovepose/DarkPose/blob/612fad594eddd022b8a162a2c7274f9ee8d06d2c/lib/dataset/JointsDataset.py#L181-L184

I know,but the heatmap was wrong because the x, y are larger than 72 and 96

HeathHose commented 3 years ago

Please refer to Coordinate Encoding in Paper, and check this code block: https://github.com/ilovepose/DarkPose/blob/612fad594eddd022b8a162a2c7274f9ee8d06d2c/lib/dataset/JointsDataset.py#L181-L184

I know,but the heatmap was wrong because the x, y are larger than 72 and 96

Joints_heatmap has been affined to the heatmap space and the x, y is (72, 96). You can compare the differences between darkpose and hrnet in affine_transform

EEWenbinWu commented 3 years ago

Thank you, it's my problem.