aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornunzip <np.scarh@gmail.com>2018-12-12 18:45:56 +0000
committernunzip <np.scarh@gmail.com>2018-12-12 18:45:56 +0000
commitd8b633d900cacb2582e54aa3b9c772a5b95b2e87 (patch)
tree5d6d2d451d4381f2aac68eb07ed59581758adb5e
parent0445bc882ebf9bc90e259efbb2d608d5b5c1c259 (diff)
downloadvz215_np1915-d8b633d900cacb2582e54aa3b9c772a5b95b2e87.tar.gz
vz215_np1915-d8b633d900cacb2582e54aa3b9c772a5b95b2e87.tar.bz2
vz215_np1915-d8b633d900cacb2582e54aa3b9c772a5b95b2e87.zip
Fix top comments
-rwxr-xr-xevaluate.py6
-rw-r--r--lib/kmean.py6
-rw-r--r--lib/rerank.py2
-rwxr-xr-xopt.py6
-rw-r--r--report2/README.md50
5 files changed, 16 insertions, 54 deletions
diff --git a/evaluate.py b/evaluate.py
index 47d23a1..4c1264e 100755
--- a/evaluate.py
+++ b/evaluate.py
@@ -2,8 +2,10 @@
# Author: Vasil Zlatanov, Nunzio Pucci
# EE4 Pattern Recognition coursework
#
-# usage: part2.py [-h] [-t] [-cm] [-km] [-ma] [-e] [-r] [-ka RERANKA]
-# [-kb RERANKB] [-v]
+# 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]
+# [-K KMEAN] [-A] [-P PCA]
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
diff --git a/lib/kmean.py b/lib/kmean.py
index 64ab166..01224e0 100644
--- a/lib/kmean.py
+++ b/lib/kmean.py
@@ -1,3 +1,9 @@
+#!/usr/bin/env python
+# Author: Vasil Zlatanov, Nunzio Pucci
+# EE4 Pattern Recognition coursework
+#
+# usage: kmean.py
+
from logging import debug
import numpy as np
from sklearn.cluster import KMeans
diff --git a/lib/rerank.py b/lib/rerank.py
index 6fb5b7b..fc9f020 100644
--- a/lib/rerank.py
+++ b/lib/rerank.py
@@ -1,3 +1,5 @@
+#https://github.com/zhunzhong07/person-re-ranking/tree/master/CUHK03-NP
+
from scipy.spatial.distance import cdist
import numpy as np
from logging import debug
diff --git a/opt.py b/opt.py
index 1df9c8f..ee63cc0 100755
--- a/opt.py
+++ b/opt.py
@@ -2,8 +2,10 @@
# Author: Vasil Zlatanov, Nunzio Pucci
# EE4 Pattern Recognition coursework
#
-# usage: part2.py [-h] [-t] [-cm] [-km] [-ma] [-e] [-r] [-ka RERANKA]
-# [-kb RERANKB] [-v]
+# usage: opt.py [-h] [-t] [-c] [-k] [-m] [-e] [-r] [-a RERANKA]
+# [-b RERANKB] [-l RERANKL] [-n NEIGHBORS] [-v]
+# [-s SHOWRANK] [-1] [-M MULTRANK] [-C] [DATA]
+# [-K KMEAN] [-A] [-P PCA]
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
diff --git a/report2/README.md b/report2/README.md
deleted file mode 100644
index 92f592d..0000000
--- a/report2/README.md
+++ /dev/null
@@ -1,50 +0,0 @@
-```
-usage: evaluate.py [-h] [-t] [-c] [-k] [-m] [-e] [-r] [-p RERANKA]
- [-q RERANKB] [-l RERANKL] [-n NEIGHBORS] [-v] [-s SHOWRANK]
- [-1] [-M MULTRANK] [-C COMPARISON] [--data DATA] [-K KMEAN]
- [-P] [-2 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
- -p RERANKA, --reranka RERANKA
- Parameter k1 for rerank -p '$k1val' -ARGUMENT
- REQUIRED, default=9-
- -q RERANKB, --rerankb RERANKB
- Parameter k2 for rerank -q '$k2val' -ARGUMENT
- REQUIRED, default=3-
- -l RERANKL, --rerankl RERANKL
- Coefficient to combine distances(lambda) -l
- '$lambdaval' -ARGUMENT REQUIRED, default=0.3-
- -n NEIGHBORS, --neighbors NEIGHBORS
- Use customized ranklist size -n 'size' -ARGUMENT
- REQUIRED, default=1-
- -v, --verbose Use verbose output
- -s SHOWRANK, --showrank SHOWRANK
- Save ranklist pics id in a txt file. Number of
- ranklists saved specified as -s '$number' -ARGUMENT
- REQUIRED, default=0-
- -1, --normalise Normalise features
- -M MULTRANK, --multrank MULTRANK
- Run for different ranklist sizes equal to M -ARGUMENT
- REQUIRED, default=1-
- -C COMPARISON, --comparison COMPARISON
- Set to 2 to obtain a comparison of baseline and
- improved metric -ARGUMENT REQUIRED, default=1-
- --data DATA You can either put the data in a folder called 'data',
- or specify the location with --data 'path' -ARGUMENT
- REQUIRED, default='data'-
- -K KMEAN, --kmean KMEAN
- Perform Kmean clustering of size specified through -K
- '$size' -ARGUMENT REQUIRED, default=0-
- -P, --mAP Display Mean Average Precision for ranklist of size -n
- '$size'
- -2 PCA, --PCA PCA Use PCA with -2 '$n_components' -ARGUMENT REQUIRED,
- default=0-
-```