An image forming device includes a device body, a cartridge detachably
attached to the device body so as to accommodate material which includes
one of consumable material and waste material, a sensor configured to
emit and receive sensing light and give a detection value corresponding
to an amount of the material in the cartridge which amount is detected
based upon an intensity of the sensing light received thereby, a received
light changing member configured to change the intensity of the sensing
light received by the sensor, and a judging unit configured to judge
based upon a change of the detection value given by the sensor whether
the cartridge is a new one.