# DeepHomography **Repository Path**: boomabai/DeepHomography ## Basic Information - **Project Name**: DeepHomography - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-05-13 - **Last Updated**: 2022-11-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Content-Aware Unsupervised Deep Homography Estimation [paper](https://arxiv.org/pdf/1909.05983.pdf) Homography estimation is a basic image alignment method in many applications. It is usually done by extracting and matching sparse feature points, which are error-prone in low-light and low-texture images. On the other hand, previous deep homography approaches use either synthetic images for supervised learning or aerial images for unsupervised learning, both ignoring the importance of handling depth disparities and moving objects in real world applications. To overcome these problems, in this work we propose an unsupervised deep homography method with a new architecture design. In the spirit of the RANSAC procedure in traditional methods, we specifically learn an outlier mask to only select reliable regions for homography estimation. We calculate loss with respect to our learned deep features instead of directly comparing image content as did previously. To achieve the unsupervised training, we also formulate a novel triplet loss customized for our network. We valid our method by conducting comprehensive comparisons on a new dataset that covers a wide range of scenes with varying degrees of difficulties for the task. Experimental results reveal that our method outperforms the state-of-the-art including deep solutions and feature-based solutions. [introduction](./introduction.md) ## Scores | | RE | LT | LL | SF | LF | Avg | | :---------- | :-----------: | :-----------: | :-----------: | :-----------: | :-----------: | :-----------: | | Coordinate | 1.81 | 1.90 | 1.94 | 1.75 | 1.72 | 1.82 | | [Coordinate-v2](https://github.com/JirongZhang/DeepHomography/tree/master/Data/Coordinate-v2) | 0.73 | 1.01 | 1.03 | 0.92 | 0.70 | 0.88 | ## Installation ### Requirements - Python 3.6 - Pytorch 1.0.1 (1.2.0) - torchvision 0.2.2 - tensorboardX 1.9 ```sh git clone https://github.com/JirongZhang/DeepHomography.git cd DeepHomography ``` ## Data pre-processing 1. Download raw data ```sh # GoogleDriver https://drive.google.com/file/d/19d2ylBUPcMQBb_MNBBGl9rCAS7SU-oGm/view?usp=sharing # BaiduYun https://pan.baidu.com/s/1Dkmz4MEzMtBx-T7nG0ORqA (key: gvor) ``` 2. Data processing - Put "models/Coordinate/Train/Test" in the corresponding folder ```sh python video2img.py ``` ## Train Our model is designed for small baseline of real data. Here, we provide "Oneline" model which predicts H_ab directly. It also uses triplet loss to optimize the network. It can produce almost comparable performance and much easier to optimize. So, we use this version for now. Thanks to [@Daniel](https://github.com/dkoguciuk) for the accurate loss function. The formula can be simplified as:
