What it does
Reading a word or transcribing speech means producing a short string from a long input without knowing where each character starts. A CRNN first uses convolutions to turn a text-line image into a sequence of column features (or raw audio into frames), then a bidirectional LSTM or a transformer encoder gives each frame context from its neighbors. A dense layer outputs, for every frame, a distribution over the characters plus a special blank. Connectionist temporal classification (CTC) decoding takes the best label per frame, merges repeats and removes blanks, so “hh-e-ll-ll-o” becomes “hello”. Training sums over every frame alignment that spells the target.
Formula
f1..T = reshape(CNN(x))pt = softmax(W · BiLSTM(f)t + b) over characters ∪ {blank}text = removeblanks(mergerepeats(argmaxt pt))Shapes and parameters
- Shapes
- Text line [N, 1, 32, 100] → features [N, 256, 1, 25] → frames [25, N, 256] → per-frame scores [25, N, 37].
- Parameters
- Convolutions plus the sequence model plus a frames × classes head. The example sequence model alone is a 1,052,672-parameter bidirectional LSTM.
- Used for
- CRNN English text recognition and Wav2Vec2 speech transcription in the catalog (Wav2Vec2 uses a transformer encoder over convolutional audio frames).
In WeightSpace
Both catalog models are edited at the per-character output bias, including the CTC blank: lowering the blank lets more characters through, and raising one letter makes it win close frames, within ±8.