facebookresearch / InterWild

Official PyTorch implementation of "Bringing Inputs to Shared Domains for 3D Interacting Hands Recovery in the Wild", CVPR 2023
Other
165 stars 15 forks source link

demo mesh result is different #20

Open yanqi1811 opened 11 months ago

yanqi1811 commented 11 months ago

Thanks for your work! When I run the demo using the image.jpg, I get the different result with you! The bbox and 2d points skeleton are same with you, but the mesh is different. I also test other images, I find it doses't even work well, when fingers down. I'm not sure what the problem is. Could you help me?

20231102161433 image_box image_skeleton

20231102162030

mks0601 commented 11 months ago

which checkpoint did you use?

yanqi1811 commented 11 months ago

which checkpoint did you use?

This pre-trained InterWild! Download from here. 20231102200128

mks0601 commented 11 months ago

I've just ran the demo and I got this result from that checkpoint

image

Also, I got this result from a checkpoint trained on ih26m+mscoco+reih image

yanqi1811 commented 11 months ago

I've just ran the demo and I got this result from that checkpoint

image

Also, I got this result from a checkpoint trained on ih26m+mscoco+reih image

Thank you very much. I've just ran the demo and I got this result from the pretrain checkpoint. 1 I also got this result from a checkpoint trained on ih26m+mscoco+reih. 2 But these results are different from you. Is there something wrong with my environment, like smplx?

mks0601 commented 11 months ago

that's weird. I'm using original version of smplx. Nothing is modified on my side. are you using customized smplx?

yanqi1811 commented 11 months ago

that's weird. I'm using original version of smplx. Nothing is modified on my side. are you using customized smplx?

I am also using original version of smplx, the version is 0.1.28. What about you?

mks0601 commented 11 months ago

I think it's not a problem of smplx.. are you using my code as it is without modification? are you using pytorch3d?

yanqi1811 commented 11 months ago

I think it's not a problem of smplx.. are you using my code as it is without modification? are you using pytorch3d? It is not any modification. Yes, I am using pytorch3d when I render mesh result.

mks0601 commented 11 months ago

It seems the root pose is flipped 180 degree. Could you check your pytorch3d version with import pytorch3d print(pytorch3d.version)

I'm using 0.7.3

yanqi1811 commented 11 months ago

It seems the root pose is flipped 180 degree. Could you check your pytorch3d version with import pytorch3d print(pytorch3d.version)

I'm using 0.7.3

I'm using 0.7.4. I will try pytorch3d 0.7.3. Thanks.

yanqi1811 commented 11 months ago

It seems the root pose is flipped 180 degree. Could you check your pytorch3d version with import pytorch3d print(pytorch3d.version) I'm using 0.7.3

I'm using 0.7.4. I will try pytorch3d 0.7.3. Thanks.

I use pytorch3d 0.7.3, the result is right. Thanks!

mks0601 commented 11 months ago

Oh I didn't know that pytorch3d is very sensitive to versions

yanqi1811 commented 11 months ago

Oh I didn't know that pytorch3d is very sensitive to versions It seems like I've found the real cause of the problem. When converting the ONNX file earlier, I discovered that the aten::atan2 operator is not supported. I took a bold step and modified the implementation of torch.atan2() in the PyTorch3D source code by replacing it with torch.atan(). Specifically, I replaced atan2(A, B) with atan(A / (B+1e-6)). In my simple tests, I didn't notice any significant impact on the upward finger direction. However, it appears that the impact is actually quite significant. Do you have any alternative replacement suggestions for the torch.atan2() function that would ensure ONNX compatibility? Your advice would be greatly appreciated. Thank you. This pytorch3d original code: QQ截图20231103103004

mks0601 commented 11 months ago

Hi, sorry I haven't used ONNX..

yanqi1811 commented 11 months ago

Hi, sorry I haven't used ONNX..

OK, thanks.