1. An image processing apparatus comprising: an obtaining unit that obtains a plurality of types of document images; a first classification unit that classifies each of the plurality of types of document images obtained by the obtaining unit into any of classification items included in one category among a plurality of categories, the plurality of categories each including a plurality of classification items; and a second classification unit that classifies, in a case where there is a document image that is not classified into the one category by the first classification unit among the plurality of types of document images, the document image, which is not classified into the one category, into another category that includes at least one of classification items into which some of the document images are classified by the first classification unit.