Skip to content

Commit 000984e

Browse files
committed
Updated download links
1 parent 339c89e commit 000984e

File tree

4 files changed

+61
-34
lines changed

4 files changed

+61
-34
lines changed

download.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
base_url="http://www.iis.ee.ic.ac.uk/~vbalnt/hpatches"
3+
base_url="http://icvl.ee.ic.ac.uk/vbalnt/hpatches"
44
hpatches_url="$base_url/hpatches-release.tar.gz"
55
descrs_url="$base_url/descriptors"
66
descrs_list="$base_url/descriptors/descrs.txt"
@@ -46,9 +46,4 @@ elif [ $1 = "descr" ]; then
4646
rm "./data/descriptors/$2.tar.gz"
4747
fi
4848
fi
49-
else
50-
echo "Usage: "
51-
echo "sh download.sh hpatches || downloads the patches dataset"
52-
echo "sh download.sh descr X || downloads computed result files for descr X"
53-
exit 1
5449
fi

python/hpatches_vis.py

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,46 @@
11
from utils.hpatch import *
22
import cv2
33

4+
5+
# all types of patches
6+
tps = ['ref','e1','e3','e5','h1','h3','h5',\
7+
't1','t3','t5']
8+
9+
def vis_patches(seq,tp,ids):
10+
"""Visualises a set of types and indices for a sequence"""
11+
h = len(tp)*65
12+
vis = np.empty((h, 0))
13+
# add the first column with the patch type names
14+
vis_tmp = np.empty((0,55))
15+
for t in tp:
16+
tp_patch = 255*np.ones((65,55))
17+
cv2.putText(tp_patch,t,(5,25),cv2.FONT_HERSHEY_DUPLEX , 1,0,1)
18+
vis_tmp = np.vstack((vis_tmp,tp_patch))
19+
vis = np.hstack((vis,vis_tmp))
20+
# add the actual patches
21+
for idx in ids:
22+
vis_tmp = np.empty((0,65))
23+
for t in tp:
24+
vis_tmp = np.vstack((vis_tmp,get_patch(seq,t,idx)))
25+
vis = np.hstack((vis,vis_tmp))
26+
return vis
27+
28+
429
# select a subset of types of patches to visualise
530
# tp = ['ref','e5','h5','t5']
631
#or visualise all - tps holds all possible types
732
tp = tps
833

934
# list of patch indices to visualise
10-
ids = range(10)
35+
ids = range(1,55)
1136

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

1641
# show
17-
cv2.imshow("HPatches example", vis/255)
18-
cv2.waitKey(0)
42+
# cv2.imshow("HPatches example", vis/255)
43+
# cv2.waitKey(0)
1944

2045
# or save
21-
# cv2.imwrite("patches.png", vis)
46+
cv2.imwrite("patches.png", vis)

python/readme.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
![logo](./utils/imgs/hpatch.png "logo")
2-
## Python benchmark
2+
## Python implementation of the HPatches benchmark protocols
33

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

20-
### Dataset description
21-
22-
After download, the folder `../data/hpatches-release` contains all the
23-
patches from the 116 sequences. The sequence folders are named with
24-
the following convention
25-
26-
* `i_X`: patches extracted from image sequences with illumination changes
27-
* `v_X`: patches extracted from image sequences with viewpoint changes
28-
29-
For each image sequence, we provide a set of reference patches
30-
`ref.png`. For the remaining 5 images in the sequence, we provide
31-
three patch sets `eK.png` and `hK.png` and `tK.png`, containing the
32-
corresponding patches from `ref.png` as found in the `K-th` image with
33-
increasing amounts of geometric noise (`e`<`h`<`t`).
34-
35-
![patches](./utils/imgs/patches.png "patches")
36-
37-
Please see the [patch extraction method details](utils/docs/extraction.md) for more
38-
information about the extraction process.
20+
### Downloading the HPatches dataset
21+
The rest of this document assumes you have already downloaded the
22+
HPatches dataset. For information on how to get it, please check
23+
[the guide](../readme.md).
3924

4025
### Loading/visualising the dataset
4126
An example of how to load a sequence and visualise the patches can be

readme.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ dataset, one in `python` and one in `matlab`.
1414
| ------------- |:-------------:|
1515
| [details](python/readme.md) | [details](matlab/README.md) |
1616

17-
18-
### Benchmark Tasks
17+
### Benchmark tasks
1918

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

25-
### Benchmark Data
24+
### Getting the dataset
2625

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

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

49+
50+
### Dataset description
51+
52+
After download, the folder `../data/hpatches-release` contains all the
53+
patches from the 116 sequences. The sequence folders are named with
54+
the following convention
55+
56+
* `i_X`: patches extracted from image sequences with illumination changes
57+
* `v_X`: patches extracted from image sequences with viewpoint changes
58+
59+
For each image sequence, we provide a set of reference patches
60+
`ref.png`. For the remaining 5 images in the sequence, we provide
61+
three patch sets `eK.png` and `hK.png` and `tK.png`, containing the
62+
corresponding patches from `ref.png` as found in the `K-th` image with
63+
increasing amounts of geometric noise (`e`<`h`<`t`).
64+
65+
![patches](./python/utils/imgs/patches.png "patches")
66+
67+
Please see the [patch extraction method details](./python/utils/docs/extraction.md) for more
68+
information about the extraction process.
69+
70+
71+
5072
### References
5173
<a name="refs"></a>
5274

0 commit comments

Comments
 (0)