convert spleeter pretrained model to pytorch and onnx, then convert to mnn
- Original Spleeter - download BaiduYun: 1o40
- onnx - download BaiduYun: d0nk
- mnn - download BaiduYun: gnwk
TF model → ONNX(use pytorch) → MNN
- TF model → ONNX model(use pytorch)
python convert2onnx.py
- ONNX model → MNN model
# FP32
mnnconvert -f ONNX --modelFile vocals.onnx --MNNModel vocals.mnn
mnnconvert -f ONNX --modelFile accompaniment.onnx --MNNModel accompaniment.mnn
# FP16
mnnconvert -f ONNX --modelFile vocals.onnx --MNNModel vocals_fp16.mnn --fp16 FP16
mnnconvert -f ONNX --modelFile accompaniment.onnx --MNNModel accompaniment_fp16.mnn --fp16 FP16
- run with TF model
python test_estimator.py
- run with MNN
python spleeter_mnn.py
- Test on my laptop: Inter(R) Core(TM) i5-8300H CPU @ 2.30GHz 2.30GHz
- | TF model | MNN model |
---|---|---|
CPU | 0.4666s | 0.6690s |
WORSE use MNN?
- Spleeter
- spleeter-pytorch mainly inspired
- MNN