CTC or “connectionist temporal classification” is a machine learning technique for mapping dense input data to shorter output sequences in the same order.
Questions tagged [ctc]
85 questions
2
votes
0 answers
CTC loss incorrect computation
Python's input:
sequence1 = [0, 1]
output1 = [[1, 0, 0],[0, 1, 0]]
loss = tf.compat.v1.nn.ctc_loss(
labels=tf.sparse.from_dense([sequence1]),
…

kisak
- 21
- 3
2
votes
1 answer
Adding CTC Loss and CTC decode to a Keras model
I am trying to solve a use case of handwritten text recognition. I have used CNN and LSTM to create a network. The output of this needs to be fed to a CTC layer. I could find some codes to do this in native tensorflow. Is there an easier option for…

NinjaR
- 621
- 6
- 22
2
votes
0 answers
Why word-level language model should help in beam search decoding in ASR?
I was experimenting with beam search decoding of an acoustic model trained with CTC loss trained on an automatic speech recognition task. The version I was using was based on this paper.
However, even though many sources describe integration of…

JAV
- 279
- 2
- 9
2
votes
1 answer
Does NOT `tf.nn.ctc_beam_search_decoder()` support GPU in TensorFlow2?
Now, I try to use tf.nn.ctc_beam_search_decoder() on GPU.
But I have a problem that it does not use GPU.
I was able to check that other tensorflow functions(e.g. Reshape and SigmoidGrad etc.) run on GPU.
But some ones including…

YK_
- 23
- 3
2
votes
1 answer
What do confidence scores mean in speech recognition?
A lot of speech to text services (such as Google's) provide a confidence score. At least for Google it is between 0 and 1, but is clearly not the probability that a particular transcription is correct, as confidences for alternative transcriptions…

ehd
- 77
- 5
2
votes
0 answers
Understanding K.ctc_decode
Here is Keras test test_ctc_decode_greedy for ctc_decode.
Here is my slightly modified example:
def test_ctc_decode_greedy():
def _remove_repeats(inds):
is_not_repeat = np.insert(np.diff(inds).astype(np.bool), 0, True)
return…

mrgloom
- 20,061
- 36
- 171
- 301
2
votes
1 answer
How do you use tensorflow ctc_batch_cost function with keras?
I have been trying to implement a CTC loss function in keras for several days now.
Unfortunately, I have yet to find a simple way to do this that fits well with keras. I found tensorflow's tf.keras.backend.ctc_batch_cost function but there is not…

cr5519
- 53
- 1
- 4
2
votes
0 answers
Custom CTC loss function in Keras/Tensorflow
I feel like I'm fundamentally misunderstanding something. I went through the Keras documentation to no avail. I'm trying to implement the ctc_batch_cost loss for my neural network. My neural network ends with an LSTM layer which returns sequences…

Felix
- 428
- 3
- 9
2
votes
1 answer
Why do I keep getting an error saying "maximum recursion depth exceeded while calling a Python object" in Keras from Tensorflow 2.0?
I am trying to train a stacked neural network architecture with CNNs, GRUs and a CTC in tensorflow 2.0's edition of Keras. I keep getting an error saying "RecursionError: maximum recursion depth exceeded while calling a Python object".
I have tried…

Souheil Fenghour
- 21
- 4
2
votes
1 answer
What's the difference between tf.nn.ctc_loss with pytorch.nn.CTCLoss
For the same input and label:
the output of pytorch.nn.CTCLoss is 5.74,
the output of tf.nn.ctc_loss is 129.69,
but the output of math.log(tf ctc loss) is 4.86
So what's the difference between pytorch.nn.CTCLoss with tf.nn.ctc_loss?
tf:…

liangbin
- 21
- 2
2
votes
0 answers
Combining the outputs of multiple models with CTC output layer(ensemble)
I am trying to combine the results of different models to give a better result(like voting in classification).
Output of my models are from ctc layer, which is probability distribution of the output class for time stamp. It has 2d output (T X P) T…

newlearnershiv
- 350
- 1
- 9
1
vote
0 answers
ImportError: cannot import name 'keras_ctcmodel' from 'keras'
I'm trying to run a Connectionist Temporal Classification Model (Automatic Speech Recognition), and below is the beginning code I got from the example.py in https://github.com/cyprienruffino/CTCModel/blob/master/example.py:
import os
!pip install…

ihavenoidea
- 41
- 1
- 3
1
vote
1 answer
TypeError: Expected keras.losses.Loss, found function
I want to build a TFF model for speech recognition systems. For this, I use the CNN-GRU model architecture with a CTC loss function. but I got error when I wanted to build_federated_averaging_process and think it's about the ctc_loss function but I…

hamid ebrahimi
- 51
- 5
1
vote
2 answers
how to save ocr model from keras author-A_K_Nain
Im studying tensorflow ocr model from keras example authored by A_K_Nain. This model use custom object (CTC Layer). It is in the site:https://keras.io/examples/vision/captcha_ocr/
I trained model using my dataset and then the result of prediction…

PlusCoding
- 13
- 3
1
vote
1 answer
how to implement word beam search ctc to keras?
I am building a handwriting recognition model which currently has 88% validation accuracy. I came across this github page which can help the model achieve more accurate predictions using a dictionary.
The problem is I don't know how to implement…

Mendrix Manlangit
- 89
- 6