πŸ‘οΈ Computer Vision β€” Dari Pixels ke Scene Understanding

Computer Vision adalah cabang AI yang memungkinkan mesin "melihat" β€” bukan sekadar menangkap gambar, tapi memahami konten visual. Catatan ini memetakan 6 tingkat hierarki CV dari pixels hingga scene understanding, CNN architecture evolution, object detection (YOLO, DETR), segmentation, dan trade-off matrix. 68 hits di vault β€” domain ML terbesar ketiga yang belum punya hierarchy.


Daftar Isi

  1. 1. Premise β€” How Machines See
  2. 2. Six-Level Hierarchy of Vision
  3. 3. Level 1 β€” Image Acquisition & Preprocessing
  4. 4. Level 2 β€” Feature Extraction
  5. 5. Level 3 β€” Low-Level Vision
  6. 6. Level 4 β€” Mid-Level Vision
  7. 7. Level 5 β€” High-Level Vision
  8. 8. Level 6 β€” Scene Understanding & Reasoning
  9. 9. CNN Architecture Timeline

1. Premise β€” How Machines See

Manusia melihat dengan 200+ juta tahun evolusi β€” mesin melihat dengan arsitektur yang didesain secara manual:

Pixel Grid (HΓ—WΓ—C) β†’ Features β†’ Structures β†’ Objects β†’ Scenes β†’ Meaning
     ↓                 ↓            ↓          ↓          ↓         ↓
  Raw data         Edge, texture   Segments    Objects   Context  Decision

Computer Vision itu SUSAH karena:

  • Ill-posed problem β€” 3D world diproyeksikan ke 2D β†’ informasi kedalaman hilang
  • Variability β€” objek yang sama (kursi) bisa memiliki tampilan tak terbatas
  • Lighting β€” pencahayaan mengubah pixel drastis
  • Scale β€” objek bisa sangat kecil atau sangat besar di frame

2. Six-Level Hierarchy of Vision

LevelNamaContoh TugasInputOutput
L1Image Acquisition & PreprocessingCapture, denoise, color correctionRaw sensorClean image
L2Feature ExtractionEdge detection, SIFT, HOGImageFeature maps
L3Low-Level VisionSegmentation, depth estimationFeaturesStructure maps
L4Mid-Level VisionObject detection, trackingStructureBounding boxes
L5High-Level VisionClassification, recognitionObjectsLabels
L6Scene Understanding & ReasoningVQA, captioning, navigationSceneLanguage/action

3. Level 1 β€” Image Acquisition & Preprocessing

3.1 Camera Pipeline

Scene β†’ Lens β†’ Sensor (CMOS/CCD) β†’ A/D β†’ Raw β†’ Demosaic β†’ Color β†’ Gamma β†’ JPEG

Sensor types:

SensorQuantum EfficiencyNoiseSpeedCost
CCD40-70%LowSlowHigh
CMOS30-60%ModerateFastLow
Event CameraN/A (delta intensity)LowΞΌsHigh

Key:

  • Resolution (MP) β€” seberapa detail
  • Dynamic Range (stops) β€” rentang gelap ke terang
  • FPS β€” seberapa cepat (IoT: 30, ML: 60-1000)

3.2 Preprocessing Operations

OperationFungsiAlgoritma
DenoisingHapus noise sensorGaussian, Median, Bilateral, Non-local Means
DeblurringKoreksi blur (motion/focus)Wiener filter, Lucy-Richardson, blind deconvolution
Histogram EqualizationPerbaiki kontrasCLAHE (Contrast Limited Adaptive HE)
Gamma CorrectionKomaasi nonlinear
White BalanceKoreksi warnaGray world, Retinex
ResizeUbah dimensiBilinear, bicubic, lanczos (ML), anti-aliasing

4. Level 2 β€” Feature Extraction

4.1 Classical (Pre-Deep Learning) Features

FeatureTypeInvarianceApplication
SIFTKeypointScale + rotation + illuminationImage stitching, 3D reconstruction
SURFKeypoint (SIFT + integral image)Scale + rotationReal-time matching
ORBKeypoint (FAST + BRIEF)RotationSLAM, mobile (free)
HOGDense gradient descriptorIlluminationPedestrian detection
LBPTexture descriptorIlluminationFace recognition
GaborFrequency filterβ€”Texture analysis

4.2 CNN-based Features (Learned)

Layer DepthFeature TypeVisualisasi
L1 (conv1)Edge, color blobsLines at various angles
L2 (conv2)Textures, patternsZebra, grid, dots
L3 (conv3)Mid-level partsWheels, eyes, windows
L4 (conv4)Object partsCar fronts, faces
L5 (conv5)Full objectsCars, dogs, people

5. Level 3 β€” Low-Level Vision

5.1 Segmentation

TaskDefinisiArsitektur Kunci
Semantic SegmentationSetiap pixel β†’ class labelU-Net, DeepLab, FCN, SegFormer
Instance SegmentationSetiap objek β†’ individual maskMask R-CNN, YOLACT
Panoptic SegmentationStuff (semantic) + things (instance)Panoptic FPN, Mask2Former
Part SegmentationBagian dari objek (wheels, door)PartNet

Benchmark: Cityscapes (50 classes, 5000 images, 1024Γ—2048)

ArchitecturemIoU CityscapesFPS (T4)
DeepLabV3+ (ResNet-101)82.3%17
SegFormer-B584.0%11
Mask2Former85.2%8
PP-LiteSeg79.1%163

5.2 Depth Estimation

TypeOutputContoh
MonocularDepth map from single imageMiDaS, DPT, Depth Anything
StereoDisparity from 2 camerasRAFT-Stereo, NAS-DAD
Multi-viewDepth from N viewsCOLMAP (SfM)

6. Level 4 β€” Mid-Level Vision

6.1 Object Detection

Timeline:

R-CNN (2014) β†’ Fast R-CNN (2015) β†’ Faster R-CNN (2015) β†’ YOLO (2016) β†’ SSD (2016)
    β†’ RetinaNet (2017) β†’ YOLOv3 (2018) β†’ EfficientDet (2020) β†’ DETR (2020)
    β†’ YOLOv8 (2023) β†’ RT-DETR (2023) β†’ YOLOv9 (2024) β†’ YOLOv10 (2024)

6.2 Two-Stage vs One-Stage

AspekTwo-Stage (Faster R-CNN, Mask R-CNN)One-Stage (YOLO, SSD, RetinaNet)
PipelineRPN β†’ RoI β†’ ClassifySingle shot
Accuracyβœ… Lebih tinggi (mAP+2-5)🟑 Direndahkan (mAP-2-5)
Speed10-30 FPS60-600+ FPS
Trade-offAkurat, lambatCepat, cukup akurat
Use caseAutonomous driving, medicalRobotics, edge, real-time

6.3 Detection Architecture Comparison

ModelBackbonemAP 50-95FPS (T4)TahunCats
Faster R-CNNResNet-5037.4152015Two-stage pioneer
YOLOv3DarkNet33.0782018One-stage break
RetinaNetResNet-5036.5162017Focal Loss
EfficientDet-D0EfficientNet33.8982020Efficient
YOLOv8mCSPDarknet50.81092023Modern versatile
RT-DETR-LResNet-5053.01082023Real-time transformer
DETRResNet-5042.0122020End-to-end
DINOSwin-L63.262022SOTA detection

6.4 Object Tracking

ParadigmaContoh MekanismeUse Case
SORTKalman filter + IoU matchingFast (260 Hz)
DeepSORTSORT + appearance embeddingMulti-camera
ByteTrackLow + high score boxesOcclusion robust
TransTrackTransformer + queryHigh accuracy

7. Level 5 β€” High-Level Vision

7.1 Image Classification

Evolution:

AlexNet (2012) β†’ VGG (2014) β†’ GoogLeNet (2014) β†’ ResNet (2015)
    β†’ DenseNet (2017) β†’ EfficientNet (2019) β†’ ConvNeXt (2022)

AlexNet (2012) β€” memenangkan ImageNet pertama:

  • 11Γ—11 conv, 60M parameters
  • 15.3% top-5 error (vs 26.2% sebelumnya)
  • GPU training dengan 2Γ— GTX 580

ResNet (2015) β€” skip connections membuat deep network mungkin:

ResNet-50: 25M params, 3.8B FLOPs, 92.1% top-5
ResNet-152: 60M params, 11.3B FLOPs, 93.4% top-5

EfficientNet β€” compound scaling (depth, width, resolution):

ModelParamsFLOPsTop-1
EfficientNet-B05.3M0.4B77.1%
EfficientNet-B766M37B84.3%

7.2 Vision Transformers (ViT)

ViT (2021) β€” membawa transformer ke vision:

Image (HΓ—WΓ—C) β†’ Patches (PΓ—P) β†’ Linear β†’ [CLS] token + Position β†’ Transformer encoder β†’ MLP β†’ Class
ModelParamsImageNet Top-1ImageNet Top-1 (22K)
ViT-B/1686M77.9%84.1%
ViT-L/16307M76.5%85.1%
ViT-H/14632Mβ€”87.8%

Hybrid (CNN + Transformer):

ModelBackboneTop-1FPS
DeiTTeacher-student83.1%Fast
Swin-TShifted windows81.2%100+
ConvNeXtModern CNN84.3%80+

8. Level 6 β€” Scene Understanding & Reasoning

8.1 Visual Question Answering (VQA)

ArsitekturDatasetAccuracy
LXMERTVQA v272.4%
ViLBERTVQA v273.3%
OFA12 datasetsSOTA multi-task

8.2 Image & Video Captioning

ModelAutoregressiveObject-AwareCIDEr
ViT + GPT2βœ…βŒ120.3
BLIP-2βœ… (Q-Former)βœ…133.2
GIT (Microsoft)βœ… (Transformer)βœ…144.1
Flamingoβœ… (Perceiver)βœ…β€”

8.3 Multi-Modal Models (Vision + Language)

ModelVision EncoderLanguage DecoderZero-shot?
CLIP (OpenAI)ViT-LText Encoderβœ… 400M pairs
BLIP-2ViT-gOPT/LLaMAβœ… Instruct
LLaVACLIP ViT-LVicunaβœ… SFT
GPT-4Vβ€”GPT-4βœ… RLHF

9. CNN Architecture Timeline + Comparison

TahunArsitekturInovasiParamsFLOPs
2012AlexNetGPU training, ReLU, dropout60M0.7B
2014VGG-16Small filters (3Γ—3), deeper138M15.3B
2014GoogLeNetInception module6.8M1.6B
2015ResNet-50Skip connections25.5M3.8B
2017DenseNet-121Dense connections8M2.9B
2018MobileNetV2Depthwise separable + inverted residuals3.5M0.3B
2019EfficientNetCompound scaling5.3-66M0.4-37B
2021ViTPure transformer for vision86M+β€”
2022ConvNeXtModernized ResNet28M4.5B
2023SwinV2Scaled window attention3Bβ€”

10. Cross-Reference ke Vault

LevelCatatan Vault
L1-L2hierarchy-digital-plumbing β€” Image codec, compression
L3 (Segmentation)hierarchy-llm-ai-systems β€” RAG chunking based on layout
L4 (Detection)hierarchy-cybersecurity-defense-architecture β€” CCTV, face detection
L5 (Classification)hierarchy-classical-ml-algorithms β€” SVM + HOG comparison
L6 (Multi-modal)hierarchy-llm-ai-systems β€” Vision-language models

References

  1. Szeliski, R. β€œComputer Vision: Algorithms and Applications.” 2nd ed., Springer, 2022.
  2. Goodfellow, I., Bengio, Y., Courville, A. β€œDeep Learning.” MIT Press, 2016 β€” Ch. 9-12.
  3. Krizhevsky, A. et al. β€œImageNet Classification with Deep Convolutional Neural Networks.” NeurIPS 2012.
  4. He, K. et al. β€œDeep Residual Learning for Image Recognition.” CVPR 2016.
  5. Ren, S. et al. β€œFaster R-CNN: Towards Real-Time Object Detection.” NeurIPS 2015.
  6. Redmon, J. & Farhadi, A. β€œYOLOv3: An Incremental Improvement.” 2018.
  7. Dosovitskiy, A. et al. β€œAn Image is Worth 16Γ—16 Words: Transformers for Image Recognition.” ICLR 2021.
  8. Carion, N. et al. β€œEnd-to-End Object Detection with Transformers.” ECCV 2020.
  9. Tan, M. & Le, Q. β€œEfficientNet: Rethinking Model Scaling.” ICML 2019.
  10. Chen, L. et al. β€œDeepLab: Sematic Image Segmentation.” TPAMI 2018.
  11. Kirillov, A. et al. β€œSegment Anything.” ICCV 2023.
  12. Radford, A. et al. β€œLearning Transferable Visual Models From Natural Language Supervision (CLIP).” ICML 2021.
  13. Li, J. et al. β€œBLIP-2: Bootstrapping Language-Image Pre-training.” 2023.
  14. Liu, Z. et al. β€œSwin Transformer.” CVPR 2021.