mmpose
mmpose copied to clipboard
MMPose_Tutorial.ipynb error in a particular cell
the below command
"from mmpose.apis import inference_top_down_pose_model,init_pose_model,vis_pose_result, process_mmdet_results"
throws error.
PFB error details.
/usr/local/lib/python3.8/dist-packages/xtcocotools/mask.py in
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
I tried to upgrade numpy as well, but it did not work.
Indeed, installing with numpy>=1.20.0 should work.
HI! I also ran into this problem. I checked the requirement files and changed all the numpy to numpy>1.20.0 manually - it is a bit curious because my numpy version is 1.24.0, which is higher than 1.20.0. But it didn't work..
If you want to reproduce, I used your mmpose_tutorial notebook.
I also tried the following (unfortunately without luck): forge numpy to be 1.22.0 by adding !pip install numpy=1.22.0 changed python 3.8 to 3.6 reinstalled pycocotools with the flag: --no-binary pycocotools
Thank you in advance!
Edit: I ran it again by using pip install numpy==1.20.0 before all else is installed and build and get a different error now that might provide a bit more information: Runtime Error: module compiled against API version 0x10 but this version of numpy is 0xf . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem.
I also get an Importerror: numpy.core.multiarray failed to import I expect this to be caused by the binary incompatibility of numpy.
When I update numpy, which is is the suggested workaround, it gives me the exact error named in the issue above: ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
I got the same errors as @yanavdsande while attempting to run the current version of MMPose. My build was based on mmpose_tutorial notebook and worked just a month ago without any issues or warnings.
Please refer to https://github.com/open-mmlab/mmpose/issues/1939
Any existing answer did not work for me. I solved this by upgrading all numpy, scipy and numba to the latest version.