usage: evaluate.py [-h] [-t] [-c] [-k] [-m] [-e] [-r] [-a RERANKA]
[-b RERANKB] [-l RERANKL] [-n NEIGHBORS] [-v] [-s SHOWRANK]
[-1] [-2] [-M MULTRANK] [-C] [--data DATA] [-K KMEAN] [-A]
[-P PCA]
optional arguments:
-h, --help show this help message and exit
-t, --train Use train data instead of query and gallery
-c, --conf_mat Show visual confusion matrix
-k, --kmean_alt Perform clustering with generalized labels(not actual
kmean)
-m, --mahalanobis Perform Mahalanobis Distance metric
-e, --euclidean Use standard euclidean distance
-r, --rerank Use k-reciprocal rernaking
-a RERANKA, --reranka RERANKA
Parameter k1 for rerank
-b RERANKB, --rerankb RERANKB
Parameter k2 for rerank
-l RERANKL, --rerankl RERANKL
Parameter lambda for rerank
-n NEIGHBORS, --neighbors NEIGHBORS
Use customized ranklist size NEIGHBORS
-v, --verbose Use verbose output
-s SHOWRANK, --showrank SHOWRANK
Save ranklist pics id in a txt file for first SHOWRANK
queries
-1, --normalise Normalise features
-2, --standardise Standardise features
-M MULTRANK, --multrank MULTRANK
Run for different ranklist sizes equal to MULTRANK
-C, --comparison Compare baseline and improved metric
--data DATA Folder containing data
-K KMEAN, --kmean KMEAN
Perform Kmean clustering, KMEAN number of clusters
-A, --mAP Display Mean Average Precision
-P PCA, --PCA PCA Perform pca with PCA eigenvectors
EXAMPLES 1 for evaluate.py
:
EXAMPLE 1.1: Run euclidean distance with top n
evaluate.py -e -n 10
or simply
evaluate.py -n 10
EXAMPLE 1.2: Run euclidean distance for the first 10 values of top n and graph them
evaluate.py -M 10
EXAMPLE 1.3: Run comparison between baseline and rerank for the first 5 values of top n and graph them
evaluate.py -M 5 -C
EXAMPLE 1.4: Run for kmeans, 10 clusters
evaluate.py -K 10
EXAMPLE 1.5: Run for mahalanobis, using PCA for top 100 eigenvectors to speed up the calculation
evaluate.py -m -P 100
EXAMPLE 1.6: Run rerank for customized values of RERANKA, RERANKB and RERANKL
evaluate.py -r -a 11 -b 3 -l 0.3
EXAMPLE 1.7: Run on the training set with euclidean distance and normalize feature vectors. Draw confusion matrix at the end
evaluate.py -t -1 -c
EXAMPLE 1.8: Run euclidean distance standardising the feature data for the first 10 values of top n and graph them
evaluate.py -2 -M 10
EXAMPLE 1.9: Run for rerank top 10 and save the names of the images that compose the ranklist for the first 5 queries: query.txt, ranklist.txt
evaluate.py -r -s 5 -n 10
EXAMPLE 1.10: Display mAP. It is advisable to use high n to obtain an accurate result
evaluate.py -A -n 5000
EXAMPLE 1.11: Run euclidean distance specifying a different data folder location
for data int the same folder as evaluate.py:
evaluate.py --data ./
or for data in another folder:
evaluate.py --data ./foo/bar/
EXAMPLES 2 for opt.py
:
EXAMPLE 2.1: optimize top 1 accuracy for k1, k2, lambda speeding up the process with PCA, top 50 eigenvectors
opt.py -P 50
EXAMPLE 2.2: optimize mAP for k1, k2, lambda speeding up the process with PCA, top 50 eigenvectors
opt.py -P 50 -A