A team building a video-analytics pipeline asked us a familiar question last quarter: should the temporal layer be a recurrent neural network, a 3D convolutional stack, or a transformer? The honest answer is that the choice depends on sequence length, latency budget, and how much labelled temporal data you actually have. Recurrent neural networks (RNNs) — particularly the LSTM and GRU variants — are no longer the default for sequence modelling, but they remain the right call for a narrow, well-defined set of computer vision problems where memory matters more than parallelism. That narrow set is what this article is about. We want to separate where RNNs still earn their footprint from where they have been displaced, and to do it with enough specificity that an engineering team can decide for their own pipeline. What an RNN actually contributes to a vision pipeline In a standard convolutional pipeline, each frame is processed independently. A computer vision pipeline that understands images at the semantic level works frame-by-frame: classify, detect, segment, done. The pipeline has no idea that frame 47 was preceded by frame 46. For static-image tasks this is fine. For anything where the meaning of the current frame depends on what happened earlier, you need a temporal layer. An RNN provides that temporal layer by maintaining a hidden state that is updated at each time step. The hidden state is a learned, fixed-length summary of everything the network has seen so far in the sequence. At step t, the network takes the current input (typically a CNN feature vector from frame t) and the previous hidden state ht-1, and produces a new hidden state ht and an output. The hidden state is what carries context forward. This is a different computational pattern from a transformer, which attends to all previous tokens in parallel. RNNs are inherently sequential — step t cannot be computed until step t-1 is done. That sequential constraint is both the weakness (no parallelism within a sequence) and the practical strength (constant memory per step regardless of sequence length). Where the architecture earns its cost In our experience, RNN-class layers are the right choice for vision when three conditions hold together: The sequence is long enough that the temporal signal matters, but short enough that the vanishing-gradient problem is manageable with an LSTM or GRU — roughly 30 to 300 frames. Latency requirements are tight enough that the quadratic memory cost of full self-attention over the sequence is prohibitive. The deployment target is constrained (edge device, embedded GPU) and a recurrent layer’s fixed per-step cost is easier to budget than a transformer’s growing KV cache. When all three hold, a CNN-RNN hybrid — typically a backbone like ResNet or MobileNet feeding into a one- or two-layer LSTM or GRU — remains a strong baseline. We see this pattern regularly in industrial inspection systems where a sequence of frames from a single camera angle needs to be reduced to a per-clip decision. How RNNs Work in a CV Context The mechanics are worth being concrete about. For a video classification task with 64 frames at 224×224 RGB, a typical CNN-RNN pipeline does the following: Each frame is passed through a pretrained CNN backbone (ResNet-50, EfficientNet, or similar) to produce a feature vector — say, 2048-dimensional after global average pooling. The 64 feature vectors form a sequence of length 64 in feature space, not pixel space. The sequence is fed to an LSTM with a hidden size of 256–512. The final hidden state, or sometimes the mean of all hidden states, feeds a classification head. The whole stack is trained end-to-end if there is enough labelled data, or with the CNN frozen if there is not. The crucial design choice is operating on CNN features rather than raw pixels. Feeding raw frames into an RNN ignores the spatial inductive bias that CNNs provide, and the model spends capacity relearning edge detection at every time step. The CNN handles spatial structure; the recurrent layer handles temporal structure. This separation of concerns is what makes the hybrid practical. The vanishing-gradient problem and why LSTM and GRU exist A vanilla RNN multiplies gradients through the same weight matrix at every time step during backpropagation through time. If the dominant eigenvalue of that matrix is less than one, gradients shrink exponentially with sequence length; if it exceeds one, they explode. For sequences beyond about 10–20 steps, vanilla RNNs in practice stop learning long-range dependencies. LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Unit) cells were designed to fix this. Both introduce gating mechanisms — learned, input-dependent multiplications between 0 and 1 — that let the network choose which information to keep, update, or discard at each step. The gating creates an additive path for the cell state that does not pass through repeated nonlinearities, which mitigates the vanishing-gradient issue. In practice, GRUs use fewer parameters than LSTMs and train faster, but LSTMs often edge ahead on tasks requiring fine-grained control over what to remember. For most vision sequence tasks, a one- or two-layer GRU is a reasonable starting point. When RNNs Are the Wrong Choice This is where the honest comparison matters. Since roughly 2020, transformer-based architectures have displaced RNNs in most sequence-modelling benchmarks. For computer vision specifically, the shift looks like this: Task Common architecture today Where RNNs still appear Action recognition (short clips) Video transformers (TimeSformer, VideoMAE), 3D CNNs (SlowFast) Edge deployments with tight memory budgets Long-form video understanding Hierarchical transformers with temporal pooling Streaming pipelines where parallel attention is too expensive Image captioning Vision-language transformers (BLIP, CLIP-based decoders) Legacy systems; lightweight on-device captioners Lip reading Conformer/transformer hybrids LSTM-based systems for low-latency on-device inference Medical image sequence analysis 3D CNNs, transformer-based volumetric models Slice-by-slice analysis where memory is bounded Object tracking across frames Transformer-based trackers (MOTR), Kalman + appearance Lightweight LSTM trackers on embedded hardware The displacement is real, but it is not total. Transformers parallelise across the sequence dimension, which is a training-throughput advantage on GPUs but does not change inference cost when frames arrive one at a time in a streaming scenario. For a 30-fps camera feeding a tracking system, the model only ever sees one new frame per 33 ms. An RNN’s per-step cost is constant; a transformer’s grows with the context window unless windowed or cached carefully. What we tell clients building production pipelines We design CV systems across automotive, healthcare, and industrial inspection, and the temporal-layer decision comes up often. Our default guidance is: If you are training from scratch on a large labelled video dataset and have GPU budget, start with a video transformer or 3D CNN. The accuracy ceiling is higher. If you are deploying to a fixed-budget edge device with strict latency requirements, a CNN-GRU hybrid is often the most practical baseline. If you have very little labelled temporal data, do not train a transformer from scratch. Use a pretrained image backbone with a small recurrent head — or use a pretrained video model and fine-tune. This is observed pattern from across our engagements, not a benchmark. The right architecture for your pipeline depends on data volume, latency, and deployment hardware in combination, not on which architecture is currently fashionable. CNNs and RNNs as a Hybrid: What Actually Happens in Production The CNN-RNN hybrid is worth a closer look because it remains the dominant practical pattern for resource-constrained temporal vision. In a typical deployment: The CNN backbone is run on each incoming frame. On an embedded GPU like the NVIDIA Jetson Orin, a quantized MobileNet-V3 can extract features at 60–120 fps. Features are pushed into a ring buffer of fixed length (commonly 16, 32, or 64 steps). The RNN consumes the buffer and produces either a per-step output (for streaming) or a single output at the end of a window (for clip-level decisions). The whole pipeline is exported to TensorRT or ONNX Runtime for deployment, with the CNN and RNN often as separate engines connected by a thin glue layer. The reason this layered approach manages complexity is that each layer has a clean responsibility. The CNN handles “what is in this frame” — feature maps, object detection, segmentation outputs. The RNN handles “how has this changed” — memory, sequence patterns, progression over time. Debugging is tractable because you can inspect the CNN outputs independently of the recurrent state. Bidirectional, stacked, and attention-augmented variants Several variants of the basic RNN architecture are worth knowing: Bidirectional RNNs process the sequence forward and backward, then concatenate the hidden states. They are useful when the full sequence is available offline — for example, post-hoc analysis of a recorded surgical video. They are not usable in streaming scenarios because they require future frames. Stacked RNNs use multiple recurrent layers, with each layer’s hidden state feeding the next. Two layers is a common sweet spot; beyond three, returns diminish and training becomes harder. Attention-augmented RNNs add a soft-attention mechanism over the input sequence at each output step. These were the bridge architecture between pure RNNs and pure transformers, and they remain useful when you want some attention behaviour without paying the full quadratic cost. Practical Use Cases Where RNNs Still Make Sense A few application areas where we still see RNN-class layers performing well: In industrial inspection, where a part rotates past a camera over 30–60 frames, an LSTM head on top of a CNN backbone is reliable and cheap. The temporal signal is short, the deployment is at the edge, and the latency budget is tight. This is a textbook case for a CNN-GRU. In medical imaging with volumetric data — for instance, CT or MRI scans where consecutive slices show the progression of an anatomical structure — a recurrent layer over slice features captures inter-slice dependencies more efficiently than a full 3D transformer when memory is bounded. This is one specific facet of the broader 3D visual computing problem that overlaps with temporal modelling. In gesture recognition on mobile or wearable devices, where the sequence is short (30–90 frames), the latency requirement is sub-100 ms, and the model needs to run on a phone or smartwatch SoC, a CNN-GRU is typically more efficient than a transformer of equivalent accuracy. In streaming lip reading, where audio is augmented with visual features from mouth crops, a CNN-LSTM stack still delivers acceptable word error rates on lightweight hardware. Conformer-based systems are more accurate but heavier. Data and Training Considerations Training data for sequence models must respect temporal order — that point is non-negotiable. Augmentations that randomly reorder frames will silently destroy the model’s ability to learn temporal patterns. Standard augmentations like spatial cropping, colour jitter, and horizontal flipping must be applied consistently across the entire sequence, not per-frame. For limited-data regimes, the practical pattern is to use a pretrained image backbone (ImageNet-pretrained ResNet, or a self-supervised backbone like DINOv2) and train only the recurrent head. This dramatically reduces the amount of labelled video data needed and is the most common pattern we see in production. Mixed-precision training (FP16 or BF16) speeds up RNN training substantially on modern GPUs, though gradient clipping is more important than for transformers — LSTMs are prone to exploding gradients when the batch contains long sequences. FAQ How TechnoLynx helps We design and ship deep-learning systems where the temporal layer is one architectural choice among several. Our work spans healthcare, security, and industrial automation, and we have built CNN-RNN hybrids, 3D CNN pipelines, and transformer-based video models depending on what the deployment constraints actually demanded. If you are scoping a sequence-aware vision system and want a second opinion on whether an RNN, transformer, or 3D CNN is the right call for your specific pipeline, we are happy to help. Image credits: Freepik.