A workpiece detection device comprising: a trapezoid correction unit configured to perform trapezoid correction on photographed image data obtained by photographing workpieces loaded on a mounting place with a monocular camera; a pattern matching unit configured to carry out a first pattern matching between an image of the trapezoid-corrected photographed image data and a first plurality of models that show images of a workpiece to be detected and have a plurality of sizes and a plurality of angles so as to select a model having a size and an angle with a highest degree of matching; a primary detection unit configured to detect a position and an angle of an uppermost workpiece from among the loaded workpieces based on the model selected by the pattern matching unit; an actual load height calculation unit configured to calculate an actual load height of the uppermost workpiece based on a hand height detected by a workpiece holding robot when a gripper of the workpiece holding robot is positioned above the uppermost workpiece based on the position and the angle of the uppermost workpiece detected by the primary detection unit; and a secondary detection unit configured to re-detect the position and the angle of the uppermost workpiece based on a model having a size and an angle with a highest degree of matching that the pattern matching unit selects by carrying out a second pattern matching between the image of the trapezoid-corrected photographed image data and a second plurality of models that are either selected from among the first plurality of models based on the actual load height or newly created based on the actual load height, the second plurality of models being less than the first plurality of models. a trapezoid correction unit configured to perform trapezoid correction on photographed image data obtained by photographing workpieces loaded on a mounting place with a monocular camera; a pattern matching unit configured to carry out a first pattern matching between an image of the trapezoid-corrected photographed image data and a first plurality of models that show images of a workpiece to be detected and have a plurality of sizes and a plurality of angles so as to select a model having a size and an angle with a highest degree of matching; a primary detection unit configured to detect a position and an angle of an uppermost workpiece from among the loaded workpieces based on the model selected by the pattern matching unit; an actual load height calculation unit configured to calculate an actual load height of the uppermost workpiece based on a hand height detected by a workpiece holding robot when a gripper of the workpiece holding robot is positioned above the uppermost workpiece based on the position and the angle of the uppermost workpiece detected by the primary detection unit; and a secondary detection unit configured to re-detect the position and the angle of the uppermost workpiece based on a model having a size and an angle with a highest degree of matching that the pattern matching unit selects by carrying out a second pattern matching between the image of the trapezoid-corrected photographed image data and a second plurality of models that are either selected from among the first plurality of models based on the actual load height or newly created based on the actual load height, the second plurality of models being less than the first plurality of models.