An image forming apparatus comprising: a conveyor member configured to rotate; an optical sensor comprising: a light emitting portion configured to emit light toward the conveyor member; and a light receiving portion configured to receive reflected light; an image forming portion configured: to form a print image onto the conveyor member or onto an image recording medium conveyed by the conveyor member when forming the print image onto the image recording medium; and to form a mark onto the conveyor member and/or the image recording medium when the optical sensor performs a mark detection; a drive portion configured to perform: a rotation for detection, wherein the drive portion is configured to rotate the conveyor member for the mark detection; and a rotation for nondetection, wherein the drive portion is configured to rotate the conveyor member for a purpose other than the mark detection; and characterized by a controller configured: while the rotation for nondetection is performed to obtain an amount of reflected light received by the optical sensor and to adjust a value of sensitivity for the optical sensor based on the amount of reflected light received by the optical sensor; and to detect the mark with the optical sensor based on the adjusted value of sensitivity while the rotation for detection is performed. a conveyor member configured to rotate; an optical sensor comprising: a light emitting portion configured to emit light toward the conveyor member; and a light receiving portion configured to receive reflected light; a light emitting portion configured to emit light toward the conveyor member; and a light receiving portion configured to receive reflected light; an image forming portion configured: to form a print image onto the conveyor member or onto an image recording medium conveyed by the conveyor member when forming the print image onto the image recording medium; and to form a mark onto the conveyor member and/or the image recording medium when the optical sensor performs a mark detection; to form a print image onto the conveyor member or onto an image recording medium conveyed by the conveyor member when forming the print image onto the image recording medium; and to form a mark onto the conveyor member and/or the image recording medium when the optical sensor performs a mark detection; a drive portion configured to perform: a rotation for detection, wherein the drive portion is configured to rotate the conveyor member for the mark detection; and a rotation for nondetection, wherein the drive portion is configured to rotate the conveyor member for a purpose other than the mark detection; and characterized by a controller configured: while the rotation for nondetection is performed to obtain an amount of reflected light received by the optical sensor and to adjust a value of sensitivity for the optical sensor based on the amount of reflected light received by the optical sensor; and to detect the mark with the optical sensor based on the adjusted value of sensitivity while the rotation for detection is performed. a rotation for detection, wherein the drive portion is configured to rotate the conveyor member for the mark detection; and a rotation for nondetection, wherein the drive portion is configured to rotate the conveyor member for a purpose other than the mark detection; and characterized by a controller configured: while the rotation for nondetection is performed to obtain an amount of reflected light received by the optical sensor and to adjust a value of sensitivity for the optical sensor based on the amount of reflected light received by the optical sensor; and to detect the mark with the optical sensor based on the adjusted value of sensitivity while the rotation for detection is performed. while the rotation for nondetection is performed to obtain an amount of reflected light received by the optical sensor and to adjust a value of sensitivity for the optical sensor based on the amount of reflected light received by the optical sensor; and to detect the mark with the optical sensor based on the adjusted value of sensitivity while the rotation for detection is performed.