facebookresearch / sapiens

High-resolution models for human tasks.
https://about.meta.com/realitylabs/codecavatars/sapiens/
Other
4.49k stars 250 forks source link

_pickle.UnpicklingError: invalid load key, 'v'. #155

Closed mbessa8 closed 1 week ago

mbessa8 commented 2 weeks ago

Hello! I am trying to run sapiens lite, using the 1B model with 308 checkpoints. Without bounding box detection, the script runs but I don't get satisfactory results, so I downloaded 'rtmdet_m_8xb32-100e_coco-obj365-person-235e8209.pth' from hugging face and use DETECTION_CONFIG_FILE='~/rtmdet_m_640-8xb32_coco-person_no_nms.py'. When trying to run, i get this error:

Traceback (most recent call last): File "/home/dock/sapiens/lite/demo/vis_pose.py", line 490, in main() File "/home/dock/sapiens/lite/demo/vis_pose.py", line 308, in main detector = init_detector( File "/home/dock/sapiens/det/mmdet/apis/inference.py", line 78, in init_detector checkpoint = load_checkpoint(model, checkpoint, map_location='cpu') File "/home/dock/sapiens/engine/mmengine/runner/checkpoint.py", line 645, in load_checkpoint checkpoint = _load_checkpoint(filename, map_location, logger) File "/home/dock/sapiens/engine/mmengine/runner/checkpoint.py", line 557, in _load_checkpoint return CheckpointLoader.load_checkpoint(filename, map_location, logger) File "/home/dock/sapiens/engine/mmengine/runner/checkpoint.py", line 337, in load_checkpoint return checkpoint_loader(filename, map_location) File "/home/dock/sapiens/engine/mmengine/runner/checkpoint.py", line 354, in load_from_local checkpoint = torch.load(filename, map_location=map_location, weights_only=False) #MARIANA 16/10 File "/home/dock/anaconda3/envs/sapiens_lite/lib/python3.10/site-packages/torch/serialization.py", line 1384, in load return _legacy_load( File "/home/dock/anaconda3/envs/sapiens_lite/lib/python3.10/site-packages/torch/serialization.py", line 1628, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'.

I've tried downloading the checkpoint file in multiple ways, but I still get the same error. What could it be? Thank you!

rawalkhirodkar commented 2 weeks ago

@mbessa8 what pytorch version are you using? Can you share the command you used to run the pose inference? Along with any modifications (if any) you made? Thanks.

rawalkhirodkar commented 1 week ago

@mbessa8 closing the issue due to inactivity - feel free to reopen.