A method for detecting line-of-sight in a face image comprising an eye, characterized by, comprising: determining (S110, S310), based on key feature points in the face image, a face posture and an eye pupil rotational displacement corresponding to the face image, wherein the key feature points represent positions of facial features in the face image, and the eye pupil rotational displacement is a displacement of a pupil center relative to an eyeball center in the face image, wherein the facial features comprise eyes, wherein the pupil center and the eyeball center are determined based on the key feature points; constructing a corresponding line-of-sight optimization function based on a preset projection function, the face posture, and the eye pupil rotational displacement; and acquiring a line-of-sight direction that reaches a preset optimization target in the line-of-sight optimization function in the three-dimensional space where the actual face is located, and taking the acquired line-of-sight direction as the line-of-sight direction of the actual face, wherein the preset optimization target is that a difference between an eye pupil rotational displacement determined by projecting a line-of-sight direction of a face in the three-dimensional space onto the two-dimensional imaging surface and the eye pupil rotational displacement corresponding to the face image is minimum, the actual face is a face in the three-dimensional space corresponding to the face image, the line-of-sight direction is a direction the eye is looking at in the three-dimensional space; wherein the preset projection function is: Π( Rx + t), and the line-of-sight optimization function is: min{∥Π( Rx + t) - d ∥ 2}; wherein R represents a rotation parameter in the face posture, t represents a translation parameter in the face posture, x represents the line-of-sight direction of the face image, and d represents the eye pupil rotational displacement, and Π( Rx + t) is sPRx + t, wherein s represents a scaling factor, and P = 1 0 0 0 1 0. determining (S110, S310), based on key feature points in the face image, a face posture and an eye pupil rotational displacement corresponding to the face image, wherein the key feature points represent positions of facial features in the face image, and the eye pupil rotational displacement is a displacement of a pupil center relative to an eyeball center in the face image, wherein the facial features comprise eyes, wherein the pupil center and the eyeball center are determined based on the key feature points; constructing a corresponding line-of-sight optimization function based on a preset projection function, the face posture, and the eye pupil rotational displacement; and acquiring a line-of-sight direction that reaches a preset optimization target in the line-of-sight optimization function in the three-dimensional space where the actual face is located, and taking the acquired line-of-sight direction as the line-of-sight direction of the actual face, wherein the preset optimization target is that a difference between an eye pupil rotational displacement determined by projecting a line-of-sight direction of a face in the three-dimensional space onto the two-dimensional imaging surface and the eye pupil rotational displacement corresponding to the face image is minimum, the actual face is a face in the three-dimensional space corresponding to the face image, the line-of-sight direction is a direction the eye is looking at in the three-dimensional space; wherein the preset projection function is: Π( Rx + t), and the line-of-sight optimization function is: min{∥Π( Rx + t) - d ∥ 2}; wherein R represents a rotation parameter in the face posture, t represents a translation parameter in the face posture, x represents the line-of-sight direction of the face image, and d represents the eye pupil rotational displacement, and Π( Rx + t) is sPRx + t, wherein s represents a scaling factor, and P = 1 0 0 0 1 0.