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
1
vote
0 answers
How do I properly convert tf.compat.v1.nn.ctc_loss to tf.nn.ctc_loss? (TF2)
I am trying to convert parts of my code from using tf.compat.v1 to pure tf functions.
Here is the previous working function, that gives me good performance.
self.loss = tf.reduce_mean(
input_tensor=tf.compat.v1.nn.ctc_loss(
…

JaP
- 87
- 6
1
vote
0 answers
Training loss for ctc is inf, while validation loss seems normal
I have a model, made up of a CNN, RNN, and Output layer. The data I have is a image and the transcription of it. The transcription is padded to a length of 9 characters. For the CTC loss I followed the keras ocr example code so its like this:
class…

jr123456jr987654321
- 294
- 1
- 15
1
vote
1 answer
Making Keras' CTC Loss work for Input with vastly different sizes
So I'm trying to translate morsecode signals to their String representation. Some forms of preprocessing yield one dimensional arrays of normalized floats from [0, 1] that serve as input to a C/RNN. Example:
This image is stretched along the y-axis…

babrs
- 74
- 8
1
vote
1 answer
Invalid argument: Saw a non-null label (index >= num_classes - 1) following a null label
Im getting the following error while doing CTC training:
InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: Saw a non-null label (index >= num_classes - 1) following a null label, batch: 0 num_classes: 40 labels:…

neena
- 31
- 1
- 3
1
vote
1 answer
Error when trying to predict audio: Could not compute output Tensor ("ctc/ExpandDims_22:0"
So i tried to create a speech recognition neural network using the librispeech dataset dev-clean. I tried to convert the code from https://github.com/soheil-mpg/Speech-Recognition into a jupyter notebook.
Everything appears to be working. The model…

jake-salmone
- 21
- 4
1
vote
1 answer
ctcdecode install fail - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-7zcjual1/
I try to install ctcdecode on ubuntu 18.04, but it is not easy.
First, I clone the repository to my server and error occurs when I 'pip install .' at the cloned root repository.
It is the guideline for installation.
git clone --recursive…

biscaya
- 11
- 1
1
vote
1 answer
How to correctly use CTC Loss with GRU in pytorch?
I am trying to create ASR and I am still learning so, I am just trying with a simple GRU:
MySpeechRecognition(
(gru): GRU(128, 128, num_layers=5, batch_first=True, dropout=0.5)
(dropout): Dropout(p=0.3, inplace=False)
(fc1):…

swe87
- 129
- 1
- 3
- 13
1
vote
0 answers
OCR in pytorch/keras with LPRNet and CTCLoss doesn't converge
I implemented LPRNet from this paper in keras and then in pytorch. For pytorch was used this code as example. It didn't converge in any version. Loss starts at 30 and goes to 27 even after 150000 epochs. In pytorch version I am not using validation,…

Vadim Plăcintă
- 87
- 1
- 8
1
vote
2 answers
How can I install CTC-Decode?
I am trying to install CTC-Decode on a windows machine. (https://github.com/parlance/ctcdecode)
I am executing the following code in Git Bash:
git clone --recursive https://github.com/parlance/ctcdecode.git
cd ctcdecode && pip install .
I get the…

VeniJeen
- 19
- 1
- 2
1
vote
1 answer
How to avoid defining target tensors in Tensorflow 2 for CTC loss model?
I am trying to use tf.distribute.MirroredStrategy() for multi GPU training in Tensorflow 2, on a model with CTC loss.
Problem is that model needs defining target_tensors in order to compile.
What can be the cause of that?
Is there some workaround…

Toma
- 83
- 5
1
vote
1 answer
Invalid argument: Not enough time for target transition sequence
how can turn this error into a warning (ignore_longer_outputs_than_inputs) from my code? [.ipynb]
labels = Input(name='the_labels', shape=[max_label_len], dtype='float32')
input_length = Input(name='input_length', shape=[1],…

Febe Febrita
- 21
- 2
1
vote
2 answers
How to use tensorflow ctc beam search properly?
I want to perform CTC Beam Search on (the output of an ASR model that gives) matrices of phoneme probability values.
Tensorflow has a CTC Beam Search implementation but it's poorly documented and I fail to make a working example. I want to write a…

dzsezusz
- 106
- 9
1
vote
0 answers
Is there a tensorflow implementation of EnCTC
Is there a tensorflow implementation of EnCTC described in Connectionist Temporal Classification with Maximum Entropy Regularization?

Mengli Cheng
- 39
- 3
1
vote
0 answers
Implementing CTC without textImagegenerator in keras
In keras/examples/image_ocr ctc loss was calculated using with TextImageGenrator which require monogram file and bigram file.
Can it be possible to feed only image and there ground truth values to calculate loss and predicting text?

Mayank
- 1,364
- 1
- 15
- 29
1
vote
0 answers
Error in K.ctc_batch_cost: tensorflow.python.framework.errors_impl.InvalidArgumentError: sequence_length(0) <= 30
I'm running a CRNN model in Keras to perfrom some handwriting recognition but Im getting an error while computing CTC loss.
The problem only occurs when I'm trying to load a pre-trained network for my CNN. It works fine if I make my own CNN network…

DS_1
- 157
- 1
- 1
- 11