PROBLEM TO BE SOLVED: To detect a body height of an object immediately after detecting approach of the object.SOLUTION: An image forming apparatus 1 comprises: a human body sensor section 50 which has a pyroelectric infrared sensor 502; a body height sensor section 54 which has a pyroelectric infrared sensor 542, is installed at an upper part or a lower part of the human body sensor section 50, and of which a viewing angle and detection distance in the horizontal direction are the same as those of the human body sensor section 50; an oscillation mechanism 60 for vertically performing an oscillation operation of the body height sensor section 54; an oscillation control section 100 which makes the oscillation mechanism 60 start the oscillation operation when an object is detected by the human body sensor section 50 and the body height sensor section 54; and a body height detection section 101 which detects a body height of the object from an oscillation angle of the body height sensor section 54 when the object becomes non-detection by the body height sensor section 54 which performs the oscillation operation.【課題】対象物の接近を検知すると直ちに当該対象物の身長を検出可能にする。【課題を解決するための手段】画像形成装置1は、焦電型赤外線センサー502を有する人体センサー部50と、焦電型赤外線センサー542を有し、人体センサー部50の上又は下に設置され、かつ、水平方向の視野角及び検知距離が人体センサー部50と同じである身長センサー部54と、身長センサー部54を上下に首振り動作させる首振り機構60と、人体センサー部50及び身長センサー部54により対象物が検知されたときに、首振り機構60に首振り動作を開始させる首振り制御部100と、首振り動作する身長センサー部54により対象物が非検知となったときの身長センサー部54の首振り角度から対象物の身長を検出する身長検出部101とを備える。【選択図】図4