google / uis-rnn

This is the library for the Unbounded Interleaved-State Recurrent Neural Network (UIS-RNN) algorithm, corresponding to the paper Fully Supervised Speaker Diarization.
https://arxiv.org/abs/1810.04719
Apache License 2.0
1.56k stars 319 forks source link

Add a `online_predict()` API for streaming input #28

Open wq2012 opened 5 years ago

wq2012 commented 5 years ago

UIS-RNN is an online algorithm, but the current predict() API of this library is not.

If people want to deploy this library to a production environment for online use cases, an online_predict() API is going to be necessary.

Its usage should be like this:

# Feed the first sequence, and continuously make use of the label.
label = model.online_predict(X1)
label = model.online_predict(X2)
label = model.online_predict(X3)
model.online_predict(reset=True)
# Feed the second sequence, and continuously make use of the label.
label = model.online_predict(Y1)
label = model.online_predict(Y2)
label = model.online_predict(Y3)
label = model.online_predict(Y4)
model.online_predict(reset=True)

However, we may not have the bandwidth to work on this any time soon.

sukhbirsinghsaini commented 4 years ago

Any update on this?

wq2012 commented 4 years ago

Unfortunately, as several core members have left the team, we won't be able to work on this ourselves.

But if someone wants to work on this, he/she can create a subclass of UISRNN under the contrib directory. We would welcome that.

hbo-lambda commented 3 years ago

UIS-RNN is an online algorithm, but the current predict() API of this library is not.

If people want to deploy this library to a production environment for online use cases, an online_predict() API is going to be necessary.

Its usage should be like this:

# Feed the first sequence, and continuously make use of the label.
label = model.online_predict(X1)
label = model.online_predict(X2)
label = model.online_predict(X3)
model.online_predict(reset=True)
# Feed the second sequence, and continuously make use of the label.
label = model.online_predict(Y1)
label = model.online_predict(Y2)
label = model.online_predict(Y3)
label = model.online_predict(Y4)
model.online_predict(reset=True)

However, we may not have the bandwidth to work on this any time soon.

can you give some ideas?