Skip to content

Official PyTorch implementation for "Supervised Homography Learning with Realistic Dataset Generation"

Notifications You must be signed in to change notification settings

JianghaiSCU/RealSH

Repository files navigation

[ICCV 2023]. Supervised Homography Learning with Realistic Dataset Generation. [Paper].

Hai Jiang1,2, Haipeng Li3,2, Haoqiang Fan2, Bing Zeng3, Songchen Han1, Shuaicheng Liu3,2

1.Sichuan University, 2.Megvii Technology

3.University of Electronic Science and Technology of China

Pipeline

Dependencies

pip install -r requirements.txt

Download the raw CA-unsup dataset

Please refer to Content-Aware Unsupervised Deep Homography Estimation (CAHomo).

- Original video data download links: [GoogleDriver], [BaiduYun] (key:gvor)

- Unzip the data and Run "video2img.py" to save the images to the directory "./Homo_data/img"

Be sure to scale the image to (640, 360) since the point coordinate system is based on the (640, 360).
e.g. img = cv2.imresize(img, (640, 360))

- Using the images in "train.txt" and "test.txt" for training and evaluation.

- The manually labeled evaluation files can be download from [GoogleDriver], [BaiduYun] (key:mrzz)

Download the dominant plane masks for image generation

- Download links: [GoogleDriver], [BaiduYun] (key:j1zw)

- Unzip the masks to the directory "./Homo_data/mask"

Pre-trained model

model RE LT LL SF LF Avg Model
Pre-trained 0.22 0.35 0.44 0.42 0.29 0.34 [Google] [Baidu](key:qqed)

How to train?

You need to modify dataset/data_loader.py slightly for your environment, and then

python train.py --model_dir experiments/Base/ 

How to test?

python evaluate.py --model_dir experiments/Base/ --restore_file Iter2_0.3445.pth

Supplementary Material

- Download links: [GoogleDriver], [BaiduYun] (key:gwry)

Citation

If you use this code or ideas from the paper for your research, please cite our paper:

@InProceedings{Jiang_2023_ICCV,
    author    = {Jiang, Hai and Li, Haipeng and Han, Songchen and Fan, Haoqiang and Zeng, Bing and Liu, Shuaicheng},
    title     = {Supervised Homography Learning with Realistic Dataset Generation},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
    month     = {October},
    year      = {2023},
    pages     = {9806-9815}
}

About

Official PyTorch implementation for "Supervised Homography Learning with Realistic Dataset Generation"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages