1. An image forming apparatus comprising: a photosensitive member; an exposure device which is configured to expose the photosensitive member based on image data to form a latent image on the photosensitive member; a conveyance member which is configured to convey a recording medium; an image forming unit which is configured to develop the latent image by developer to form an image on the recording medium and to form a plurality of density detection images corresponding to the image data and having different pixel densities, on the conveyance member by developer; a density detection unit which is configured to detect densities of the plurality of density detection images; and an exposure setting unit which is configured to compare respective detected image densities of the density detection images, which are detected by the density detection unit, with reference densities corresponding to the respective density detection images, and to set, as an exposure amount of the exposure device for the image data, an exposure amount which is increased or decreased by an amount from a reference exposure amount for the image data, according to a condition based on a combination of respective comparison results between the detected image densities and the reference densities.