deezer / spleeter

Deezer source separation library including pretrained models.
https://research.deezer.com/projects/spleeter.html
MIT License
25.92k stars 2.84k forks source link

[Discussion] Pretrained Spleeter models as layer in a Keras model #733

Open oststef opened 2 years ago

oststef commented 2 years ago

Is it possible to use the pretrained Spleeter models as a layer in a tensorflow keras model built with the functional api?

I currently use Spleeter in my preprocessing pipeline for a CRNN classifier, but I had the idea to move it into my model instead of doing the source separation beforehand.

 ┌───────┐     ┌──────────┐     ┌────────────┐
 │ Input ├────►│ Spleeter ├────►│ Classifier │
 └───────┘     └──────────┘     └────────────┘
romi1502 commented 2 years ago

Hi @Loubis, This should be doable but it's not straightforward from the current spleeter code. You'll probably need to do some tweaking from the code of separator.

oststef commented 2 years ago

Thanks @romi1502 , that's what I already thought. Had hoped that there is a simple method that I have missed.

If I come up with an elegant solution would you be interested in a pull request?

romi1502 commented 2 years ago

Sure, it would be great to have this feature!

ibinti commented 2 years ago

any progress? i am trying to do the same.

oststef commented 2 years ago

Not yet, it was an improvement idea for my architecture in my bachelor thesis but I scraped it for the chosen topic. I have now some free time to tackle the topic.