Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
owais3901 opened this issue Jan 25, 2023 · 12 comments
Assignees

Comments

@owais3901
Copy link

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

@Ben-Louis
Copy link
Collaborator

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 #534.

@owais3901
Copy link
Author

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

@Ethan-cpp
Copy link

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

@owais3901
Copy link
Author

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

@DukeZacharia
Copy link

I too, is there anyone who can help?

@Ben-Louis
Copy link
Collaborator

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

@liguoxin1990
Copy link

liguoxin1990 commented Feb 5, 2023

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

@Ben-Louis
Copy link
Collaborator

Ben-Louis commented Feb 6, 2023

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.

@owais3901
Copy link
Author

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

@liguoxin1990
Copy link

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

@tommasocalo
Copy link

@Ben-Louis we love you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants