1. An information processing apparatus comprising: a hardware processor; and a memory for storing instructions to be executed by the hardware processor, wherein, when the instructions stored in the memory are executed by the hardware processor, the information processing apparatus functions as: a display controlling unit configured to cause a display unit to display, overlaid on a first image captured by a camera, a first guide representing a maximum size and a second guide representing a minimum size, wherein each of the maximum size and minimum size is changeable based on a user operation performed while the first guide and second guide are displayed overlaid on the first image; and a setting unit configured to set the maximum size and minimum size that have been changed, wherein the set maximum size and minimum size are to be used for detecting an object whose size is between the set maximum size and minimum size from a second image captured by the camera at a time different from the first image.