Skip to content

Commit

Permalink
Updated download links
Browse files Browse the repository at this point in the history
  • Loading branch information
vbalnt committed Oct 19, 2017
1 parent 339c89e commit 000984e
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 34 deletions.
7 changes: 1 addition & 6 deletions download.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

base_url="http://www.iis.ee.ic.ac.uk/~vbalnt/hpatches"
base_url="http://icvl.ee.ic.ac.uk/vbalnt/hpatches"
hpatches_url="$base_url/hpatches-release.tar.gz"
descrs_url="$base_url/descriptors"
descrs_list="$base_url/descriptors/descrs.txt"
Expand Down Expand Up @@ -46,9 +46,4 @@ elif [ $1 = "descr" ]; then
rm "./data/descriptors/$2.tar.gz"
fi
fi
else
echo "Usage: "
echo "sh download.sh hpatches || downloads the patches dataset"
echo "sh download.sh descr X || downloads computed result files for descr X"
exit 1
fi
35 changes: 30 additions & 5 deletions python/hpatches_vis.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,46 @@
from utils.hpatch import *
import cv2


# all types of patches
tps = ['ref','e1','e3','e5','h1','h3','h5',\
't1','t3','t5']

def vis_patches(seq,tp,ids):
"""Visualises a set of types and indices for a sequence"""
h = len(tp)*65
vis = np.empty((h, 0))
# add the first column with the patch type names
vis_tmp = np.empty((0,55))
for t in tp:
tp_patch = 255*np.ones((65,55))
cv2.putText(tp_patch,t,(5,25),cv2.FONT_HERSHEY_DUPLEX , 1,0,1)
vis_tmp = np.vstack((vis_tmp,tp_patch))
vis = np.hstack((vis,vis_tmp))
# add the actual patches
for idx in ids:
vis_tmp = np.empty((0,65))
for t in tp:
vis_tmp = np.vstack((vis_tmp,get_patch(seq,t,idx)))
vis = np.hstack((vis,vis_tmp))
return vis


# select a subset of types of patches to visualise
# tp = ['ref','e5','h5','t5']
#or visualise all - tps holds all possible types
tp = tps

# list of patch indices to visualise
ids = range(10)
ids = range(1,55)

# load a sample sequence
seq = hpatch_sequence('../data/hpatches-release/v_dogman/')
seq = hpatch_sequence('../data/hpatches-release/v_calder/')
vis = vis_patches(seq,tp,ids)

# show
cv2.imshow("HPatches example", vis/255)
cv2.waitKey(0)
# cv2.imshow("HPatches example", vis/255)
# cv2.waitKey(0)

# or save
# cv2.imwrite("patches.png", vis)
cv2.imwrite("patches.png", vis)
25 changes: 5 additions & 20 deletions python/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![logo](./utils/imgs/hpatch.png "logo")
## Python benchmark
## Python implementation of the HPatches benchmark protocols

This repository contains the `python` code for evaluating feature
descriptors on the `HPatches` dataset. For more information on the
Expand All @@ -17,25 +17,10 @@ sudo apt-get install libopencv-dev python-opencv
For other `Linux` distributions or `macOS` please see the
[guide](utils/docs/prerequisites.md).

### Dataset description

After download, the folder `../data/hpatches-release` contains all the
patches from the 116 sequences. The sequence folders are named with
the following convention

* `i_X`: patches extracted from image sequences with illumination changes
* `v_X`: patches extracted from image sequences with viewpoint changes

For each image sequence, we provide a set of reference patches
`ref.png`. For the remaining 5 images in the sequence, we provide
three patch sets `eK.png` and `hK.png` and `tK.png`, containing the
corresponding patches from `ref.png` as found in the `K-th` image with
increasing amounts of geometric noise (`e`<`h`<`t`).

![patches](./utils/imgs/patches.png "patches")

Please see the [patch extraction method details](utils/docs/extraction.md) for more
information about the extraction process.
### Downloading the HPatches dataset
The rest of this document assumes you have already downloaded the
HPatches dataset. For information on how to get it, please check
[the guide](../readme.md).

### Loading/visualising the dataset
An example of how to load a sequence and visualise the patches can be
Expand Down
28 changes: 25 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ dataset, one in `python` and one in `matlab`.
| ------------- |:-------------:|
| [details](python/readme.md) | [details](matlab/README.md) |


### Benchmark Tasks
### Benchmark tasks

Details about the benchmarking tasks can he found
[here](docs/tasks.md).
For a more in-depth description, please see the CVPR
2017 paper [[1]](#refs).

### Benchmark Data
### Getting the dataset

The data required for the benchmarks are saved in the `./data` folder,
and are shared between the two implementations.
Expand All @@ -47,6 +46,29 @@ sh download.sh descr sift # downloads the pre-computed descriptors for sift

The `HPatches` dataset is saved on `./data/hpatches-release` and the pre-computed descriptor files are saved on `./data/descriptors`.


### Dataset description

After download, the folder `../data/hpatches-release` contains all the
patches from the 116 sequences. The sequence folders are named with
the following convention

* `i_X`: patches extracted from image sequences with illumination changes
* `v_X`: patches extracted from image sequences with viewpoint changes

For each image sequence, we provide a set of reference patches
`ref.png`. For the remaining 5 images in the sequence, we provide
three patch sets `eK.png` and `hK.png` and `tK.png`, containing the
corresponding patches from `ref.png` as found in the `K-th` image with
increasing amounts of geometric noise (`e`<`h`<`t`).

![patches](./python/utils/imgs/patches.png "patches")

Please see the [patch extraction method details](./python/utils/docs/extraction.md) for more
information about the extraction process.



### References
<a name="refs"></a>

Expand Down

0 comments on commit 000984e

Please sign in to comment.