An image processing apparatus includes a classifying unit and a replacing unit. The classifying unit classifies an input image into a category among plural categories. The replacing unit replaces a portion of the input image with a first image in a case where the category into which the input image is classified by the classifying unit is corrected by a user to a correct category among the plural categories.