1. A detection method executed by a computer, the detection method comprising: detecting one or more pupil candidates from a face image region corresponding to a face of a subject in an image that includes a subject based on specific shape information; identifying an eye region in the image; comparing brightness information of the eye region with brightness information of a background portion of the image that excludes the face of the subject; identifying, when a result of the comparing indicates that a brightness of the eye region is brighter than a brightness of the background portion of the image that excludes the face of the subject, at least one pupil candidate as a pupil from among the one or more pupil candidates based on the brightness information of the background portion and based on relationship information indicating a relationship between the brightness information of the background portion and a size of the pupil; and identifying, when the result of the comparing indicates that the brightness of the eye region is darker than the brightness of the background portion, the at least one pupil candidate from the one or more pupil candidates based on another relationship information indicating a relationship between the brightness information of the eye region and the size of the pupil.