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

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

Closed
gnai opened this issue Apr 8, 2022 · 5 comments

Comments

@gnai
Copy link

gnai commented Apr 8, 2022

  File "<stdin>", line 1, in <module>
  File "/home/user/Automix/automix/model/classes/track.py", line 281, in __init__
    self.features = featuresGetter(path)  # features dictionnary from the MIR estimators
  File "/home/user/Automix/automix/model/classes/track.py", line 35, in __init__
    self._estimators = self.getExecutionGraph()
  File "/home/user/Automix/automix/model/classes/track.py", line 52, in getExecutionGraph
    from automix.featureExtraction.beats.madmomBeatDetection import MadmomBeatDetection
  File "/home/user/Automix/automix/featureExtraction/beats/__init__.py", line 4, in <module>
    from .madmomBeatDetection import MadmomBeatDetection
  File "/home/user/Automix/automix/featureExtraction/beats/madmomBeatDetection.py", line 5, in <module>
    import madmom
  File "/home/user/.local/lib/python3.8/site-packages/madmom/__init__.py", line 24, in <module>
    from . import audio, evaluation, features, io, ml, models, processors, utils
  File "/home/user/.local/lib/python3.8/site-packages/madmom/audio/__init__.py", line 27, in <module>
    from . import comb_filters, filters, signal, spectrogram, stft
  File "madmom/audio/comb_filters.pyx", line 1, in init madmom.audio.comb_filters

please help! Spent too much time trying to make this work. I have all the dependencies installed. and this is working for me: madmomDrumsEnv/bin/python madmom-0.16.dev0/bin/DrumTranscriptor
not sure what is still missing. numpy version outside of madmomDrumsEnv is 1.20.3 and in madmomDrumsEnv is 1.16.6.
I appreciate any tip to solve this. My environment is python3.8.10

@MZehren
Copy link
Owner

MZehren commented Apr 8, 2022

Hej, I will try to help you!

The program needs two different versions of Madmom to work: one for drum transcription, and one for beat detection. This is confusing, but sadly the algorithms for beat and drums estimation are in two different forks of madmom. Because I don't know how you can't install both versions in the same environment with pip, I did the ugly workaround of creating with the installation process the virtual environment "madmomDrumsEnv". This one seems to work for you. Now, you still require the version of madmom for the beat detection which seems to be the one raising the issue:

  File "/home/user/Automix/automix/featureExtraction/beats/madmomBeatDetection.py", line 5, in <module>
    import madmom

This one is not contained in the virtual environment "madmomDrumsEnv". Instead, its location depends on how you installed Automix. Could you check if madmom is correctly installed with:
pip3 install . --editable
The version should be 0.16.1

Good luck!

@gnai
Copy link
Author

gnai commented Apr 8, 2022

Hey @MZehren ,
First, let me say, that's a very interesting approach and paper! Congrats !
Really appreciate the help!
Yes I have that version
Requirement already satisfied: madmom in /home/user/.local/lib/python3.8/site-packages (from AutoMix==0.1) (0.16.1)
I even tried installing this pip install pycocotools==2.0.0 from some issues I've seen on Stack. thinking maybe it would solve.
It should be able to read .wav and .mp3 right?

@MZehren
Copy link
Owner

MZehren commented Apr 11, 2022

Ok, this is strange. Since the program fails when you load Madmom, I expect that you wouldn't be able to load Mamdom (the one outside of the madmomDrumEnv) from your own code either. Can you replicate the issue somewhere else, or is it only when importing my file?

The software works with both .mp3 and .wav IIRC.

@gnai
Copy link
Author

gnai commented Apr 12, 2022

Hey Michael,
I set up another venv and installed madmon again. Its working fine. Thank you ! :)

@MZehren
Copy link
Owner

MZehren commented Apr 12, 2022

Great to hear!

@MZehren MZehren closed this as completed Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants