worldveil / dejavu

Audio fingerprinting and recognition in Python
MIT License
6.36k stars 1.43k forks source link

how to tune the model performance? #167

Open spaceOoooo opened 5 years ago

spaceOoooo commented 5 years ago

Hi all, I have 1000 songs, i want adjust DEFAULT_FAN_VALUE, PEAK_NEIGHBORHOOD_SIZE to improve recognition performance. I decresed DEFAULT_FAN_VALUE and increase PEAK_NEIGHBORHOOD_SIZE value, then I got less fingerprints. For my understanding, the recognition search speed should be faster then that with default setting. My fingerprints db size decreased with that setting, but I took more time for recognition. Does anyone can help explain it? Thanks

JPery commented 5 years ago

As I've checked, the most time of the recognition is spent in the fingerprint of the song to recognize, so in many cases it doesn't matter the size of your db.

spaceOoooo commented 5 years ago

Thanks Pery. So I need to optimize fingerprint retrieve part to improve recognize speed.

JPery commented 5 years ago

The main thing here is the "scipy.ndimage.filters -> maximum_filter" takes so long and there is no way to improve it without touching scipy code.

You can find the function here.