Gradium × TensorTonic Voice Challenge is open for registration.Register now
TensorTonic guides

Computer Vision Interview Questions and How to Answer Them

The computer vision interview questions that come up most, grouped by topic from image preprocessing to detection, segmentation, Vision Transformers and CLIP, each with a short model answer and a coding problem to practise it.

By TensorTonic's founderLast updated 20 min read

What computer vision interview questions should you expect?

Computer vision interview questions test whether you can treat an image as an array and explain how vision models classify, locate and outline what it contains, across preprocessing, convolutions, pooling, classic architectures, augmentation, transfer learning, object detection, segmentation, Vision Transformers and CLIP. Most are spoken questions with a follow-up on why or when, and the detection and convolution topics are often asked as short coding tasks. TensorTonic has a tested coding problem or lesson for every question in this guide, and its Cracking CV study plan collects 35 computer vision problems in five sections.

This guide groups the questions by topic and gives a short model answer for each, followed by a lesson to read and a problem to solve. The general neural network questions, such as backpropagation, batch normalization and why residual connections work, are covered in deep learning interview questions, and the functions most often asked as code across all of ML are in ML coding interview questions.

What image basics and preprocessing questions do interviewers ask?

Image basics questions ask how an image is stored, how it is prepared for a model and how simple filters change it. They often open the interview because they show whether you think of an image as an array with a shape, a data type and a channel order.

How is an image represented, and why does channel order matter?

An image is usually loaded as an array of height by width by channels with 8-bit values from 0 to 255, while PyTorch models expect a float tensor laid out as channels by height by width. Channel order matters because OpenCV loads colour images as BGR and most pretrained models were trained on RGB, so a missing conversion silently swaps the red and blue inputs. Converting to grayscale is a weighted sum of the three channels, commonly 0.299 R plus 0.587 G plus 0.114 B, because the eye is most sensitive to green.

Write the conversion in the RGB to Grayscale problem, then try Color to Grayscale.

Why do you normalize images with a per-channel mean and standard deviation?

You normalize each channel by subtracting its dataset mean and dividing by its standard deviation so that the inputs are centred near zero with a similar scale, which makes optimization better behaved. When you fine-tune a pretrained model you must reuse the statistics it was trained with, such as the ImageNet means and standard deviations, and apply exactly the same normalization at training and inference time.

Compute the statistics in Per-Channel Mean and Std and apply them in Image Normalize.

How does bilinear resizing work?

Bilinear resizing maps each output pixel back to a fractional position in the source image and takes a weighted average of the four nearest source pixels, with weights that fall off linearly with distance in each direction. Nearest-neighbour resizing copies the closest pixel instead, which is faster but blocky. A common follow-up is how the pixel centres are aligned, because the align_corners convention changes the mapping and therefore the output.

Interpolate a single point in Bilinear Interpolation, then resize a whole image in Bilinear Resize.

What do a Gaussian blur and a Sobel filter do?

A Gaussian blur convolves the image with a kernel shaped like a 2D normal distribution, which removes high-frequency noise and fine detail. A Sobel filter approximates the image derivative in the horizontal and vertical directions, and the gradient magnitude, the square root of the sum of the two squared responses, is large at edges. Blurring before computing gradients is common because derivatives amplify noise.

Build the filters in Gaussian Blur 2D and Sobel Edge Detection.

What convolution questions go beyond the basics?

The basic convolution questions, such as why convolutions suit images and how to compute output size and parameter count, are covered in the deep learning interview questions guide. Computer vision interviews go further into the convolution variants that modern architectures are built from.

How does a convolution handle multiple input channels?

A convolution handles multiple input channels by giving every filter one K by K slice per input channel and summing the results across all channels into a single output map. A layer with C_out filters therefore has a weight tensor of shape C_out by C_in by K by K. Deep learning frameworks actually compute cross-correlation, sliding the kernel without flipping it, which makes no difference once the weights are learned.

The Multichannel 2D Convolution problem has you write the sum over channels with padding and stride.

What is a depthwise separable convolution, and why is it cheaper?

A depthwise separable convolution splits a standard convolution into a depthwise step, which applies one K by K filter to each input channel separately, and a pointwise step, a 1 by 1 convolution that mixes the channels. The parameter count drops from C_in times C_out times K squared to C_in times K squared plus C_in times C_out, which for a 3 by 3 kernel is roughly eight to nine times fewer when there are many output channels. MobileNet and EfficientNet are built on this block.

Write it in the Depthwise Separable Convolution problem.

What is a dilated convolution used for?

A dilated convolution spaces its kernel taps d pixels apart, so a kernel of size K covers d times (K minus 1) plus 1 pixels without any extra parameters. It grows the receptive field without pooling or striding, which keeps the feature map at full resolution, and that is why segmentation models use it. Stacking layers with the same dilation can leave a grid pattern of pixels that are never seen, so dilation rates are usually varied.

Implement it in the Dilated 2D Convolution problem.

What is a transposed convolution, and why can it cause checkerboard artifacts?

A transposed convolution upsamples a feature map by letting every input value scatter a scaled copy of the kernel into a larger output, and with stride S, padding P and kernel K the output height is (H minus 1) times S minus 2P plus K. Checkerboard artifacts appear when the kernel size is not divisible by the stride, because some output pixels receive more overlapping contributions than their neighbours. Resizing with nearest-neighbour or bilinear interpolation and then applying a normal convolution avoids the problem.

Write the scatter step in 2D Transposed Convolution.

What does a 1 by 1 convolution do?

A 1 by 1 convolution applies the same small fully connected layer to the channel vector at every pixel, so it mixes channels and changes their number without looking at neighbouring pixels. Inception modules use it to shrink the channel count before the expensive 3 by 3 and 5 by 5 branches, and ResNet bottleneck blocks use it to reduce and then restore the channels around a 3 by 3 convolution.

The Inception Module problem combines 1 by 1 reductions with parallel branches.

What pooling and receptive field questions should you prepare for?

Pooling questions ask what each kind of pooling keeps and why modern networks end with global average pooling. Receptive field questions ask how much of the input one output unit can see, which links pooling and stride to the choice of architecture.

What is the difference between max pooling and average pooling?

Max pooling keeps the largest value in each window, which preserves the strongest response and makes the output tolerant to small shifts of a feature inside the window. Average pooling keeps the mean, which smooths the response and keeps information from the whole window. Neither has learnable parameters, and many recent networks downsample with strided convolutions instead.

Write both in Max Pool 2D and Average Pool 2D, and read the AlexNet pooling lesson for overlapping pooling windows.

What is global average pooling, and what does adaptive pooling add?

Global average pooling averages each channel over the whole feature map to a single number, which replaces large fully connected layers with a parameter-free step and makes the classifier work for any input size. Adaptive pooling generalises this by choosing window sizes and strides so that the output always has a requested size, such as 7 by 7, whatever the input resolution.

Practise them in Global Average Pooling and Adaptive Average Pool 2D.

How do you compute the receptive field of a stack of layers?

You compute the receptive field layer by layer, starting from 1 pixel with a jump of 1, and for each layer you add (K minus 1) times the current jump and then multiply the jump by the layer stride. Two stacked 3 by 3 convolutions with stride 1 therefore see 5 by 5 pixels and three see 7 by 7, while every stride or pooling layer makes later kernels cover much more of the input. The effective receptive field is smaller than this theoretical value, because pixels near the centre contribute most of the gradient.

The VGG convolution block lesson uses this arithmetic to explain why VGG stacks small kernels.

What classic architecture questions come up?

Architecture questions ask what idea each well-known network introduced and why it worked. You do not need every layer count, but you should explain the key block of VGG, ResNet and EfficientNet and the trade-off each one makes.

Why does VGG use stacks of 3 by 3 convolutions?

VGG uses stacks of 3 by 3 convolutions because two of them cover the same 5 by 5 receptive field as one larger kernel, and three cover 7 by 7, while using fewer parameters and adding a nonlinearity between each pair. For C channels in and out, three 3 by 3 layers need 27 C squared weights against 49 C squared for one 7 by 7 layer. The cost of VGG is its very large fully connected head, which later networks replaced with global average pooling.

Build the block in VGG Convolution Block, and see the whole model in the VGG full network lesson.

What is a ResNet bottleneck block?

A ResNet bottleneck block uses a 1 by 1 convolution to reduce the channels, a 3 by 3 convolution at the reduced width and a second 1 by 1 convolution to expand the channels again, with the input added to the output. It lets ResNet-50 and deeper models add many layers for roughly the compute of a shallower network. When the block changes the spatial size or channel count, the shortcut uses a strided 1 by 1 convolution so the two paths can be added.

The ResNet bottleneck lesson and the ResNet conv block lesson cover both cases, and the ResNet Residual Block problem has you build the basic block.

What ideas does EfficientNet combine?

EfficientNet combines compound scaling, which grows depth, width and input resolution together by fixed ratios instead of scaling only one of them, with a base network found by architecture search. Its main block is an inverted residual that expands the channels with a 1 by 1 convolution, applies a depthwise convolution, reweights the channels with squeeze-and-excitation and projects back down. Squeeze-and-excitation pools each channel to one number, passes the result through two small fully connected layers and a sigmoid, and scales every channel by its output.

Write the channel reweighting in the Squeeze-and-Excitation Block problem and the depthwise step in Depthwise Separable Convolution.

What data augmentation questions do interviewers ask?

Augmentation questions ask which transformations help, which ones damage the labels and how the mixing methods work. Interviewers like follow-ups on detection and segmentation, where the labels must be transformed along with the image.

Which augmentations are common, and when can an augmentation break the label?

Common augmentations for classification are random resized crops, horizontal flips, colour jitter and small rotations, which teach the model that these changes do not alter the class. An augmentation breaks the label when the change matters for the task, such as flipping text or a road sign with a direction, or rotating a 6 into a 9. In detection and segmentation every geometric change must also be applied to the boxes or masks, and augmentation is normally switched off at evaluation.

The AlexNet data augmentation lesson shows the crops, flips and colour changes that made large-scale training work.

How do MixUp and CutMix work?

MixUp draws a weight lambda from a Beta distribution and blends two images and their one-hot labels with that same weight. CutMix instead pastes a random rectangle from one image into another and mixes the labels in proportion to the area of the pasted region. Both act as strong regularizers and improve calibration, and CutMix keeps every pixel natural, which tends to help localization.

Implement both in MixUp Augmentation and CutMix Augmentation.

What transfer learning questions should you expect?

Transfer learning questions ask how you adapt a model pretrained on a large dataset to a smaller task. Most production vision models start this way, so interviewers expect a concrete recipe and the reason behind each step.

How do you fine-tune a pretrained CNN on a small dataset?

You fine-tune a pretrained CNN by replacing its classification head with one sized for your classes, training only that head with the backbone frozen and then unfreezing the later layers with a smaller learning rate. Early layers learn generic edges and textures that transfer well, while later layers are more specific to the original task. The less data you have and the closer it is to the pretraining data, the more layers you keep frozen, and you must reuse the preprocessing the backbone was trained with.

The ResNet full network lesson shows the backbone and the final classifier that fine-tuning replaces.

What happens to batch normalization when you fine-tune with small batches?

Batch normalization layers estimate their statistics from each mini-batch during training, so very small fine-tuning batches give noisy estimates that overwrite the good running averages learned during pretraining. A common fix is to keep the batch normalization layers in evaluation mode, using their stored statistics, while the rest of the network trains. Group normalization is another option because it does not depend on batch size.

The ResNet batch norm lesson explains where the layer sits in each block, and the batch normalization lesson covers the training and inference difference.

What object detection questions do interviewers ask?

Object detection questions ask how a detector proposes boxes, matches them to ground truth, removes duplicates and is scored. IoU, NMS and mAP are the three topics asked most often, and each is also a common coding question.

What is IoU, and how do you compute it?

IoU, or intersection over union, is the area where two boxes overlap divided by the area they cover together, so it is 1 for identical boxes and 0 for boxes that do not touch. For boxes given as corners, the intersection width is the smaller right edge minus the larger left edge, clipped at zero, and the height follows the same rule. The union is the sum of the two areas minus the intersection, and forgetting the clip at zero is the most common bug.

Write it for one pair in Intersection over Union (IoU), then vectorize it in Pairwise IoU.

What are anchor boxes, and how are box offsets encoded?

Anchor boxes are preset boxes at several scales and aspect ratios placed at every position of a feature map, and the detector predicts a class score and an offset for each one. The offsets are usually encoded as the centre shift divided by the anchor width or height and the log of the ratio between the target and anchor sizes, which keeps the regression targets on a similar scale for small and large boxes. During training each anchor is labelled positive or negative by its IoU with the ground-truth boxes.

Generate anchors in Anchor Box Generation and convert between boxes and offsets in Box Encode and Decode.

How does non-maximum suppression work?

Non-maximum suppression sorts the predicted boxes by confidence, keeps the highest-scoring box, removes every remaining box whose IoU with it is above a threshold such as 0.5 and repeats until no boxes are left. It is usually run separately for each class. Soft-NMS lowers the scores of overlapping boxes instead of removing them, which helps in crowded scenes where two real objects overlap heavily.

Write it in Non-Maximum Suppression, then the score-decay version in Soft Non-Maximum Suppression.

How is mean average precision computed?

Mean average precision is computed by sorting the detections of each class by confidence, marking a detection as a true positive when it reaches the IoU threshold with a ground-truth box that has not already been matched, and building a precision-recall curve from the running counts. Average precision is the area under that curve, usually after making precision non-increasing, and mAP is the mean over classes. The COCO metric also averages over IoU thresholds from 0.5 to 0.95 in steps of 0.05, so it rewards tight boxes.

Implement it in Compute Mean Average Precision (mAP), and see the guide to ML evaluation metrics for precision and recall.

What is the difference between one-stage and two-stage detectors?

A two-stage detector such as Faster R-CNN first proposes candidate regions, then crops features for each region with ROI pooling or ROI Align and runs a second head to classify and refine the box. A one-stage detector such as YOLO, SSD or RetinaNet predicts classes and boxes directly from a dense grid, which is faster but faces a huge imbalance between background and object locations. RetinaNet introduced focal loss to handle that imbalance, and ROI Align replaced ROI pooling because bilinear sampling avoids the rounding that misaligns small boxes.

Practise the pieces in ROI Align and Sigmoid Focal Loss.

Why do detectors use a feature pyramid?

Detectors use a feature pyramid because small objects need high-resolution feature maps while recognising them needs the semantic features found deep in the network. A feature pyramid network adds a top-down path that upsamples the coarse deep features and adds them to 1 by 1 projections of the finer earlier maps, so every level has both detail and meaning. Each object is then predicted from the level that matches its size.

Write the merge step in FPN Top-Down Fusion.

Why use a GIoU loss instead of a plain IoU loss?

A GIoU loss is used because plain IoU is zero for every pair of boxes that do not overlap, so it gives no gradient that moves a far-off prediction towards its target. GIoU subtracts from IoU the fraction of the smallest enclosing box that the two boxes do not cover, which still changes when the boxes are apart. CIoU adds penalties for the distance between box centres and the difference in aspect ratio, which speeds up convergence further.

Implement both in Generalized IoU Loss and Complete IoU Loss.

How does DETR avoid non-maximum suppression?

DETR avoids non-maximum suppression by predicting a fixed set of boxes with a transformer and matching them one to one with the ground-truth objects using the Hungarian algorithm before computing the loss. Because each object can be claimed by only one prediction, the model learns not to produce duplicates, and the unmatched predictions are trained to output a no-object class.

The Hungarian Matching problem has you compute the optimal assignment.

What segmentation questions come up?

Segmentation questions ask how the different kinds of segmentation differ, how U-Net recovers full-resolution masks and which loss and metric suit a mask. These questions reuse the transposed convolution and IoU material from earlier sections.

What is the difference between semantic, instance and panoptic segmentation?

Semantic segmentation gives every pixel a class label but does not separate two objects of the same class, so two touching people form one region. Instance segmentation outlines each object separately, usually only for countable things, and Mask R-CNN does this by predicting a mask inside each detected box. Panoptic segmentation combines both, labelling every pixel with a class and an instance identity for countable objects.

Mask R-CNN depends on accurate per-box features, which is what the ROI Align problem builds.

How does U-Net work?

U-Net works with an encoder that halves the resolution and increases the channels at each stage, a bottleneck, and a decoder that upsamples back to full resolution. At each decoder stage it concatenates the encoder features of the same resolution through a skip connection, which restores the fine spatial detail lost during downsampling. A final 1 by 1 convolution turns the features of each pixel into class scores.

The U-Net skip connection lesson and the U-Net full network lesson explain the architecture, and the U-Net Skip Connection problem has you build the join.

Which loss and metric suit segmentation?

Segmentation usually trains with cross-entropy per pixel, often combined with Dice loss, which is 1 minus twice the overlap between the predicted and true masks divided by their total size. Dice loss handles the common case where the foreground is a small fraction of the image, because it ignores the many easy background pixels. The standard metric is mean IoU, the IoU between the predicted and true masks for each class averaged over the classes.

Write them in Dice Loss and Mean IoU for Segmentation.

What Vision Transformer questions do interviewers ask?

Vision Transformer questions ask how an image becomes a sequence of tokens, why ViT needs more data than a CNN and how attention cost is kept under control at high resolution. The attention mechanism itself is the same as in language models.

How does a Vision Transformer turn an image into tokens?

A Vision Transformer cuts the image into non-overlapping P by P patches, flattens each patch and projects it with a shared linear layer to the model width, so a 224 by 224 image with 16 by 16 patches becomes 196 tokens. This projection is equivalent to a convolution whose kernel size and stride both equal the patch size. A learned class token is prepended and position embeddings are added before the transformer encoder, and the final state of the class token feeds the classification head.

The ViT patch embedding lesson walks through the split, and the ViT Patchify and Patchify a Batch of Images problems have you write it.

Why does a Vision Transformer need more data than a CNN?

A Vision Transformer needs more data because it lacks the built-in assumptions of a CNN, namely locality and translation equivariance, and has to learn them from examples. The original ViT only beat strong ResNets after pretraining on datasets much larger than ImageNet. Later work showed that heavy augmentation, regularization and distillation from a CNN teacher let ViTs train well on ImageNet alone.

The ViT full network lesson puts every component together, and the ViT Multi-Head Self-Attention problem has you write the attention block.

How are position embeddings handled when the input resolution changes?

The original ViT learns one position embedding per patch, so a higher input resolution produces more patches than there are embeddings. The usual fix is to reshape the learned embeddings into their 2D grid and interpolate them to the new grid size before fine-tuning. Fixed 2D sine and cosine embeddings avoid learning them at all and can be computed for any grid.

Compute the fixed version in 2D Sinusoidal Positional Embedding, with the ViT position embedding lesson alongside.

How does windowed attention reduce the cost of attention on images?

Windowed attention reduces cost by computing self-attention only among the tokens inside each non-overlapping window, which makes the cost grow linearly with the number of windows instead of quadratically with the number of tokens. The Swin Transformer shifts the windows by half a window between consecutive layers so that information can flow across window borders, and it merges patches between stages to build a CNN-like pyramid.

Write the reshaping step in Window Partition and Reverse.

What contrastive learning and CLIP questions come up?

Contrastive learning questions ask how a model learns useful image features from pairs instead of class labels. CLIP is the example interviewers use most, because it links vision and language and enables zero-shot classification.

How is CLIP trained?

CLIP is trained by encoding a batch of N images and their N captions with separate image and text encoders, normalizing the embeddings and computing an N by N matrix of cosine similarities scaled by a learned temperature. The loss is the average of two cross-entropies, one over each row and one over each column, with the matching pair on the diagonal as the correct class. Every other caption in the batch acts as a negative, so larger batches give a harder and more useful task.

Write the loss in Symmetric CLIP Contrastive Loss, then train a small model end to end in the Tiny CLIP project.

How does CLIP classify images it was never trained to classify?

CLIP classifies images zero-shot by writing one text prompt per class, such as a photo of a dog, embedding every prompt with the text encoder and choosing the class whose embedding has the highest cosine similarity with the image embedding. The same similarity search retrieves images from a caption or captions from an image. Averaging the embeddings of several prompt templates per class usually improves accuracy.

Implement the search in CLIP Cosine Retrieval.

What is the difference between InfoNCE and the SigLIP loss?

InfoNCE treats each positive pair as the correct class in a softmax over all candidates, so every score is normalized against the rest of the batch, and the temperature controls how sharply it focuses on hard negatives. The SigLIP loss scores every image and text pair independently with a sigmoid and a binary label, which removes the batch-wide normalization and makes very large batches cheaper to distribute.

Compare them in InfoNCE Loss and SigLIP Pairwise Loss.

What generative model questions should you prepare for?

Generative model questions in a computer vision interview usually ask you to compare GANs, VAEs and diffusion models and to explain how diffusion is trained. Roles that build image generators go much deeper, and the Diffusion from Scratch study plan covers that material in 26 problems across seven sections.

What is the difference between GANs, VAEs and diffusion models?

A GAN trains a generator against a discriminator that tries to tell real images from generated ones, which gives sharp samples but unstable training and mode collapse. A VAE encodes each image to a distribution over a latent space and is trained on a reconstruction term plus a KL penalty, which is stable but tends to give blurrier images. A diffusion model learns to remove Gaussian noise step by step, which trains stably and gives high-quality samples at the cost of many denoising steps at sampling time.

The GAN mode collapse lesson and the VAE reparameterization lesson explain the two older families, and the GAN Training Step and Variational Autoencoder Forward Pass problems have you write each one.

How is a diffusion model trained?

A diffusion model is trained by picking a random timestep, adding the amount of Gaussian noise that the noise schedule assigns to that step to a clean image in one closed-form jump, and asking a network, usually a U-Net conditioned on the timestep, to predict the noise that was added. The loss is the mean squared error between the true and predicted noise. Sampling starts from pure noise and applies the learned denoising step repeatedly, and samplers such as DDIM reduce the number of steps needed.

Write the objective in Noise Prediction Loss, and measure sample quality with Frechet Distance Between Feature Sets, the calculation behind FID.

Which computer vision interview questions ask you to write code?

The computer vision questions most often asked as code are the ones whose answer is a short NumPy function with careful indexing, such as IoU, non-maximum suppression, a convolution, pooling, resizing and patchifying an image. In these rounds the interviewer checks your box format, your output shapes and your handling of edge cases such as empty inputs as well as the final numbers.

Computer vision interview questions that are often asked as code, what you write, and a problem to practise each
QuestionWhat you writePractice
IoU between boxesIntersection with clipping at zero, union and a vectorized pairwise versionPairwise IoU
Non-maximum suppressionSorting by score, the IoU threshold and the loop that removes overlapping boxesNon-Maximum Suppression
A multichannel 2D convolutionThe sum over input channels with padding, stride and the output shapeMultichannel 2D Convolution
Max poolingThe pooling window, the stride and the output sizeMax Pool 2D
Bilinear resizingThe coordinate mapping and the weighted average of four neighboursBilinear Resize
Box encodingCentre offsets and log-scale size ratios against an anchor, and the inverseBox Encode and Decode
Mean average precisionMatching detections to ground truth, the precision-recall curve and the area under itCompute Mean Average Precision (mAP)
Dice lossSoft overlap between a predicted mask and the true maskDice Loss
Patchify an imageThe reshape and transpose that turn an image into a sequence of flattened patchesViT Patchify
A CLIP lossNormalized embeddings, the similarity matrix and the symmetric cross-entropySymmetric CLIP Contrastive Loss

How should you practise computer vision interview questions?

Practise computer vision interview questions by answering each one out loud and then writing the code for it, because code exposes the off-by-one and box-format errors that a spoken answer hides. Work through image basics and convolutions before detection and segmentation, since those later topics reuse the same indexing and the same IoU arithmetic.

TensorTonic study plans for computer vision interview preparation, with their size and coverage
Study planSizeWhat it covers
Cracking CV35 problems in five sectionsImage basics, convolution and pooling, detection primitives, losses and augmentation, and modern architectures such as ViT and CLIP
Cracking Deep Learning35 problems in six sectionsFoundations, CNNs, RNNs, Transformers, generative models and advanced architectures
Diffusion from Scratch26 problems in seven sectionsGaussian foundations, noise schedules, the denoising network, the training objective, samplers and a full sampling loop
PyTorch30 problems in six sectionsTensors and autograd, layers, training loops, data loading, and convolutions, recurrent cells and attention from scratch

Start with Cracking CV if you have limited time, since it covers the operations asked in most computer vision rounds in one plan. The research section rebuilds papers such as ResNet, U-Net and ViT step by step, and the Computer Vision projects sheet lists larger builds to talk about in the project part of the interview.

What mistakes do candidates make on computer vision questions?

  • Mixing up box formats, such as corner coordinates and centre with width and height, gives IoU and NMS code that runs without errors and returns the wrong answer, so state the format before you start.
  • Forgetting to clip the intersection width and height at zero makes IoU negative or positive for boxes that do not overlap.
  • Running NMS across all classes at once suppresses correct boxes of different classes that happen to overlap, so run it per class unless the question says otherwise.
  • Applying an augmentation to the image but not to its boxes or mask produces labels that no longer match the pixels.
  • Using different normalization statistics at inference than the ones a pretrained model was trained with is a common silent bug that lowers accuracy without any error.
  • Describing a Vision Transformer as simply better than a CNN misses the data and compute trade-off, and interviewers expect you to explain when each one is the better choice.

The guide to ML interview mistakes covers the mistakes that cost candidates across the other rounds of the loop.

Practice this

  • Non-Maximum Suppression uses IoU inside a greedy loop, so one problem covers the two most common detection coding questions.
  • Compute Mean Average Precision (mAP) makes you match detections to ground truth and build a precision-recall curve, which is the standard follow-up to any detection answer.
  • ViT Patchify has you turn an image into tokens with a reshape and transpose, which is the clearest way to explain how a Vision Transformer sees an image.

Then continue with the Cracking CV study plan, or train a vision and language model end to end in the Tiny CLIP project.

Do computer vision interviews still ask classic image processing questions?

Computer vision interviews still ask classic image processing questions, usually as warm-ups or quick coding tasks such as converting to grayscale, resizing with bilinear interpolation or applying a Sobel filter. These questions check that you can index an image array correctly and reason about pixel coordinates. Roles that work on cameras, robotics or on-device models tend to ask more of them than roles that only fine-tune large pretrained models.

Should you learn CNNs or Vision Transformers first for interviews?

You should learn CNNs first, because convolution arithmetic, pooling and residual blocks are asked in almost every computer vision interview and they explain the inductive biases that Vision Transformers give up. Vision Transformers reuse the attention and layer normalization you would learn for language models, so they are quick to add once the CNN material is solid. Most interviewers ask you to compare the two, which needs both.

Which computer vision questions are most often asked as code?

The computer vision questions most often asked as code are IoU between two boxes, non-maximum suppression and a 2D convolution with padding and stride. Pooling, bilinear resizing, mean average precision and patchifying an image for a Vision Transformer come up less often but follow the same pattern of a short NumPy function with careful indexing. Interviewers check the edge cases, such as boxes that do not overlap or an empty list of detections.

Do you need to know OpenCV or PyTorch for a computer vision interview?

You need PyTorch or a similar framework for most computer vision interviews, because model and training questions are set in it, and coding questions are usually allowed in plain NumPy. OpenCV matters for roles that handle raw camera input, where you should know that it loads images in BGR order and in height, width and channel layout. Being able to write the core operations without either library is what interviewers test most directly.

How are computer vision interviews different from general deep learning interviews?

Computer vision interviews go deeper into spatial reasoning than general deep learning interviews, with questions on receptive fields, box geometry, detection post-processing, segmentation masks and how images become tokens. General deep learning interviews spend more time on optimizers, normalization and training stability across all model types. A computer vision loop usually includes some of those general questions too, so prepare both.

Related guides

Keep reading