geopavlakos / hamer

HaMeR: Reconstructing Hands in 3D with Transformers
https://geopavlakos.github.io/hamer/
MIT License
326 stars 28 forks source link

demo.py gets unexpected results #56

Closed PanchengZhao closed 1 month ago

PanchengZhao commented 1 month ago

When I try to run demo.py, everything looks consistent with the sample provided in Colab, but I get abnormal results in demo_out. Do you know what is causing this please?

TERMIAL OUTPUT:

apex is not installed
apex is not installed
apex is not installed
/home/admin/miniconda3/lib/python3.10/site-packages/mmcv/cnn/bricks/transformer.py:33: UserWarning: Fail to import ``MultiScaleDeformableAttention`` from ``mmcv.ops.multi_scale_deform_attn``, You should install ``mmcv-full`` if you need this module. 
  warnings.warn('Fail to import ``MultiScaleDeformableAttention`` from '
/home/admin/miniconda3/lib/python3.10/site-packages/pytorch_lightning/utilities/migration/utils.py:49: PossibleUserWarning: The loaded checkpoint was produced with Lightning v2.0.3, which is newer than your current Lightning version: v1.9.4
  rank_zero_warn(
WARNING: You are using a MANO model, with only 10 shape coefficients.
load checkpoint from local path: .//_DATA/vitpose_ckpts/vitpose+_huge/wholebody.pth
The model and loaded state dict do not match exactly

unexpected key in source state_dict: backbone.blocks.0.mlp.experts.0.weight, ........

/home/admin/miniconda3/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3526.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
downsampling_factor=1.1564687093098958
downsampling_factor=1.3775582313537598
downsampling_factor=0.7702547709147135
downsampling_factor=0.914677619934082
downsampling_factor=1.8311049143473308
downsampling_factor=1.2556150754292805
downsampling_factor=1.6385523478190105
downsampling_factor=2.174232006072998
downsampling_factor=4.0980275472005205
downsampling_factor=4.663273334503174
downsampling_factor=3.003650665283203
downsampling_factor=3.003650665283203

RESULTS: test1_all test2_all test3_all

geopavlakos commented 1 month ago

Hmm, this is weird. Does the mesh output (obj files) look ok? I'm trying to figure out if it's an inference error, or a rendering error.

PanchengZhao commented 1 month ago

Thanks for the quick reply. I checked the mesh output, and it shows the same anomaly, which suggests that this is an inference error. I downloaded the data from https://huggingface.co/hngan/hamer/tree/main. Could this be where the problem is originating?

geopavlakos commented 1 month ago

It would make sense to try downloading the data through the suggested links of this repo and try again.

PanchengZhao commented 1 month ago

I downloaded the data through the suggested links in this repo and tried again. Unfortunately, I get almost identical abnormal results. Could the problem be in the environment? I am further investigating this error, please keep me informed if you have any new insights! Thanks!

PanchengZhao commented 1 month ago

I reinstalled the environment and the problem was solved. The result looks nice. Thanks for your reply!