1. An apparatus for medical diagnostic imaging assistance with a detection function for automatically detecting a lesion on a target case image, comprising: memory that stores first feature information representing the feature of a lesion mask or non-lesion mask; a sampling unit that acquires a plurality of samples by making sampling from the memory based on the feature information; a machine-learning unit that generates a first discrimination condition corresponding to each of the plurality of samples by carrying out a machine-learning processing step; and a statistical processing unit that carries out a statistical processing step under the first discrimination condition to generate a second discrimination condition, wherein a detection function includes: a first detection unit that detects a lesion candidate mask on the target case image; a first extraction unit that extracts second feature information representing the feature of the lesion candidate mask; and a determination unit that determines whether the lesion candidate mask is an actual lesion or non-lesion by referring to the second feature information under the second discrimination condition.