kamata1729 / robustTemplateMatching

Implementation of Robust Template Matching Using Scale-Adaptive Deep Convolutional Features
http://www.apsipa.org/proceedings/2017/CONTENTS/papers2017/14DecThursday/TA-02/TA-02.5.pdf
MIT License
183 stars 50 forks source link

Robust Template Matching Using Scale-Adaptive Deep Convolutional Features

Pytorch Unofficial Implementation of Robust Template Matching Using Scale-Adaptive Deep Convolutional Features

http://www.apsipa.org/proceedings/2017/CONTENTS/papers2017/14DecThursday/TA-02/TA-02.5.pdf

Requirements

Usage

python run.py [sample_image_path] [template_image_path] --use_cuda --use_cython

Using Cython

Using Cython requires you to build the files in the cython_files folder. To build the same, please use the following command in the cython_files folder:

python setup.py build_ext -i

If your Python version is >3.8, you might need to use a forced build:

python setup.py build_ext -i -f

The result image will be saved as result.png.

Example

python run.py sample/sample1.jpg template/template1.png --use_cuda --use_cython
sample image template image result image
python run.py sample/sample2.jpg template/template2.png --use_cuda --use_cython
sample image template image result image