mmpose
mmpose copied to clipboard
numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
i am using following versions : torch version: 1.10.0+cu111 True torchvision version: 0.11.0+cu111 mmpose version: 0.29.0 cuda version: 11.1 after running colab of mmpose i am getting this error can somebody can explain and solve it ? BTW i have switch my python version from 3.8 to 3.7 and i have also downgrade my version of numpy as well but still getting the error :-(
Thanks for using MMPose. This looks like a numpy issue. To resolve it, you can try reinstalling or upgrading your numpy. For more discussions, please refer to https://github.com/open-mmlab/mmpose/issues/534.
@Ben-Louis i have upgraded as well as downgraded my numpy version but i am still getting the same error ..
Hello,do you deal with it ? how do you solve with it? Thanks!
@Ethan-cpp i haven't solved it yet, still getting the same error ...
I too, is there anyone who can help?
Hi everyone, could you please give more detailed information about this error? This would be greatly appreciated if you could include:
- The full error message
- The command you ran
- The version of numpy you are using
- The platform you are on
Hi Louis, I also had the same errors while running the offical tutorial. Here is the detailed infomation.
https://colab.research.google.com/github/open-mmlab/mmpose/blob/master/demo/MMPose_Tutorial.ipynb
> 1. The full error message
Please refer to the attach file #1 > 2. The command you ran Please refer to the attach file #2
from mmpose.apis import (inference_top_down_pose_model, init_pose_model, vis_pose_result, process_mmdet_results)
[/usr/local/lib/python3.8/dist-packages/xtcocotools/mask.py](https://localhost:8080/#) in <module>
1 __author__ = 'tsungyi'
2
----> 3 import xtcocotools._mask as _mask
4
5 # Interface for manipulating masks stored in RLE format.
xtcocotools/_mask.pyx in init xtcocotools._mask()
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
> 3. The version of numpy you are using 1.21.6
> 4. The platform you are on
torch version: 1.10.0+cu111 True
torchvision version: 0.11.0+cu111
mmpose version: 0.29.0
cuda version: 11.1
compiler information: GCC 7.3
Thanks!
Hi @liguoxin1990, thanks for your feedback. The cause of this error is an incompatibility between Colab and the platform where xtcocotools was built. To fix it, you have to compile xtcocotools yourself before utilizing it. The easiest method is to use pip install git+https://github.com/jin-s13/xtcocoapi
to install it from source.
@Ben-Louis Thanks . The Issue is solved now. :-)
@Ben-Louis It works! Excellent. Thank you very much.
@Ben-Louis we love you
https://stackoverflow.com/questions/78650222/valueerror-numpy-dtype-size-changed-may-indicate-binary-incompatibility-expec