Skip to content

About

Classical and deep computer-vision comparisons for keypoint detection and stereo depth estimation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Computer Vision Algorithms: Classical vs Deep Learning

Two controlled studies comparing interpretable classical computer-vision algorithms with pretrained deep models:

  1. Corner detection and matching: Harris + SIFT versus SuperPoint on HPatches.
  2. Stereo depth estimation: SAD block matching versus RAFT-Stereo on KITTI Stereo 2015.

The classical Harris and SAD algorithms are implemented from scratch. SuperPoint inference is reconstructed around the authors’ pretrained weights, while RAFT-Stereo is used through its official external repository. Dataset files, checkpoints, and third-party source code are deliberately excluded.

Study 1 — Harris vs SuperPoint

The experiment evaluated 20 HPatches sequences—10 illumination and 10 viewpoint sequences—with two target images per sequence, producing 40 image pairs.

Condition Metric Harris + SIFT SuperPoint
Illumination Repeatability ↑ 0.527 0.604
Illumination Matching score ↑ 0.771 0.813
Illumination Homography error ↓ 7.872 px 0.646 px
Viewpoint Repeatability ↑ 0.553 0.409
Viewpoint Matching score ↑ 0.640 0.585
Viewpoint Homography error ↓ 189.498 px 61.607 px

The main finding is deliberately nuanced: SuperPoint produced far more reliable homography estimates, but Harris retained higher raw repeatability and matching score on the selected viewpoint subset. No single metric establishes universal dominance.

Aggregate Harris and SuperPoint comparison

Harris and SuperPoint detections

Implemented components

  • Sobel gradients and structure-tensor construction
  • Gaussian smoothing and Harris response
  • Thresholding, greedy non-maximum suppression, and top-N selection
  • Synthetic validation on a checkerboard and known four-corner square
  • SuperPoint architecture and pretrained-weight inference
  • SIFT and SuperPoint descriptor matching
  • Repeatability, matching score, and RANSAC homography error
  • Illumination, viewpoint, and low-texture failure analysis

Study 2 — SAD vs RAFT-Stereo

Both methods were evaluated on the same 40 KITTI Stereo 2015 training pairs.

Metric SAD RAFT-Stereo
Mean EPE ↓ 16.872 px 0.589 px
Mean D1 ↓ 51.122% 1.633%
Mean depth RMSE ↓ 115.403 m 1.906 m
Valid prediction ratio ↑ 0.619 1.000
Measured runtime 0.656 s 0.659 s

Runtime is reported for completeness, but it is not a hardware-normalised comparison: SAD ran on CPU, while RAFT-Stereo used GPU mixed-precision inference. Accuracy is the meaningful contrast here.

SAD and RAFT-Stereo example

Mean endpoint error

Implemented components

  • KITTI stereo image, disparity, and calibration loading
  • SAD cost-volume construction along rectified scanlines
  • Winner-takes-all disparity selection
  • Left–right consistency checking
  • Disparity-to-depth conversion using camera focal length and baseline
  • Parameter analysis for block size and disparity range
  • EPE, D1, depth RMSE, runtime, and valid-density evaluation
  • Near/mid/far-depth and textured/textureless regional analysis
  • Object-boundary, occlusion, and low-texture failure cases

Repository structure

.
├── corner_detection_harris_vs_superpoint.ipynb
├── stereo_depth_sad_vs_raft.ipynb
├── data/README.md
├── results/
│   ├── corner_detection/
│   └── stereo_depth/
├── requirements.txt
└── README.md

Setup

  1. Follow data/README.md for datasets and official model dependencies.

  2. Create an environment and install the notebook dependencies:

    python -m venv .venv
    source .venv/bin/activate       # Windows: .venv\Scripts\activate
    pip install -r requirements.txt
    jupyter lab
  3. Start Jupyter from the repository root so the relative paths resolve correctly.

Attribution and scope

  • HPatches and SuperPoint remain subject to their original licences and citations.
  • KITTI data is for non-commercial research use; it is not redistributed here.
  • RAFT-Stereo is an external MIT-licensed dependency and is not copied into this repository.
  • Results were produced on selected benchmark training pairs and are not official benchmark-server submissions.

Author

Kübra Yurduseven

About

Classical and deep computer-vision comparisons for keypoint detection and stereo depth estimation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages