CVPR2024 - MCNet: Rethinking the Core Ingredients for Accurate and Efficient Homography Estimation
June 6, 2025 ยท View on GitHub
Official implementation of MCNet from the paper:
"MCNet: Rethinking the Core Ingredients for Accurate and Efficient Homography Estimation"
(CVPR 2024)
๐ Table of Contents
- ๐ Table of Contents
- ๐ Introduction
- ๐ฆ Environment Setup
- ๐พ Dataset Preparation
- ๐ป Quick Start
- ๐ Experimental Results
- ๐ Visualization
- ๐ Citation
- ๐ง Contact
๐ 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:
- Multiscale Correlation Searching: Combines multi-scale strategies with iterative correlation searching to improve accuracy with minimal resource growth.
- Fine-Grained Optimization (FGO) Loss: Dynamically adjusts training gradients during convergence, improving precision without extra overhead.
- 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:
- Download datasets.
- 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
| Dataset | Weight File |
|---|---|
| MSCOCO | weights/mscoco.pth |
| GoogleEarth | weights/ggearth.pth |
| GoogleMap | weights/ggmap.pth |
| SPID | weights/spid.pth |
๐ Experimental Results
Main Metrics Comparison
| Method | MACE โ | Inference Time(ms) โ | Params(M) โ |
|---|---|---|---|
| IHN (2-scale) | 0.060 | 60.1 | 1.71 |
| RHWF (2-scale) | 0.039 | 157.1 | 1.29 |
| MCNet | 0.031 | 33.1 | 0.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
- Haokai Zhu: hkzhu.zju@gmail.com
- Si-Yuan Cao: cao_siyuan@zju.edu.cn