More in AI & ML — page 15
Fundamental matrix versus essential matrix
WHAT IT TESTS: epipolar algebra. OUTLINE: both relate corresponding points across two views via the epipolar constraint; the fundamental matrix works in pixel coordinates, the essential matrix in calibrated coordinates and encodes relative pose.
Disparity and depth in stereo vision
WHAT IT TESTS: stereo depth fundamentals. OUTLINE: disparity is the horizontal shift of a point between left and right images; depth is inversely proportional to disparity given baseline and focal length.
Epipolar constraint for correspondence search
WHAT IT TESTS: two-view geometry basics. OUTLINE: the match for p1 must lie on its epipolar line in the second image, reducing a 2D search to 1D; the relation is encoded by the fundamental matrix.
Feature choice for real-time mobile SLAM
WHAT IT TESTS: system-level feature trade-offs. OUTLINE: pick ORB for fast FAST keypoints and cheap binary descriptors matched by Hamming distance; accept reduced robustness versus SIFT for real-time, low-power operation.
CNN features for image retrieval
WHAT IT TESTS: transfer learning for features. OUTLINE: pass the image through a pretrained CNN and read activations from a late layer as a descriptor; deeper layers encode semantics, earlier layers encode texture.
Bag of Visual Words model
WHAT IT TESTS: classic image representation. OUTLINE: cluster many local descriptors (e.g. k-means) into visual words; assign each image's features to words; represent the image as a histogram of word counts for a classifier.
Descriptor matching and Lowe's ratio test
WHAT IT TESTS: robust feature matching. OUTLINE: match by nearest-neighbor descriptor distance; Lowe's ratio test keeps a match only if the best is clearly better than the second-best, rejecting ambiguous ones.
SIFT versus SURF versus ORB
WHAT IT TESTS: feature-method trade-offs. OUTLINE: SIFT is most accurate but slow with float descriptors; SURF approximates SIFT for speed; ORB is fast, binary, and free, ideal for real-time and embedded.
SIFT scale and rotation invariance
WHAT IT TESTS: how SIFT achieves invariance. OUTLINE: scale-space extrema via difference-of-Gaussians give scale invariance; a dominant gradient orientation gives rotation invariance; the descriptor is a normalized gradient histogram.
Image gradients, Sobel, and Canny
WHAT IT TESTS: edge-detection foundations. OUTLINE: the gradient measures local intensity change in x and y; Sobel approximates it via convolution kernels; Canny uses gradient magnitude and direction plus non-max suppression and hysteresis.
Harris corner detector and corner stability
WHAT IT TESTS: feature detection intuition. OUTLINE: Harris finds points where intensity changes strongly in all directions using the structure tensor of gradients; corners are well localized in two directions, unlike edges.
Image rotation: forward versus inverse mapping
WHAT IT TESTS: geometric warping mechanics. OUTLINE: forward mapping sends source pixels to non-integer destinations, leaving holes and overlaps; inverse mapping iterates over output pixels, finds the source location, and interpolates.
Removing salt-and-pepper noise
WHAT IT TESTS: filter choice for impulse noise. OUTLINE: use a median filter; it replaces a pixel with the neighborhood median so extreme outliers are discarded. RED FLAG: choosing Gaussian blur, which averages outliers in and smears edges.
Lens distortion and camera calibration
WHAT IT TESTS: camera-model fundamentals. OUTLINE: radial distortion bends straight lines (barrel/pincushion), tangential comes from lens-sensor misalignment; calibrate with a known pattern to estimate intrinsics and distortion coefficients.
RGB versus HSV color spaces
WHAT IT TESTS: color representation intuition. OUTLINE: RGB mixes three light channels; HSV separates hue, saturation, value so color identity decouples from brightness.
Zero-Shot, Few-Shot, and Chain-of-Thought Trade-offs
WHAT IT TESTS: judgment about prompting strategies. OUTLINE: zero-shot is cheap but weak on reasoning, few-shot adds demos at token cost, CoT boosts multi-step accuracy but spends the most tokens and latency.
FlashAttention and IO-Aware Attention
WHAT IT TESTS: hardware-aware optimization of attention. OUTLINE: FlashAttention is IO-aware, tiling and fusing attention in fast SRAM to avoid materializing the n-by-n matrix in slow HBM. RED FLAG: claiming it changes the math or lowers asymptotic compute.
Causal versus Masked Language Modeling
WHAT IT TESTS: understanding LLM pre-training objectives. OUTLINE: pre-training learns general language from unlabeled text; CLM predicts the next token left-to-right, MLM predicts masked tokens using both sides.
Layer Norm and Residuals in Transformer Blocks
WHAT IT TESTS: how Transformer blocks stay trainable at depth. OUTLINE: residuals preserve gradient flow, layer norm stabilizes activations per token, and it beats batch norm because it is independent of batch and sequence length.
Why Multi-Head Attention
WHAT IT TESTS: rationale for splitting attention into heads. OUTLINE: multiple heads attend to different subspaces and relations in parallel, which one big head averages away. RED FLAG: claiming more heads is always better or that it raises total compute.