1. An image processing apparatus comprising: a processor configured to: detect a position of at least a part of an object in an image so as to obtain, for one pixel or each of a plurality of pixels in the image, a first likelihood that indicates whether the pixel is included in a region where the object is present; obtain, for one pixel or each of a plurality of pixels in the image, a second likelihood indicating whether the pixel is a pixel corresponding to a 3D body by using a feature amount of the pixel; hold in advance a first model indicating the region where the object is present; allocate the first model correspondingly to the detected position of a part of the object, thereby obtaining the first likelihood; combine the first likelihood and the second likelihood so as to obtain a third likelihood for one pixel or each of a plurality of pixels in the image; generate a second model to determine whether or not the pixel of the image is included in the region where the object is present, by using the third likelihood; and determine whether or not the pixel of the image is included in the region where the object is present by using the second model, thereby specifying the region where the object is present.