Git Product home page Git Product logo

qatm's Introduction


This is the official repo for the QATM DNN layer (CVPR2019). For method details, please refer to

 @InProceedings{Cheng_2019_CVPR,
    author = {Cheng, Jiaxin and Wu, Yue and AbdAlmageed, Wael and Natarajan, Premkumar},
    title = {QATM: Quality-Aware Template Matching for Deep Learning},
    booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
    month = {June},
    year = {2019}
    }

Overview

What is QATM?

QATM is an algorithmic DNN layer that implements template matching idea with learnable parameters.

How does QATM work?

QATM learns the similarity scores reflecting the (soft-)repeatness of a pattern. Emprically speaking, matching a background patch in QATM will produce a much lower score than matching a foreground patch.

Below is the table of ideal matching scores:

Matching Cases Likelihood(s|t) Likelihood(t|s) QATM Score(s,t)
1-to-1 1 1 1
1-to-N 1 1/N 1/N
M-to-1 1/M 1 1/M
M-to-N 1/M 1/N 1/MN
Not Matching 1/||S|| 1/||T|| ~0

where

  • s and t are two patterns in source and template images, respectively.
  • ||S|| and ||T|| are the cardinality of patterns in source and template set.
  • see more details in paper.

QATM Applications

Classic Template Matching

Figure 1: Qualitative template matching performance. Columns from left to right are: the template frame, the target search frame with predicted bounding boxes overlaid (different colors indicate different method), and the response maps of QATM, BBS, DDIS, CoTM, respectively. Rows from top to bottom: the top four are positive samples from OTB, while the bottom four are negative samples from MOTB. Best viewed in color and zoom-in mode. See detailed explanations in paper.

Deep Image-to-GPS Matching (Image-to-Panorama Matching)

Figure 2: Qualitative image-to-GPS results. Columns from left to right are: the query image, the reference panorama image with predicted bounding boxes overlaid (GT, the proposed QATM, and the baseline BUPM), and the response maps of ground truth mask, QATM-improved, and baseline, respectively. Best viewed in color and zoom-in mode. See detailed explanations in paper.

Deep Semantic Image Alignment

Figure 3: Qualitative results on PF-PASCAL dataset. Columns from left to right represent source image, target image, transform results of QATM, GoeCNN and Weakly-supervisedSA. Circles and crosses indicate key points on source images and target images. Best viewed in color and zoom-in mode. See detailed explanations in paper.

Others

Circuit Analysis

See git repository https://github.com/kamata1729/QATM_pytorch.git

Dependencies

  • Dependencies in our experiment, not necessary to be exactly same version but later version is preferred
  • keras=2.2.4
  • tensorflow=1.9.0
  • opencv=4.0.0 (opencv>=3.1.0 should also works)

Demo Code

Run one sample

See run_single_sample.ipynb

Run OTB dataset in paper

See run_all_OTB.ipynb

For implementations in other DNN libraries

qatm's People

Contributors

abigos avatar rex-yue-wu avatar cplusx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.