diff options
Diffstat (limited to 'data')
| -rwxr-xr-x | data/face-detection-accuracy.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/data/face-detection-accuracy.py b/data/face-detection-accuracy.py new file mode 100755 index 0000000..ad43a2f --- /dev/null +++ b/data/face-detection-accuracy.py @@ -0,0 +1,16 @@ +#!/usr/bin/python +import matplotlib.pyplot as plt +import matplotlib.mlab as ml +import numpy as np +import sys + +face_filename = sys.argv[1] +data = ml.load(face_filename,delimiter=",",usecols=[3,4]) +distance_detected = [float(distance) for (distance,detected) in data if int(detected)>0] +distance = [float(distance) for (distance,detected) in data] +range = (min(distance),max(distance)) +hist_detected,bins = np.histogram(distance_detected,bins=30,range=range) +hist,bins = np.histogram(distance, bins=30, range=range) +result = hist_detected*1./hist +plt.bar(bins[1:],result,width=np.diff(bins)[1]) +plt.show() |
