spleeter icon indicating copy to clipboard operation
spleeter copied to clipboard

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

Open oststef opened this issue 3 years ago • 5 comments

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 │
 └───────┘     └──────────┘     └────────────┘

oststef avatar Feb 24 '22 13:02 oststef

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.

romi1502 avatar Feb 25 '22 14:02 romi1502

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?

oststef avatar Feb 25 '22 16:02 oststef

Sure, it would be great to have this feature!

romi1502 avatar Feb 25 '22 19:02 romi1502

any progress? i am trying to do the same.

ibinti avatar Apr 23 '22 18:04 ibinti

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.

oststef avatar Apr 23 '22 23:04 oststef