Skip to content
All projects
Computer Vision

Cross-Season Image Matching

I built a visual matching pipeline that finds the same location across summer and winter photographs, estimates the geometric transform between them, and profiles its own runtime for deployment.

Pipeline06 stages
  1. 01
    Summer / winter image pair
  2. 02
    SuperPoint keypoints (512)
  3. 03
    LightGlue matching
  4. 04
    RANSAC homography
  5. 05
    Inlier and reprojection error
  6. 06
    Warped overlay output
Schematic, not a screenshot

01Problem

The same place looks completely different in summer and winter. Snow, foliage and lighting break appearance-based matching, so any system that has to recognise a location across seasons needs correspondences that survive the change.

02Implementation

  • Extracted SuperPoint keypoints capped at 512 per image and matched them with LightGlue in PyTorch, running on CUDA when available.
  • Estimated a homography with OpenCV RANSAC at a 5.0 px reprojection threshold, guarding against pairs with fewer than four matches and against failed estimation.
  • Computed the mean reprojection error over inliers by projecting matched points through the estimated homography.
  • Generated match, warp and overlay visualisations for every pair so alignment can be inspected rather than trusted.
  • Profiled runtime per pair and exported SuperPoint to ONNX to test a deployment path.

03Models

SuperPoint
Keypoint detection and description, capped at 512 keypoints per image.
LightGlue
Learned matcher that pairs SuperPoint features across the two images.
RANSAC homography
Rejects outlier matches and estimates the geometric transform (OpenCV, 5.0 px threshold).

04Input data

Paired summer and winter photographs of the same locations, with sample pairs committed to the repository. Five pairs were evaluated.

05Results

Runs end to end on the sample pairs, producing matches, homographies and aligned overlays, with per-pair runtime and inlier ratios recorded in the repository.

  • Average runtime 4.907 s per pair across 5 pairs
  • Average inlier ratio 53.4%, best pair 60.0%
  • Keypoint reduction 1024 to 512: runtime 5.677 s to 5.152 s, inlier ratio 44.3% to 52.8%

06Decisions

  • Cut SuperPoint keypoints from 1024 to 512: fewer raw matches (309 to 163) but a higher inlier ratio and lower runtime, so the cheaper setting was also the more geometrically consistent one.
  • Profiling showed feature extraction, not matching, is the dominant cost, which is where any further optimisation belongs.
  • SuperPoint exports to ONNX, but ONNX Runtime execution is blocked by a MaxPool attribute incompatibility, so the export is documented as an investigation rather than a working deployment.

07Stack

PythonPyTorchSuperPointLightGlueOpenCVKorniaONNXNumPy

08Visuals

SUMMERWINTERHSUPERPOINT KEYPOINTSLIGHTGLUE MATCHESRANSAC HOMOGRAPHY
Illustrative visualization — a diagram of the technique, not a screenshot or a real output

Screenshots of the running project will replace this once they are available.