Described herein are systems and methods for detecting a gaze direction and/or pupil dimension of an eye based on an image of the eye. Example systems and methods include: (i) capturing an image of an eye; (ii) based on the image, determining a set of edge pixels corresponding with an edge of a pupil of the eye; (iii) selecting at least one subset of pixels from the set of edge pixels; (iv) fitting an ellipse to each subset of pixels; (v) determining a respective confidence value for each fitted ellipse based on a distance between each pixel of the set of pixels and an edge of the respective fitted ellipse; (vi) determining a best-fit ellipse based on the respective confidence value(s); and (vii) determining, based on the best-fit ellipse, at least one of a gaze direction of the eye or a pupil dimension of the eye.