Skip to content

Computer Vision Engineer interview questions

100 real questions with model answers and explanations for Computer Vision Engineer candidates.

See a Computer Vision Engineer resume example

Practice with flashcards

Spaced repetition · Hunter Pass

Questions

A color image is usually a height by width by channels array whose dtype defines how pixel values are stored.

  • A 480 by 640 RGB image commonly has shape (480, 640, 3), with one value per red, green, and blue channel at each pixel.
  • uint8 images normally use integers from 0 to 255, while model inputs often use float32 values from 0 to 1.
  • Converting to float without scaling leaves values up to 255, and converting out-of-range floats to uint8 can clip or wrap values.

Why interviewers ask this: The interviewer checks whether you can reason about the basic memory representation of images without silently corrupting pixel values.

color-space

HSV or Lab can be more useful than RGB when the task benefits from separating brightness from chromatic information.

  • HSV separates hue and saturation from value, so saturated-color rules can tolerate moderate brightness changes better than raw RGB channel cutoffs.
  • Lab separates lightness in L from the opponent-color channels a and b, which helps with color-distance comparisons or lightness normalization.
  • Neither space is automatically illumination invariant: hue is unstable at low saturation and strong color casts still shift values, so I validate the choice under target lighting.

Why interviewers ask this: The interviewer checks whether you can choose a color space for lighting variation while recognizing its limits.

I preserve the aspect ratio and choose interpolation based on whether I am shrinking or enlarging.

  • For a fixed model input, I can letterbox the image with padding or resize then center-crop instead of stretching it.
  • Area interpolation is a good default for shrinking, while bilinear or bicubic interpolation is typical for enlarging photographs.
  • Bounding boxes, masks, and keypoints must receive the same scale and crop, with nearest-neighbor interpolation used for class masks.

Why interviewers ask this: The interviewer is evaluating whether resizing is treated as a coordinated image-and-label operation rather than a cosmetic change.

geometry

Image coordinates usually start at the top-left, with x increasing right and y increasing downward.

  • NumPy indexes a pixel as image[y, x], so swapping x and y is a common source of incorrect crops.
  • An affine transform preserves parallel lines and covers translation, rotation, scaling, and shear using three point pairs.
  • A perspective transform uses four point pairs and can rectify a tilted document, and its matrix must also be applied to annotations.

Why interviewers ask this: The interviewer checks coordinate discipline and a basic understanding of when each geometric transform is appropriate.

convolution

CNN and OpenCV APIs commonly call this operation convolution, although they usually slide the kernel without flipping it, which is mathematical cross-correlation.

  • At each position, the kernel weights produce a local weighted sum that can smooth the image or respond to patterns such as edges.
  • True mathematical convolution flips the kernel across both spatial axes before sliding it; the distinction disappears for symmetric kernels.
  • In a CNN, kernel weights are learned from data, so the network can learn the needed orientation, unlike a fixed filter whose convention must be known.

Why interviewers ask this: The interviewer wants a practical explanation and awareness of the convolution versus cross-correlation convention used by common APIs.

image-kernels

Blur kernels average nearby pixels, while edge kernels respond to rapid intensity changes.

  • A Gaussian blur uses larger weights near the center and can reduce sensor noise before thresholding or edge detection.
  • Sobel kernels estimate horizontal and vertical gradients, whose magnitude highlights likely boundaries.
  • Stronger blur suppresses fine edges too, so kernel size and sigma should match the scale of noise and details.

Why interviewers ask this: A strong answer distinguishes smoothing from differentiation and names the detail-versus-noise trade-off.

distributionsimage-histogram

An image histogram counts how many pixels fall into each intensity or color-value bin.

  • A grayscale histogram concentrated near zero indicates a mostly dark image, while a wide distribution usually means more tonal contrast.
  • Color images can have separate channel histograms, but those counts do not preserve where pixels occur.
  • Histogram equalization can spread intensities to improve contrast, although it may amplify noise or alter an already good image.

Why interviewers ask this: The interviewer checks whether you can interpret a histogram and understand both its usefulness and spatial limitation.

thresholding

I would start with a global threshold and move to data-driven or local thresholds when lighting makes one cutoff unreliable.

  • A global threshold marks pixels above one fixed value, which works for a bright object on a uniform dark background.
  • Otsu's method selects a global cutoff from the histogram when foreground and background form two useful groups.
  • Adaptive thresholding computes cutoffs over local neighborhoods and is often better for a document with uneven illumination.

Why interviewers ask this: The interviewer is looking for a method choice tied to image conditions rather than a memorized list.

morphology

Morphological operations reshape binary regions using a small structuring element.

  • Erosion removes boundary pixels and can eliminate tiny white specks, while dilation expands white regions and can bridge small gaps.
  • Opening applies erosion then dilation to remove small foreground noise without permanently shrinking larger objects as much.
  • Closing applies dilation then erosion to fill small holes or breaks, with the kernel shape setting which structures are affected.

Why interviewers ask this: A strong answer explains the operation order and the concrete defect each sequence fixes.

contoursopencv

Contours are ordered boundary points extracted from connected shapes, usually in a binary image.

  • I first threshold or segment the image because contour extraction expects a clear foreground mask.
  • From a contour I can compute area, perimeter, centroid, or an axis-aligned bounding rectangle.
  • Filtering contours by area can remove small noise, but touching objects may appear as one contour unless separated first.

Why interviewers ask this: The interviewer checks whether you understand both the required input and useful shape measurements.

keypointsdescriptors

A keypoint is a repeatable image location, while a descriptor encodes the appearance around that location for matching.

  • Corners and blobs make useful keypoints because they are easier to localize than a flat patch or a straight edge.
  • ORB produces binary descriptors that can be compared with Hamming distance, while SIFT descriptors use floating-point vectors.
  • Matching descriptors between two images can support alignment, but weak matches should be filtered with distance or ratio tests.

Why interviewers ask this: The interviewer wants to see that detection and description are separate stages with a concrete matching use.

camera-geometry

The intrinsic matrix K maps normalized camera coordinates (X/Z, Y/Z, 1) to homogeneous pixel coordinates: u = fx·X/Z + cx and v = fy·Y/Z + cy.

  • fx and fy express focal length in pixel units, while cx and cy locate the principal point, usually near the image center.
  • Lens distortion coefficients are estimated alongside intrinsics but are not entries in the 3 by 3 intrinsic matrix.
  • Photographing a known checkerboard from several angles lets OpenCV estimate these values for undistortion or pose work.

Why interviewers ask this: The interviewer checks whether you understand pinhole projection, the entries of the intrinsic matrix, and how they are calibrated.

concurrencynumpy

Broadcasting lets NumPy apply compatible smaller arrays across image dimensions without explicit Python loops.

  • Subtracting an array of shape (3,) from an image of shape (H, W, 3) subtracts one mean per channel.
  • Dimensions are compatible when they are equal or one of them is 1, compared from the trailing axis backward.
  • I inspect shapes before arithmetic because an accidental (H, W) versus (H, W, 1) mismatch can fail or produce an unintended result.

Why interviewers ask this: A strong answer gives a real channel-wise example and states the compatibility rule.

Tensor strides describe how memory addresses change along each axis, while a contiguous tensor stores values in the standard packed order for its shape.

  • Operations such as transpose or permute often return a view with changed strides instead of copying data, so the result may be non-contiguous.
  • View and native CPU or GPU code that assumes packed memory may require a contiguous tensor; reshape may return a view or make a copy when needed.
  • I inspect strides and contiguity at an API boundary and call contiguous only when required because the copy costs time and memory.

Why interviewers ask this: The interviewer checks whether you can connect tensor views and memory layout to reshape behavior and native-library contracts.

normalization

Normalization puts input values on the scale and distribution expected during training.

  • A basic pipeline converts uint8 values from 0 to 255 into float32 values from 0 to 1.
  • Many pretrained PyTorch models then subtract a channel mean and divide by a channel standard deviation supplied with the weights.
  • Training and inference must use the same channel order and normalization, or predictions can degrade even though tensor shapes are correct.

Why interviewers ask this: The interviewer evaluates whether you see normalization as part of the model contract rather than an optional cleanup step.

validation

The three splits separate parameter fitting, model selection, and final unbiased evaluation.

  • The training set updates weights, while the validation set guides choices such as learning rate, augmentation, and stopping epoch.
  • The test set should remain untouched until the approach is fixed, otherwise repeated decisions indirectly tune to it.
  • I keep related samples such as frames from one video or images from one patient in the same split.

Why interviewers ask this: The interviewer checks whether your evaluation setup prevents optimistic results from repeated tuning or related samples.

cv

The label format depends on whether the task predicts classes, boxes, masks, or points.

  • Classification may use a CSV mapping image paths to class IDs or one directory per class.
  • Detection commonly uses COCO JSON, Pascal VOC XML, or YOLO text files with class and box coordinates.
  • Segmentation uses per-pixel mask images or polygons, and I visualize parsed labels over images before training to catch coordinate errors.

Why interviewers ask this: A strong answer links formats to tasks and includes a practical validation step.

imbalance

I would measure per-class counts and metrics first, then rebalance training without changing the validation distribution.

  • A weighted loss can make mistakes on a rare class contribute more than mistakes on a frequent class.
  • A weighted sampler or targeted augmentation can show rare examples more often, but heavy duplication may overfit those images.
  • I report per-class precision and recall because high overall accuracy can hide failure on the minority class.

Why interviewers ask this: The interviewer wants a measured response that addresses both training and honest evaluation.

augmentationocr

I reject an augmentation when it creates an implausible sample or changes the target meaning in a way the labels cannot represent.

  • For OCR, a horizontal flip usually creates mirrored text, while a rotation is valid only if that orientation can occur and the recognition target remains defined.
  • For directional classes such as left-turn and right-turn signs, a horizontal flip must swap the class; if the pipeline cannot do that reliably, I disable the flip.
  • For pose data, a flip must transform coordinates and swap left and right keypoint identities and handedness labels; otherwise it teaches contradictory semantics.

Why interviewers ask this: The interviewer checks whether augmentation policy follows task semantics, especially text orientation and semantic left-right labels.

cvleakage

Data leakage occurs when evaluation data or information derived from it influences training.

  • Randomly splitting adjacent video frames can put nearly identical images in train and validation, inflating the score.
  • Duplicate images, crops from the same source, or photos of the same subject should be grouped before splitting.
  • Normalization statistics and preprocessing thresholds learned from data must be fitted on the training split only.

Why interviewers ask this: A strong answer identifies vision-specific leakage paths rather than defining leakage only in abstract terms.

Locked questions

  • 21

    What does an image classification model predict?

    classification
  • 22

    How does object detection differ from image classification?

    classificationdetection
  • 23

    What is the difference between semantic and instance segmentation?

    segmentation
  • 24

    What does a keypoint or pose estimation model output?

    keypoints
  • 25

    What are the main stages of a basic OCR pipeline?

    ocrci-cd
  • 26

    What is a feature map in a CNN?

    feature-mapscnn
  • 27

    How do stride and pooling change a CNN feature map?

    feature-mapscnn
  • 28

    What is the receptive field of a CNN unit?

    cnnreceptive-field
  • 29

    Why do neural networks need activation functions?

    neural-netsactivation
  • 30

    When should you use sigmoid instead of softmax?

  • 31

    What does cross-entropy loss measure in classification?

    classificationloss-functions
  • 32

    How do binary, multiclass, and multilabel classification differ?

    classification
  • 33

    What is bounding-box regression loss used for?

  • 34

    What do an optimizer and learning rate do during training?

    optimization
  • 35

    What is the difference between a batch and an epoch?

    batch
  • 36

    How can you recognize overfitting and underfitting from learning curves?

    overfitting
  • 37

    How do dropout and weight decay regularize a neural network?

    neural-nets
  • 38

    What is transfer learning, and why is it useful in computer vision?

    cv
  • 39

    When would you freeze and unfreeze layers during fine-tuning?

    fine-tuning
  • 40

    How do accuracy, precision, recall, and F1 differ?

    evaluation
  • 41

    How do you read a confusion matrix?

    evaluation
  • 42

    What is Intersection over Union?

    union
  • 43

    What do AP and mAP mean in object detection?

    detection
  • 44

    How do ranking metrics differ from probability calibration?

    probabilitymonitoringcalibration
  • 45

    What are the responsibilities of a PyTorch Dataset and DataLoader?

    pytorch
  • 46

    How should a validation loop aggregate metrics across uneven batch sizes?

    aggregationbatchmonitoring
  • 47

    What can seeds do for reproducibility, and what can they not guarantee?

  • 48

    What should a training checkpoint contain?

  • 49

    What changes when running a PyTorch model on CPU versus GPU?

    hardwarepytorch
  • 50

    How would you keep code, configuration, and model artifacts organized in a computer vision project?

    configartifactscv
  • 51

    A training job crashes when it reaches one missing or corrupt JPEG. How would you debug and handle it?

  • 52

    An image loaded with OpenCV looks blue in Matplotlib even though the source is red. What would you fix?

    opencv
  • 53

    A PyTorch model expects input shaped N,C,H,W, but your batch arrives as N,H,W,3. How would you resolve it?

    batchpytorch
  • 54

    Subtracting 20 from a dark uint8 image produces bright pixels instead of zeros. What happened and how would you fix it?

  • 55

    You resize a 1920 by 1080 image to 640 by 360, but its detection boxes stay in the old coordinates. How would you correct them?

  • 56

    Random crops improve segmentation training, but masks no longer match the objects. What would you change?

    segmentation
  • 57

    You fitted a scaler and PCA on image embeddings before splitting the dataset, and validation accuracy looks unusually high. What is wrong?

    nlpembeddingsvalidation
  • 58

    Train and validation folders have different filenames, but many images look almost identical. How would you check for leakage?

    leakagevalidation
  • 59

    A defect classifier has 95% normal images and 5% defective images. What baseline would you build?

    defects
  • 60

    You have only 120 labeled images and want to confirm that a classifier pipeline can learn at all. What experiment would you run?

    experimentsci-cd
  • 61

    The loss becomes NaN after 300 training steps. How would you investigate it?

  • 62

    Training a detector fails with CUDA out of memory after increasing image size. What would you do first?

    memory
  • 63

    The GPU waits between batches and training is much slower than expected. How would you examine the DataLoader?

    batchhardware
  • 64

    Validation accuracy changes between repeated runs on the same checkpoint. What model-state bug would you check?

    validation
  • 65

    A binary classifier reports 99% accuracy, but its confusion matrix looks wrong. How would you verify the metric target?

    evaluationmonitoring
  • 66

    One multilabel classifier detects helmets well but rarely flags safety vests. Would you use one threshold for every class?

    thresholding
  • 67

    An object detector draws five overlapping boxes around the same car. How would you debug the duplicate detections?

  • 68

    A detector returns too many false alarms at confidence 0.25. How would you choose a better confidence threshold?

    thresholding
  • 69

    Your detector finds large vehicles but misses distant small ones. What would you inspect before changing architecture?

    architecture
  • 70

    A segmentation model's predicted mask is shifted several pixels from the object after preprocessing. How would you locate the alignment error?

    segmentation
  • 71

    Resizing a class mask creates unexpected label values such as 1.4 and 2.7. What would you change?

  • 72

    YOLO training shows no labeled objects even though every image has a text label file. How would you debug the labels?

    yolo
  • 73

    A COCO training loader rejects a newly exported annotations JSON. What validation would you run?

    validation
  • 74

    A model's validation metric improved, but you are unsure whether its predictions are actually better. What would you visualize?

    datavizmonitoringvalidation
  • 75

    Before training on 30,000 newly annotated images, how would you perform basic annotation QA?

  • 76

    Two Label Studio annotators interpret partially occluded objects differently because the written instruction is unclear. What would you do?

  • 77

    An ImageNet-pretrained classifier may not transfer well to grayscale factory X-rays. What experiment would show whether domain mismatch limits transfer learning?

    experiments
  • 78

    A daytime classifier fails on dim warehouse images. What low-light augmentation would you try?

    augmentationwarehouse
  • 79

    A package detector works on still photos but fails when a conveyor moves quickly. How would you test motion-blur robustness?

  • 80

    An OpenCV camera loop occasionally skips frames while inference runs. How would you diagnose the drops?

    inferenceopencv
  • 81

    You must build a training set from a ten-hour security video without labeling every frame. How would you sample it?

    train-test
  • 82

    A basic object tracker reuses old IDs after a video reconnect, confusing downstream counts. What would you change?

  • 83

    You need a top-down view of a rectangular document photographed at an angle. How would you use a perspective transform?

    geometry
  • 84

    OpenCV cannot find checkerboard corners in several camera-calibration photos. What would you inspect?

    calibrationopencv
  • 85

    OCR misses dark text on a noisy receipt photo. What preprocessing experiment would you run?

    ocrexperiments
  • 86

    You exported a PyTorch classifier to ONNX. What smoke test would you run before handing it off?

    serving-runtimessmokepytorch
  • 87

    You need an edge inference baseline for an ONNX detector. How would you compare ONNX Runtime with a TensorRT option?

    inferenceserving-runtimes
  • 88

    Post-training static INT8 quantization makes a classifier faster. How would you check whether the accuracy loss is acceptable?

    model-compression
  • 89

    A demo reports one 12 ms inference and claims the model meets latency requirements. How would you benchmark it properly?

    inferencelatencybenchmarking
  • 90

    Batching eight images raises throughput but makes each API request wait longer. How would you choose batch size?

    throughputapibatch
  • 91

    A teammate cannot reproduce your OpenCV inference result on another laptop. How would Docker help?

    inferencedockeropencv
  • 92

    Your trained model is 800 MB and should not be committed to Git. How would you share and version it?

    git
  • 93

    Your CUDA job is unexpectedly slow on a shared Linux machine. What would you check with nvidia-smi and process tools?

    concurrency
  • 94

    A classifier scores well in validation but fails in the API because colors and confidence scores differ. How would you check preprocessing parity?

    validationapi
  • 95

    An inference API accepts uploaded images. What validation would you perform before decoding and running the model?

    inferenceapivalidation
  • 96

    A production prediction looks wrong, but the API logs only a free-form message. What structured fields would you add?

    formsapi
  • 97

    A dataset for people counting contains visible faces. How would you handle privacy in your first pipeline?

    ci-cd
  • 98

    An interviewer asks you to explain your package-detection project. How would you present it with metrics?

    monitoring
  • 99

    You review a notebook whose accuracy changes each time its cells are run. What nondeterminism problems would you flag?

  • 100

    Model-assisted labeling pre-fills boxes, but a spot check shows annotators often accept predictions that miss objects. How would you check and correct the workflow?