summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--algorithm.tex2
-rwxr-xr-xdata/combined/graphs/plots.py64
-rwxr-xr-xdata/pair-matching/roc.py16
-rw-r--r--experimental.tex6
-rw-r--r--graphics/back.pdfbin17795 -> 16183 bytes
-rw-r--r--graphics/face.pdfbin14783 -> 13851 bytes
-rw-r--r--graphics/frames.pdfbin10867 -> 10913 bytes
-rw-r--r--graphics/limbs.pdfbin45439 -> 50499 bytes
-rw-r--r--graphics/offline-nb.pdfbin17130 -> 17044 bytes
-rw-r--r--graphics/offline-sht.pdfbin20304 -> 18712 bytes
-rw-r--r--graphics/online-nb.pdfbin17894 -> 17633 bytes
-rw-r--r--graphics/online-sht.pdfbin24070 -> 20829 bytes
-rw-r--r--graphics/roc.pdfbin20430 -> 19394 bytes
-rw-r--r--graphics/var.pdfbin16101 -> 14691 bytes
-rw-r--r--uniqueness.tex2
15 files changed, 54 insertions, 36 deletions
diff --git a/algorithm.tex b/algorithm.tex
index fbe2dc8..38e0c39 100644
--- a/algorithm.tex
+++ b/algorithm.tex
@@ -27,7 +27,7 @@ In this work, we use the mixture of Gaussians model for skeleton recognition. Sk
\begin{figure}[t]
\centering
- \includegraphics[height=4.4in, angle=90, bb=4.5in 1.5in 6.5in 7in]{graphics/ErrorMarginals}
+ \includegraphics{graphics/limbs.pdf}
\caption{Histograms of differences between 9 skeleton measurements $x_k$ (Section~\ref{sec:experiment}) and their expectation given the class $y$.}
\label{fig:error marginals}
\end{figure}
diff --git a/data/combined/graphs/plots.py b/data/combined/graphs/plots.py
index 6f37b27..a4b01f3 100755
--- a/data/combined/graphs/plots.py
+++ b/data/combined/graphs/plots.py
@@ -8,15 +8,19 @@ import os
import scipy
import matplotlib as mpl
-mpl.rcParams['font.size'] = 8
+mpl.rcParams['font.size'] = 5
mpl.rcParams['lines.linewidth'] = 0.5
-mpl.rcParams['figure.figsize'] = 6,5
-mpl.rcParams['legend.fontsize'] = 8
-mpl.rcParams['axes.linewidth'] = 0.8
+mpl.rcParams['figure.figsize'] = 2.2,2.2
+mpl.rcParams['legend.fontsize'] = 5
+mpl.rcParams['axes.linewidth'] = 0.5
+mpl.rcParams['figure.subplot.hspace'] = 0.4
+mpl.rcParams['figure.subplot.wspace'] = 0.4
+legend_width = 0.2
+#mpl.rcParams.update(params)
out_dir = sys.argv[1]
#limbs distribution
-plt.figure()
+plt.figure(figsize=(5.6,1.7))
data = np.loadtxt("../limbs-avg-zdiff/data.csv",delimiter=",")
data = data[#(data[:,1] == 25)
((data != -1).all(1))
@@ -27,22 +31,25 @@ mean = data.mean(0)
var = data.std(0)
for i in range(len(mean)):
ax = plt.subplot(2,5,i+1)
- n,b,p = plt.hist(data[:,i],bins=100,normed=1,linewidth=0)
- plt.plot(b,mlab.normpdf(b,mean[i],var[i]))
+ n,b,p = plt.hist((data[:,i]-mean[i]),bins=100,normed=1,linewidth=0,color="lightgreen")
+ plt.plot(b,mlab.normpdf(b,0,var[i]),"red")
+ plt.xticks([])
+ plt.yticks([])
+ plt.xlabel("$x_"+str(i+1)+"-E[x_"+str(i+1)+"|y]$")
+ plt.ylabel("$P(x_"+str(i+1)+"-E[x_"+str(i+1)+"|y])$")
plt.savefig(os.path.join(out_dir,"limbs.pdf"),bbox_inches="tight",pad_inches=0.05)
#frames distribution
-fig = plt.figure(figsize=(6,4))
+plt.figure(figsize=(4.5,2))
x = np.loadtxt("frames.txt",usecols=(0,))
y = range(1,len(x)+1)
width=0.8
-plt.bar(y,x/x.sum()*100,width=width)
+plt.bar(y,x/x.sum()*100,width=width,linewidth=0,color="lightgreen")
plt.xlim(0.8,26)
plt.xticks([i+width/2. for i in range(1,len(x),5)], range(1,len(x),5))
plt.xlabel("Individual")
plt.ylabel("Frame ratio [%]")
plt.ylim(0,17)
-ax = plt.gca()
plt.savefig(os.path.join(out_dir,"frames.pdf"),bbox_inches="tight",pad_inches=0.05)
l = ["3","5","10","all"]
@@ -52,9 +59,10 @@ plt.figure()
for i in l:
x,y = np.loadtxt(i+"_nb_off.mat",unpack=True)
plt.plot(100*x,100*y,label="$n_p=$ "+i)
- plt.xlabel("Recall [%]")
- plt.ylabel("Precision [%]")
- plt.legend(loc="best")
+plt.xlabel("Recall [%]")
+plt.ylabel("Precision [%]")
+leg =plt.legend(loc="best")
+leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
plt.savefig(os.path.join(out_dir,"offline-nb.pdf"),bbox_inches="tight",pad_inches=0.05)
@@ -63,9 +71,10 @@ plt.figure()
for i in l:
x,y = np.loadtxt(i+"_sht_off.mat",unpack=True)
plt.plot(100*x,100*y,label="$n_p=$ "+i)
- plt.xlabel("Recall [%]")
- plt.ylabel("Precision [%]")
- plt.legend(loc="lower left")
+plt.xlabel("Recall [%]")
+plt.ylabel("Precision [%]")
+leg = plt.legend(loc="lower left")
+leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
plt.savefig(os.path.join(out_dir,"offline-sht.pdf"),bbox_inches="tight",pad_inches=0.05)
@@ -74,9 +83,10 @@ plt.figure()
for i in l:
x,y = np.loadtxt(i+"_nb_on.mat",unpack=True)
plt.plot(100*x,100*y,label="$n_p=$ "+i)
- plt.xlabel("Recall [%]")
- plt.ylabel("Precision [%]")
- plt.legend(loc="best")
+plt.xlabel("Recall [%]")
+plt.ylabel("Precision [%]")
+leg = plt.legend(loc="best")
+leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
plt.savefig(os.path.join(out_dir,"online-nb.pdf"),bbox_inches="tight",pad_inches=0.05)
@@ -85,9 +95,10 @@ plt.figure()
for i in l:
x,y = np.loadtxt(i+"_sht_on.mat",unpack=True)
plt.plot(100*x,100*y,label="$n_p=$ "+i)
- plt.xlabel("Recall [%]")
- plt.ylabel("Precision [%]")
- plt.legend(loc="best")
+plt.xlabel("Recall [%]")
+plt.ylabel("Precision [%]")
+leg = plt.legend(loc="best")
+leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
plt.savefig(os.path.join(out_dir,"online-sht.pdf"),bbox_inches="tight",pad_inches=0.05)
@@ -99,7 +110,8 @@ plt.plot(100*x,100*y,label="Skeleton")
plt.plot(100*a,100*b,label="Face")
plt.xlabel("Recall [%]")
plt.ylabel("Precision [%]")
-plt.legend(loc="best")
+leg = plt.legend(loc="best")
+leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
plt.savefig(os.path.join(out_dir,"face.pdf"),bbox_inches="tight",pad_inches=0.05)
@@ -113,7 +125,8 @@ plt.plot(100*x,100*y,label="Train/test away")
plt.plot(100*c,100*d,label="Train toward test away")
plt.xlabel("Recall [%]")
plt.ylabel("Precision [%]")
-plt.legend(loc="best")
+leg = plt.legend(loc="best")
+leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
plt.savefig(os.path.join(out_dir,"back.pdf"),bbox_inches="tight",pad_inches=0.05)
@@ -125,6 +138,7 @@ plt.plot(100*x,100*y,label="Reduced noise")
plt.plot(100*a,100*b,label="Original noise")
plt.xlabel("Recall [%]")
plt.ylabel("Precision [%]")
-plt.legend(loc="best")
+leg = plt.legend(loc="best")
+leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
plt.savefig(os.path.join(out_dir,"var.pdf"),bbox_inches="tight",pad_inches=0.05)
diff --git a/data/pair-matching/roc.py b/data/pair-matching/roc.py
index 19a1acf..7396ab4 100755
--- a/data/pair-matching/roc.py
+++ b/data/pair-matching/roc.py
@@ -6,11 +6,14 @@ import matplotlib as mpl
import math
from sets import ImmutableSet
-mpl.rcParams['font.size'] = 8
+mpl.rcParams['font.size'] = 5
mpl.rcParams['lines.linewidth'] = 0.5
-mpl.rcParams['figure.figsize'] = 6,5
-mpl.rcParams['legend.fontsize'] = 8
-mpl.rcParams['axes.linewidth'] = 0.8
+mpl.rcParams['figure.figsize'] = 2.2,2.2
+mpl.rcParams['legend.fontsize'] = 5
+mpl.rcParams['axes.linewidth'] = 0.5
+mpl.rcParams['figure.subplot.hspace'] = 0.4
+mpl.rcParams['figure.subplot.wspace'] = 0.4
+legend_width = 0.2
def distance(a,b):
return math.sqrt(np.square(a-b).sum())
@@ -43,6 +46,7 @@ def gen_pairs(var,sk_data):
return result
if __name__ == "__main__":
+ plt.figure(figsize=(3,2.2))
ap = np.loadtxt("associatepredict.txt",delimiter=",")
indices = [i for i in range(ap.shape[0]) if ap[i,1]<0.1]
ap_false = ap[:,1][indices]
@@ -74,9 +78,9 @@ if __name__ == "__main__":
true_pos = np.array(true_pos)
true_pos = true_pos[indices]
plt.plot(false_pos,true_pos,label="$\sigma$ = "+str(s))
- plt.legend(loc="lower right")
+ leg = plt.legend(loc="lower right")
+ leg.get_frame().set_linewidth(legend_width)
plt.savefig("roc.pdf",bbox_inches="tight",pad_inches=0.05)
- plt.show()
diff --git a/experimental.tex b/experimental.tex
index b96893a..8bd7b9d 100644
--- a/experimental.tex
+++ b/experimental.tex
@@ -100,7 +100,7 @@ the skeleton in a contiguous way. This allows us to define the concept of a
\begin{figure}[t]
\begin{center}
- \includegraphics[width=0.60\textwidth]{graphics/frames.pdf}
+ \includegraphics[]{graphics/frames.pdf}
\end{center}
\vspace{-1.5\baselineskip}
\caption{Distribution of the frame ratio of each individual in the
@@ -134,11 +134,11 @@ the algorithm.
\begin{figure*}[t]
\begin{center}
\subfloat[Mixture of Gaussians]{
- \includegraphics[width=0.49\textwidth]{graphics/offline-nb.pdf}
+ \includegraphics[]{graphics/offline-nb.pdf}
\label{fig:offline:nb}
}
\subfloat[Sequential Hypothesis Learning]{
- \includegraphics[width=0.49\textwidth]{graphics/offline-sht.pdf}
+ \includegraphics[]{graphics/offline-sht.pdf}
\label{fig:offline:sht}
}
\caption{Precision-recall curve for the mixture of Gaussians model
diff --git a/graphics/back.pdf b/graphics/back.pdf
index ebda274..0702bf9 100644
--- a/graphics/back.pdf
+++ b/graphics/back.pdf
Binary files differ
diff --git a/graphics/face.pdf b/graphics/face.pdf
index c92b8c2..2663b70 100644
--- a/graphics/face.pdf
+++ b/graphics/face.pdf
Binary files differ
diff --git a/graphics/frames.pdf b/graphics/frames.pdf
index 819e23b..cb12743 100644
--- a/graphics/frames.pdf
+++ b/graphics/frames.pdf
Binary files differ
diff --git a/graphics/limbs.pdf b/graphics/limbs.pdf
index fe92ce2..58336eb 100644
--- a/graphics/limbs.pdf
+++ b/graphics/limbs.pdf
Binary files differ
diff --git a/graphics/offline-nb.pdf b/graphics/offline-nb.pdf
index cf1a43b..95e89a7 100644
--- a/graphics/offline-nb.pdf
+++ b/graphics/offline-nb.pdf
Binary files differ
diff --git a/graphics/offline-sht.pdf b/graphics/offline-sht.pdf
index 9ef1a03..4cadc70 100644
--- a/graphics/offline-sht.pdf
+++ b/graphics/offline-sht.pdf
Binary files differ
diff --git a/graphics/online-nb.pdf b/graphics/online-nb.pdf
index 3cdc3cb..febf14e 100644
--- a/graphics/online-nb.pdf
+++ b/graphics/online-nb.pdf
Binary files differ
diff --git a/graphics/online-sht.pdf b/graphics/online-sht.pdf
index 067fbd2..fcd418c 100644
--- a/graphics/online-sht.pdf
+++ b/graphics/online-sht.pdf
Binary files differ
diff --git a/graphics/roc.pdf b/graphics/roc.pdf
index 2d4a42b..8e25ab7 100644
--- a/graphics/roc.pdf
+++ b/graphics/roc.pdf
Binary files differ
diff --git a/graphics/var.pdf b/graphics/var.pdf
index d51105c..13a94af 100644
--- a/graphics/var.pdf
+++ b/graphics/var.pdf
Binary files differ
diff --git a/uniqueness.tex b/uniqueness.tex
index f034a21..84ec9ce 100644
--- a/uniqueness.tex
+++ b/uniqueness.tex
@@ -69,7 +69,7 @@ output of the algorithm for the threshold $\delta$ is defined as:
\begin{figure}[t]
\begin{center}
- \includegraphics[width=0.6\columnwidth]{graphics/roc.pdf}
+ \includegraphics[]{graphics/roc.pdf}
\end{center}
\vspace{-1.5\baselineskip}
\caption{ROC curve for several standard deviations of the noise and