Skip to main content

Hands-on wide baseline tutorial

Summary description here.

We will create the wide baseline stereo mather and try it on various images with various features. There is also a a (naive) example of the spatial verification together with image retrieval. We will not build the components from scratch, instead will be using a ready packages, like kornia, pydegensac and OpenCV

Install

pip install local_feature_tutorial

How to use

%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from local_feature_tutorial.wbs import *
from local_feature_tutorial.visualization import *
from local_feature_tutorial.io import *
from local_feature_tutorial.datasets import *
import cv2

hard_images_to_match = 'http://cmp.felk.cvut.cz/~mishkdmy/wbs_illum.tgz'
fname = download_file(hard_images_to_match)


untar_to(fname, 'data/wbs')

wbs_img_fnames = get_all_images_in_subdirs('data/wbs')
print (wbs_img_fnames)

visualize_grid(wbs_img_fnames, (8,8))
['data/wbs/chimera_01.png', 'data/wbs/chimera_02.png', 'data/wbs/dh_01.png', 'data/wbs/dh_02.png', 'data/wbs/doll_theater1.jpeg', 'data/wbs/doll_theater2.jpeg', 'data/wbs/doll_theater3.jpeg', 'data/wbs/kn_church-2.jpg', 'data/wbs/kn_church-8.jpg', 'data/wbs/ministry_01.png', 'data/wbs/ministry_02.png', 'data/wbs/ministry_03.png', 'data/wbs/purkine-2.jpg', 'data/wbs/purkine-4.jpg']

png

sift_hardnet_matcher = TwoViewMatcher(detector=cv2.SIFT_create(8000), descriptor=HardNetDesc(),
                              matcher=SNNMMatcher(0.9), geom_verif=degensac_Verifier(0.5))

res = sift_hardnet_matcher.verify(wbs_img_fnames[7], wbs_img_fnames[8])
print (res.keys())
draw_matches(res['match_kpts1'], res['match_kpts2'],
                wbs_img_fnames[7], wbs_img_fnames[8], color=(0,255,0), R=10)
dict_keys(['match_kpts1', 'match_kpts2', 'F', 'num_inl'])

png

Release files for local-feature-tutorial 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for local-feature-tutorial 0.0.3
File Size Uploaded
local_feature_tutorial-0.0.3.tar.gz 19.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for local-feature-tutorial 0.0.3
File Interpreter ABI Platform
local_feature_tutorial-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 39.3 kB

Release files / local_feature_tutorial-0.0.3.tar.gz

Download URL local_feature_tutorial-0.0.3.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
62d0be66672da33fe92d5fb2d8a3cef97ae515b775e42fb6bcc77023741fcd23
BLAKE2b-256 checksum
How to use checksums
9fcd6a06a96f8753fc22e9ff69683ad864eae2029b9d05c1561d8266755fba66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.4

Release files / local_feature_tutorial-0.0.3-py3-none-any.whl

Download URL local_feature_tutorial-0.0.3-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66b6addd9659620f8d80fd31f520d160c38846475148e886c25fe8c807e14dfc
BLAKE2b-256 checksum
How to use checksums
37c1ed48ea7588aaadbd2464223168400020467e170b47e7080988bfb7430ab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page