spotify / basic-pitch

A lightweight yet powerful audio-to-MIDI converter with pitch bend detection
https://basicpitch.io
Apache License 2.0
3.38k stars 262 forks source link

Why are the running results of my python script and the online demo different? #126

Closed MrQinYQ closed 2 months ago

MrQinYQ commented 4 months ago

i upload a canon mp3,python script return a bad result. KIM20240521-509471 KIM20240521-607905 ` from basic_pitch.inference import predict_and_save from basic_pitch import ICASSP_2022_MODEL_PATH

predict_and_save( ['./canon.mp3', './test1.mp3'], 'output', True, True, True, True, model_or_model_path=ICASSP_2022_MODEL_PATH,

onset_threshold=0.5,

# frame_threshold=0.5,
# minimum_frequency=100,
# maximum_frequency=3000,

) `

drubinstein commented 4 months ago

A couple of questions:

MrQinYQ commented 4 months ago

@drubinstein MacOS M2 arm64. That's non-TF. It seems to be using coremltools. parameters is match for in the website

drubinstein commented 4 months ago

Can you try to install tensorflow macos (basic-pitch[tf]) and see how much different it is? Are the overall results bad with CoreML?

MrQinYQ commented 4 months ago

I need remove coremltools? overall results bad with CoreML

MrQinYQ commented 4 months ago

Can you try to install tensorflow macos (basic-pitch[tf]) and see how much different it is? Are the overall results bad with CoreML?

pip install basic-pitch[tf]. Midi files look much more normal now. Thanks.