1. An information processing apparatus, comprising: a face detecting unit, implemented on a hardware processor of the information processing apparatus, that detects a face area included in image data; a face-component detecting unit that detects a face component from the face area detected by the face detecting unit; and a line-of-sight discriminating unit that executes line-of-sight discrimination processing for a face image from which the face component is detected, wherein the line-of-sight discriminating unit executes processing for discriminating a state of a line of sight of face image data of the face image from which the face component is detected, the state being one of a positive state in which the line of sight is directed in a camera direction and a negative state in which the line of sight is not directed in the camera direction, the processing being based on collation processing of the face image data with respect to a line-of-sight discrimination dictionary in which learning data, including a plurality of face images classified in the positive state and a plurality of face images classified in the negative state, is stored, and a warning output unit outputs the warning signal when a face image classified in the negative state is included in a line of sight of a face included in an acquired image of the imaging apparatus.