Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
fixed docstring and parenthesis gap
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannis Kalantidis committed Feb 25, 2016
1 parent d664dba commit 16a87ff
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions evaluate.py
Expand Up @@ -167,6 +167,19 @@ def get_ap(inds, dists, query_name, index_names, groundtruth_dir, ranked_dir=Non


def fit_whitening(whiten_features, agg_fn, d):
"""
Calculate whitening parameters
:param str whiten_features:
directory of features to fit whitening
:param callable agg_fn:
aggregation function
:param int d:
final feature dimension
:returns dict params:
a dict of transformation parameters
"""

# Load features for fitting whitening
data, _ = load_and_aggregate_features(whiten_features, agg_fn)
Expand All @@ -190,7 +203,7 @@ def run_eval(queries_dir, groundtruth_dir, index_features, whiten_params, out_di
:param str whiten_features: directory of features to fit whitening
:param str out_dir: directory to save query results
:param callable agg_fn: aggregation function
:param int d: final feature dimension
:param callable qe_fn: query expansion function
"""

data, image_names = load_and_aggregate_features(index_features, agg_fn)
Expand Down Expand Up @@ -240,7 +253,7 @@ def run_eval(queries_dir, groundtruth_dir, index_features, whiten_params, out_di
agg_fn = apply_ucrow_aggregation

if args.qe > 0:
qe_fn = partial( simple_query_expansion, top_k=args.qe )
qe_fn = partial(simple_query_expansion, top_k=args.qe)
else:
qe_fn = None

Expand Down

0 comments on commit 16a87ff

Please sign in to comment.