CVPR2024 - MCNet: Rethinking the Core Ingredients for Accurate and Efficient Homography Estimation

June 6, 2025 ยท View on GitHub

License
Python Version
PyTorch Version

Official implementation of MCNet from the paper:
"MCNet: Rethinking the Core Ingredients for Accurate and Efficient Homography Estimation"
(CVPR 2024)

๐Ÿ“Œ Table of Contents


๐Ÿš€ Introduction

MCNet is a multiscale correlation searching network designed for efficient and accurate homography estimation. It achieves state-of-the-art performance with significant reductions in computational cost compared to previous methods. Key innovations include:

  1. Multiscale Correlation Searching: Combines multi-scale strategies with iterative correlation searching to improve accuracy with minimal resource growth.
  2. Fine-Grained Optimization (FGO) Loss: Dynamically adjusts training gradients during convergence, improving precision without extra overhead.
  3. Cross-Modality Evaluation: Evaluation across different datasets and modalities (GoogleEarth, GoogleMap, MSCOCO, SPID) shows the effectiveness of the network in different scenarios.


๐Ÿ“ฆ Environment Setup

Our implementation has been successfully tested on NVIDIA RTX4090/3090/2080/8000 GPU platfroms. Recommended setup using Anaconda:

# Create and activate environment
conda create -n mcnet python=3.8
conda activate mcnet

# Install dependencies
# refer to https://pytorch.org/get-started/previous-versions/
pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 -f https://download.pytorch.org/whl/cu111/torch_stable.html
pip install numpy opencv-python matplotlib cupy==10.6 

๐Ÿ’พ Dataset Preparation

Supported datasets: MSCOCO, GoogleEarth, GoogleMap, SPID and any other personal dataset. Follow these steps:

  1. Download datasets.
  2. Configure dataset paths in datasets.py:

๐Ÿ’ป Quick Start

Training

python train.py --gpuid 0 --dataset mscoco --batch_size 16

Testing

python test.py \
    --gpuid 0 \
    --dataset mscoco \
    --checkpoint ./weights/mscoco.pth

Pretrained Weights

DatasetWeight File
MSCOCOweights/mscoco.pth
GoogleEarthweights/ggearth.pth
GoogleMapweights/ggmap.pth
SPIDweights/spid.pth

๐Ÿ“Š Experimental Results

Main Metrics Comparison

MethodMACE โ†“Inference Time(ms) โ†“Params(M) โ†“
IHN (2-scale)0.06060.11.71
RHWF (2-scale)0.039157.11.29
MCNet0.03133.10.85

๐Ÿ” Visualization

MACE Comparison

๐Ÿ“š Citation

If this work helps your research, please cite:

@inproceedings{zhu2024mcnet,
  title={Mcnet: Rethinking the core ingredients for accurate and efficient homography estimation},
  author={Zhu, Haokai and Cao, Si-Yuan and Hu, Jianxin and Zuo, Sitong and Yu, Beinan and Ying, Jiacheng and Li, Junwei and Shen, Hui-Liang},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={25932--25941},
  year={2024}
}

๐Ÿ“ง Contact