A work machine that operates based on an image of a camera, characterized by comprising: a plurality of cameras (11a, 11b); detection means configured to detect a failure or a trouble in one of the plurality of cameras (11a, 11b); distance obtaining means configured to obtain, if the failure or the trouble is not detected, distance information between the work machine and an object based on images with a parallax which are captured by the plurality of cameras (11a, 11b), and to obtain, if the failure is detected, the distance information based on an image captured by another camera in which the failure or the trouble is not detected; control means configured to control the work machine based on the distance information obtained by the distance obtaining means; and object recognition means configured to recognize the object based on a first analysis model that is a model incapable of obtaining the distance information and an image captured by one of the plurality of cameras (11a, 11b); second object recognition means configured to recognize the object based on a second analysis model that is a model capable of obtaining the distance information and an information captured by the other camera in which the failure or the trouble is not detected; wherein the control means is configured to control, if the failure or the trouble is not detected, an operation of the work machine based on the distance information obtained based on the images with the parallax by the distance obtaining means and an object recognition result obtained by the object recognition means, wherein The control means is configured to control, if the failure or the trouble is detected, the operation of the work machine based on the distance information obtained by the distance obtaining means based on the image captured by the other camera and an object recognition result obtained by the second object recognition means. a plurality of cameras (11a, 11b); detection means configured to detect a failure or a trouble in one of the plurality of cameras (11a, 11b); distance obtaining means configured to obtain, if the failure or the trouble is not detected, distance information between the work machine and an object based on images with a parallax which are captured by the plurality of cameras (11a, 11b), and to obtain, if the failure is detected, the distance information based on an image captured by another camera in which the failure or the trouble is not detected; control means configured to control the work machine based on the distance information obtained by the distance obtaining means; and object recognition means configured to recognize the object based on a first analysis model that is a model incapable of obtaining the distance information and an image captured by one of the plurality of cameras (11a, 11b); second object recognition means configured to recognize the object based on a second analysis model that is a model capable of obtaining the distance information and an information captured by the other camera in which the failure or the trouble is not detected; wherein the control means is configured to control, if the failure or the trouble is not detected, an operation of the work machine based on the distance information obtained based on the images with the parallax by the distance obtaining means and an object recognition result obtained by the object recognition means, wherein The control means is configured to control, if the failure or the trouble is detected, the operation of the work machine based on the distance information obtained by the distance obtaining means based on the image captured by the other camera and an object recognition result obtained by the second object recognition means.