migrated code to public repository

This commit is contained in:
mohsen-mansouryar 2016-03-09 19:52:35 +01:00
parent a7df82d7a4
commit f34dc653e5
233 changed files with 16279 additions and 186 deletions

View file

@ -0,0 +1,18 @@
from __future__ import division
import numpy as np
import os, sys
if __name__ == '__main__':
try:
path = sys.argv[1]
time_stamps = np.load(os.path.join(path, 'world_timestamps.npy'))
pts = np.load(os.path.join(path, 'pupil_positions.npy'))
valid = filter(lambda e: e[1] > 0, pts) # filter all with zero confidence
csum = sum(e[1] for e in pts)
print 'Ratio: %s' % round(len(valid)*100/len(pts), 2) + '%'
if len(valid):
print 'Average Confidence:', csum/len(valid)
print 'Frames: %s' % len(time_stamps)
except Exception, err:
print 'Something went wrong.'
print err