1. An image processing apparatus, comprising: an image input unit configured to input an image; a detection unit configured to perform detection processing of detecting a target object from the input image by detecting a detection pattern that shows the target object and has a limit size in a used detection method from a detection image generated from the input image input by the image input unit; a size setting unit configured to set a size of the detection pattern; a display unit configured to display the input image and the size of the detection pattern set by the size setting unit in the input image; a size changing unit configured to change a resolution of the detection pattern whose size is set by the size setting unit so that the detection pattern has the limit size; a conversion unit configured to generate a plurality of the detection images by converting a resolution of the input image to a first resolution with a conversion rate used in changing the resolution of the detection pattern by the size changing unit, and to a plurality of resolutions lower than the first resolution with sizes of the resolution-converted input images not becoming smaller than the limit size; and a calculation unit configured to calculate a predicted processing time to be required for the detection processing by the detection unit based on the size set by the size setting unit, wherein the detection unit is configured to perform the detection processing on each of the plurality of detection images generated by the conversion unit and is configured to combine a plurality of acquired detection results, and wherein the display unit further is configured to display the predicted processing time.