An image processing apparatus configured to extract an irradiation field from an image obtained through radiation imaging, comprising: preprocessing means configured to preprocess an input image; inference means configured to infer an irradiation field candidate by inputting the preprocessed input image into a neural network learned using a set of input image data and a corresponding set of training data; contour extracting means configured to extract at least one contour candidate of the irradiation field based on the inferred irradiation field candidate, and extract a contour of the irradiation field; and field extracting means configured to extract the irradiation field based on the contour, wherein the inference means is configured to infer, as the irradiation field candidate, a probability map that indicates a probability of being the irradiation field or a probability of not being the irradiation field for each pixel of the input image input into the neural network, wherein the probability map includes a first region that is highly likely to be the irradiation field and a second region that is highly likely to be a collimator, and the contour extracting means is configured to extract the at least one contour candidate by performing contour extraction processing on the probability map based on a shape of the collimator, wherein, if an overlap ratio that indicates a ratio of overlap between a region that is formed by the at least one contour candidate and the first region that is highly likely to be the irradiation field in the probability map is at least a threshold value, the contour extracting means is configured to extract the at least one contour candidate as the contour of the irradiation field. preprocessing means configured to preprocess an input image; inference means configured to infer an irradiation field candidate by inputting the preprocessed input image into a neural network learned using a set of input image data and a corresponding set of training data; contour extracting means configured to extract at least one contour candidate of the irradiation field based on the inferred irradiation field candidate, and extract a contour of the irradiation field; and field extracting means configured to extract the irradiation field based on the contour, wherein the inference means is configured to infer, as the irradiation field candidate, a probability map that indicates a probability of being the irradiation field or a probability of not being the irradiation field for each pixel of the input image input into the neural network, wherein the probability map includes a first region that is highly likely to be the irradiation field and a second region that is highly likely to be a collimator, and the contour extracting means is configured to extract the at least one contour candidate by performing contour extraction processing on the probability map based on a shape of the collimator, wherein, if an overlap ratio that indicates a ratio of overlap between a region that is formed by the at least one contour candidate and the first region that is highly likely to be the irradiation field in the probability map is at least a threshold value, the contour extracting means is configured to extract the at least one contour candidate as the contour of the irradiation field. the inference means is configured to infer, as the irradiation field candidate, a probability map that indicates a probability of being the irradiation field or a probability of not being the irradiation field for each pixel of the input image input into the neural network, wherein the probability map includes a first region that is highly likely to be the irradiation field and a second region that is highly likely to be a collimator, and the contour extracting means is configured to extract the at least one contour candidate by performing contour extraction processing on the probability map based on a shape of the collimator, wherein, if an overlap ratio that indicates a ratio of overlap between a region that is formed by the at least one contour candidate and the first region that is highly likely to be the irradiation field in the probability map is at least a threshold value, the contour extracting means is configured to extract the at least one contour candidate as the contour of the irradiation field.