migrated code to public repository
This commit is contained in:
parent
a7df82d7a4
commit
f34dc653e5
233 changed files with 16279 additions and 186 deletions
18
code/recording/util/check_pupil_positions.py
Normal file
18
code/recording/util/check_pupil_positions.py
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue