mmpose icon indicating copy to clipboard operation
mmpose copied to clipboard

numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Open owais3901 opened this issue 2 years ago • 4 comments

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 :-(

owais3901 avatar Jan 25 '23 12:01 owais3901

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 avatar Jan 25 '23 12:01 Ben-Louis

@Ben-Louis i have upgraded as well as downgraded my numpy version but i am still getting the same error ..

owais3901 avatar Jan 31 '23 09:01 owais3901

Hello,do you deal with it ? how do you solve with it? Thanks!

Ethan-cpp avatar Feb 02 '23 14:02 Ethan-cpp

@Ethan-cpp i haven't solved it yet, still getting the same error ...

owais3901 avatar Feb 02 '23 15:02 owais3901

I too, is there anyone who can help?

DukeZacharia avatar Feb 03 '23 08:02 DukeZacharia

Hi everyone, could you please give more detailed information about this error? This would be greatly appreciated if you could include:

  1. The full error message
  2. The command you ran
  3. The version of numpy you are using
  4. The platform you are on

Ben-Louis avatar Feb 03 '23 11:02 Ben-Louis

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! 1 The full error message 2 command

liguoxin1990 avatar Feb 05 '23 07:02 liguoxin1990

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 avatar Feb 06 '23 03:02 Ben-Louis

@Ben-Louis Thanks . The Issue is solved now. :-)

owais3901 avatar Feb 06 '23 11:02 owais3901

@Ben-Louis It works! Excellent. Thank you very much.

liguoxin1990 avatar Feb 06 '23 12:02 liguoxin1990

@Ben-Louis we love you

tommasocalo avatar Feb 08 '23 16:02 tommasocalo

https://stackoverflow.com/questions/78650222/valueerror-numpy-dtype-size-changed-may-indicate-binary-incompatibility-expec

RubTalha avatar Jul 08 '24 19:07 RubTalha