Computer Visionbeginner5 min

Image Augmentation Strategies

Preventing overfitting and regularizing vision models using advanced interpolation and automated data augmentation pipelines.

Image Augmentation expands training dataset diversity by applying synthetic transformations to input images. Traditional augmentations include random cropping, flipping, color jittering, and rotation. Advanced regularizers like Mixup blend two images and their labels linearly: x = λ x_A + (1-λ) x_B. CutMix patches a rectangular region of image B into image A, setting target label proportions equal to patch area. RandAugment automates hyperparameter search by applying a small sequence of randomly sampled operations with uniform magnitude.

Computer Visionbeginner4 min

Resizing, Normalization & Colour Spaces

Standardizing raw pixel data via resizing, normalization, and color space transformations for computer vision models.

Image Preprocessing converts raw camera pixels into clean, standardized input tensors for computer vision models. Key operations include Aspect Ratio Preserving Resizing (padding vs letterboxing), Channel Normalization using ImageNet mean and standard deviation, and Color Space Conversions (RGB, BGR, HSV, Lab). Correct preprocessing prevents aspect ratio distortion and matches pretraining feature statistics.

Computer Visionintermediate5 min

ResNet, EfficientNet & Friends

Tracing the evolution of computer vision backbones from AlexNet to ResNet and modern ConvNeXt.

Image Classification architecture design evolved from early deep CNNs (AlexNet, VGG) to residual skip-connections (ResNet) and modern modernized ConvNets (ConvNeXt). AlexNet proved GPU deep learning feasibility. VGG introduced small 3x3 filter stacking. ResNet solved vanishing gradients in 100+ layer networks using residual identity skip connections y = F(x) + x. ConvNeXt modernized convolutional architectures by adopting Vision Transformer design principles (7x7 depthwise separable convolutions, LayerNorm, GELU activations).

Computer Visionintermediate4 min

IoU & Non-Max Suppression

Evaluating spatial overlap accuracy and pruning redundant duplicate bounding boxes.

Intersection over Union (IoU) measures spatial overlap between predicted bounding box A and ground-truth box B (IoU = Area of Overlap / Area of Union). Non-Maximum Suppression (NMS) is a mandatory post-processing algorithm that eliminates duplicate overlapping bounding boxes around the same object, keeping only the highest-confidence prediction. Soft-NMS decays confidence scores progressively rather than hard-deleting overlapping boxes, improving detection of crowded objects.

Computer Visionintermediate5 min

Mean Average Precision (mAP)

Evaluating object detection performance across precision-recall trade-offs and IoU thresholds.

Mean Average Precision (mAP) is the universal benchmark metric for evaluating object detection models (COCO / Pascal VOC). It calculates the Area Under the Precision-Recall Curve (Average Precision - AP) for each category at a specific IoU threshold (e.g., mAP@50), then averages across all object classes. COCO mAP (mAP@[.50:.95]) averages AP across 10 IoU thresholds from 0.50 to 0.95 in steps of 0.05, rewarding precise bounding box localization.

Computer Visionintermediate5 min

Semantic vs Instance Segmentation

Distinguishing pixel-level semantic classification, individual object instance masks, and unified panoptic scene understanding.

Image Segmentation assigns pixel-level class labels to an entire image. Semantic Segmentation classifies every pixel into a category (e.g. 'person', 'road', 'sky') without distinguishing separate object instances. Instance Segmentation identifies and masks distinct individual object instances (e.g. 'person #1', 'person #2'). Panoptic Segmentation unifies both, labeling stuff pixels (background road/sky) and thing pixels (countable individual objects) in a single output.

Computer Visionintermediate5 min

OCR Pipelines

Extracting text from unstructured images using two-stage detection and sequence recognition models.

Optical Character Recognition (OCR) converts text images into machine-readable digital text strings. Industrial OCR pipelines combine two stages: Text Detection (locating bounding boxes or polygons around text using EAST or DBNet) and Text Recognition (converting cropped text images into characters using CRNN + CTC Loss or Vision Transformer Decoders like TrOCR). Connectionist Temporal Classification (CTC) loss enables sequence training without explicit character-level alignment annotations.

Computer Visionadvanced5 min

Object Detection: R-CNN to YOLO

Identifying what objects are in an image and predicting their exact 2D bounding box locations.

Object Detection combines image classification (identifying category labels) and localization (predicting bounding box coordinates [x_center, y_center, width, height]). Key components include Backbone feature extractors (ResNet, CSPDarknet), Feature Pyramid Networks (FPN) for multi-scale object detection, Bounding Box Regression loss (CIoU / GIoU), and Non-Maximum Suppression (NMS) to eliminate duplicate overlapping predicted boxes.

Computer Visionadvanced5 min

One-Stage vs Two-Stage Detectors

Comparing slow high-accuracy Two-Stage region proposal detectors against ultra-fast One-Stage single-pass detectors.

Object detectors divide into Two-Stage (Faster R-CNN, Mask R-CNN) and One-Stage (YOLO, SSD, RetinaNet, DETR) architectures. Two-stage detectors first generate candidate Region Proposals via a Region Proposal Network (RPN), then classify and refine boxes in Stage 2, achieving high accuracy. One-stage detectors predict bounding boxes and class probabilities directly from feature maps in a single dense forward pass, enabling real-time FPS video processing.

Computer Visionadvanced4 min

Anchor Boxes & Anchor-Free Detection

Using predefined reference bounding boxes across aspect ratios to guide multi-scale object detection.

Anchor Boxes are pre-defined reference bounding boxes of fixed shapes and aspect ratios tiled across feature map grid cells. Instead of predicting raw absolute coordinates from scratch, object detectors predict relative offset regression values (dx, dy, dw, dh) to deform reference anchor boxes toward target ground-truth objects. Modern detectors utilize Anchor-Free designs (YOLOv8, FCOS) to avoid manual hyperparameter tuning of anchor sizes.

Computer Visionadvanced5 min

U-Net & Fully Convolutional Networks

Building encoder-decoder convolutional networks with skip connections for biomedical and dense pixel-level prediction.

U-Net (Ronneberger et al., 2015) and Fully Convolutional Networks (FCN - Long et al., 2015) pioneered deep learning for pixel-wise dense prediction. FCN replaced fully connected classification layers with 1x1 convolutions and transposed convolutions, enabling arbitrary input image dimensions. U-Net established a symmetric U-shaped Contracting Encoder - Expanding Decoder architecture with direct Skip Connections that concatenate high-resolution encoder feature maps directly to decoder layers, preserving fine spatial details.

Computer Visionadvanced5 min

SAM & Promptable Segmentation

Zero-shot promptable image segmentation across arbitrary unseen objects using foundation Vision Transformers.

Segment Anything Model (SAM - Kirillov et al., 2023 / Meta) is the landmark foundation model for computer vision segmentation. SAM enables Promptable Segmentation: generating high-quality object masks given flexible interactive prompts (points, bounding boxes, text descriptions, or rough masks). Its architecture decouples a heavy Vision Transformer (ViT) Image Encoder from a lightweight real-time Prompt Encoder and Mask Decoder (< 50ms in browser). SAM was trained on SA-1B, a massive dataset of 1.1 Billion automatically generated masks across 11 Million images.

Computer Visionadvanced5 min

Vision Transformers (ViT)

Replacing convolutional filters with self attention patches for scalable computer vision.

Vision Transformers (ViT - Dosovitskiy et al., 2020) apply standard Transformer encoder architectures directly to computer vision tasks. An image is split into a grid of non overlapping patches (e.g. 16x16 pixels), flattened into 1D vectors, projected via a linear layer, and processed using standard Multi Head Self Attention. While ViTs lack convolutional spatial inductive biases and require massive pretraining data (JFT-300M / ImageNet-21k), they scale better than CNNs on large compute budgets.

Computer Visionadvanced5 min

CNN vs ViT: Inductive Bias

Comparing local inductive bias in ConvNets against global self-attention scaling in Vision Transformers.

Vision Transformers (ViT - Dosovitskiy et al., 2020) adapted self-attention mechanisms from NLP to computer vision by splitting images into non-overlapping 16x16 patch tokens. Convolutional Neural Networks (CNNs) possess strong Inductive Biases (Translation Invariance and Local Spatial Locality). Vision Transformers have minimal spatial inductive bias, requiring massive pre-training datasets (JFT-300M) or strong data augmentation, but scale significantly better with compute.

Computer Visionadvanced5 min

CLIP & Image–Text Alignment

Bridging vision and natural language using dual encoders trained on 400 million image-text pairs.

CLIP (Contrastive Language-Image Pre-training - Radford et al., 2021 / OpenAI) unifies vision and natural language processing. Trained on 400 million internet image-text pairs (WebImageText), CLIP uses an Image Encoder (ViT / ResNet) and Text Encoder (Transformer) optimized via In-Batch Contrastive Loss (InfoNCE). CLIP enables Zero-Shot Image Classification by framing classification as a text-image similarity prompt matching problem ("a photo of a [class]"), matching top ImageNet accuracy without fine-tuning.

Computer Visionadvanced5 min

Face Recognition & Metric Learning

Mapping facial images into metric embedding spaces using open set verification.

Face Recognition uses Metric Learning to map facial images into a dense vector embedding space where images of the same person are close together and images of different people are far apart. Unlike closed set classification which predicts fixed class labels, Face Recognition handles Open Set Verification where new unknown faces must be identified without retraining the model. Modern architectures use Margin Loss functions like ArcFace and CosFace to enforce angular margin separation in feature space.

Computer Visionadvanced5 min

Triplet Loss & Hard Negative Mining

Pulling matching anchor positive embeddings together while pushing non matching negative embeddings apart.

Triplet Loss (Schroff et al., 2015 / FaceNet) is a metric learning loss function designed for learning vector embedding spaces. It operates on triplets consisting of an Anchor (A), a Positive sample (P) of the same class, and a Negative sample (N) of a different class. The loss pulls Anchor and Positive embeddings together while pushing Anchor and Negative embeddings apart by a minimum margin distance alpha. Hard Negative Mining selects challenging triplets during training to prevent zero loss gradient stagnation.

Computer Visionadvanced5 min

Video Understanding & Temporal Models

Processing spatiotemporal video frames across spatial height width and temporal time axes.

Video Understanding extends 2D computer vision to 3D spatiotemporal tensors (Frames x Height x Width x Channels). Models capture both spatial appearance features within frames and temporal motion dynamics across frames. Architectures evolved from 3D Convolutional Networks (C3D, I3D) and Two Stream Networks (Spatial RGB + Temporal Optical Flow) to Video Vision Transformers (Video Swin, TimeSformer).

Computer Visionadvanced5 min

Pose Estimation & Keypoints

Detecting human body joints and skeletal keypoint coordinates in 2D and 3D space.

Pose Estimation is a computer vision task that detects anatomical keypoints (elbows, knees, eyes, wrists) to construct human skeletal body poses. Bottom Up approaches (OpenPose) detect all keypoints in an image first and group them into individuals using Affinity Fields. Top Down approaches (HRNet, AlphaPose) run an object detector first to crop individual humans, then predict keypoints per bounding box.

Computer Visionadvanced5 min

Vision Models on Edge Devices

Optimizing computer vision models for sub 10ms real time inference on edge hardware.

Edge Deployment of Vision Models deploys computer vision networks to resource constrained devices (NVIDIA Jetson, Mobile phones, Raspberry Pi, Apple Neural Engine). Deploying to the edge eliminates cloud API latency, protects user privacy, and enables offline operation. Techniques include converting PyTorch models to ONNX and TensorRT, INT8 quantization, using MobileNet architectures, and hardware specific NPU compilation.

SCROLL · SAVE · TAP TO GO DEEPER