1. An image recognition device for performing a generic object recognition using spatial pyramid matching, comprising: a non-transitory memory storing a program; and a hardware processor configured to execute the program and to cause the image recognition device to operate as the following units stored in the non-transitory memory: a segmenting unit configured to segment an input image by pyramid matching into a plurality of increasingly fine regions in accordance with information extracted from content of the input image; a generating unit configured to compute feature data for each of the plurality of regions and generate feature data of the input image reflecting the computed feature data; and a checking unit configured to check whether or not a recognition-target object is present in the input image in accordance with the feature data of the input image: wherein the segmenting unit generates a score map by mapping, for each of a plurality of pixels constituting the input image, a probability of being a pixel pertaining to the recognition-target object, generates a semantic map by segmenting the score map into a plurality of levels by using a plurality of thresholds, and uses the semantic map as information representing the information extracted from the content of the input image.