``` usage: evaluate.py [-h] [-t] [-c] [-k] [-m] [-e] [-r] [-a RERANKA] [-b RERANKB] [-l RERANKL] [-n NEIGHBORS] [-v] [-s SHOWRANK] [-1] [-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 -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 for `evaluate.py`: EXAMPLE 1: Run euclidean distance with top n `evaluate.py -e -n 10` or simply `evaluate.py -n 10` EXAMPLE 2: Run euclidean distance for the first 10 values of top n and graph them `evaluate.py -M 10` EXAMPLE 3: Run comparison between baseline and rerank for the first 5 values of top n and graph them `evaluate.py -M 5 -C` EXAMPLE 4: Run for kmeans, 10 clusters `evaluate.py -K 10` EXAMPLE 5: Run for mahalanobis, using PCA for top 100 eigenvectors to speed up the calculation `evaluate.py -m -P 100` EXAMPLE 6: Run rerank for customized values of RERANKA, RERANKB and RERANKL `evaluate.py -r -a 11 -b 3 -l 0.3` EXAMPLE 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 8: 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 9: Display mAP. It is advisable to use high n to obtain an accurate results. `evaluate.py -A -n 5000` EXAMPLE 10: Run euclidean distance specifying a different data folder location `evaluate.py --data` EXAMPLES for `opt.py`: EXAMPLE 1: optimize top 1 accuracy for k1, k2, lambda speeding up the process with PCA, top 50 eigenvectors `opt.py -P 50` EXAMPLE 2: optimize mAP for k1, k2, lambda speeding up the process with PCA, top 50 eigenvectors `opt.py -P 50 -A`